Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize
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.

UFromSz

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 decimal digits into an unsigned integer.

Header file:

Mapidefs.h

Implemented by:

MAPI

Called by:

Client applications and service providers

UINT UFromSz(
  LPCTSTR lpsz
);

lpsz

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

UFromSz returns an unsigned integer. If the string does not begin with at least one decimal digit, zero is returned.

The UFromSz function stops converting when it reaches the first character in the string that is not a decimal digit. For example, given the string "55", UFromSz returns the integer value 55. Given the string "5a5b", the function returns the integer value 5. Given the string "a5b5", UFromSz returns zero.

UFromSz is sensitive to diacritical differences. Strings in the Unicode and DBCS formats are supported. The length limit on lpsz is in characters, not necessarily bytes.

Show:
© 2015 Microsoft