Converts a string representing a decimal or hexadecimal number to an integer.
Syntax
BOOL StrToIntEx( LPCTSTR pszString,
DWORD dwFlags,
int *piRet
);
Parameters
pszString
[in] Pointer to the null-terminated string to be converted. For further details concerning the valid forms of the string, see the Remarks section.
dwFlags
[in] One of the following values specifying how pszString should be parsed for its conversion to an integer.
STIF_DEFAULT
The string at pszString contains the representation of a decimal value.
STIF_SUPPORT_HEX
The string at pszString contains the representation of either a decimal or hexadecimal value. Note that in hexadecimal representations, the characters A-F are case-insensitive.
piRet
[out] Pointer to a variable of type int that receives the integer value of the converted string. For instance, in the case of the string "123", the integer pointed to by this value receives the integer value 123.
If this function returns FALSE, this value is undefined.
If the value returned is too large to be contained in a variable of type int, this parameter contains the 32 low-order bits of the value. Any high-order bits beyond that are lost.
Return Value
Returns TRUE if the string is converted, or FALSE otherwise.