Skip to content

Latest commit

 

History

History
62 lines (41 loc) · 1.27 KB

StrToIntEx.md

File metadata and controls

62 lines (41 loc) · 1.27 KB

Home

Function name : StrToIntEx

Group: String - Library: shlwapi


Converts a decimal or hexadecimal string to an integer.


Code examples:

OS version and revision
Converting a hexadecimal string to an integer

Declaration:

BOOL StrToIntEx(
    LPCTSTR pszString,
    DWORD dwFlags,
    int FAR * piRet
    );
  

FoxPro declaration:

DECLARE SHORT StrToIntEx IN Shlwapi;
	STRING    pszString,;
	INTEGER   dwFlags,;
	INTEGER @ pllRet
  

Parameters:

pszString Address of a null-terminated string to be converted.

dwFlags Specifies if pszString contains a decimal or hexadecimal value.

piRet Address of an integer variable that receives the converted string.


Return value:

Returns TRUE if the string is converted, or FALSE otherwise.


Comments:

When using STIF_SUPPORT_HEX for a hexadecimal value, the string must be prefixed with "0x", as in hexadecimal values in C++. E.g. 0x800

See also: StrToInt, StrToInt64Ex.