UlFromSzHex 

The UlFromSzHex function converts a null-terminated string of hexadecimal digits into an unsigned long integer.

 

Note  This function may not be supported in future versions of MAPI.

 

Quick Info

Header file:

MAPIUTIL.H

Implemented by:

MAPI

Called by:

Client applications and service providers

 

ULONG UlFromSzHex(

    LPCTSTR lpsz

 

   );

 

 

Parameters

lpsz

[in] Pointer to the null-terminated string to be converted. lpsz must not exceed 65536 characters.

 

Return Values

UlFromSzHex returns an unsigned long integer. If the string does not begin with at least one hexadecimal digit, a binary zero is returned.

Remarks

The UlFromSzHex function stops converting when it reaches the first character in the string that is not a hexadecimal digit. For example, given the string  5a , UlFromSzHex returns the integer value 90. Given the string  5g5h , the function returns the integer value 5. Given the string  g5h5 , UlFromSzHex returns zero.

UlFromSzHex is sensitive to diacritical differences but allows both  a  through  f  and  A  through  F  for hexadecimal digits. Strings in the Unicode1BP47M and DBCS2LPDY7 formats are supported. The length limit on lpsz is in characters, not necessarily bytes.