|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer|
This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
Converts a null-terminated string of hexadecimal digits into an unsigned long integer.
Client applications and service providers
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 Unicode and DBCS formats are supported. The length limit on lpsz is in characters, not necessarily bytes.