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.

HexFromBin

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 binary number into a string representation of a hexadecimal number.

Header file:

Mapiutil.h

Implemented by:

MAPI

Called by:

Client applications and service providers

void HexFromBin(
  LPBYTE pb,
  int cb,
  LPSTR sz
);

pb

[in] Pointer to the binary data to be converted.

cb

[in] Size, in bytes, of the binary data pointed to by the pb parameter.

sz

[out] Pointer to a null-terminated ASCII string representing the binary data in hexadecimal digits.

The HexFromBin function takes a pointer to a unit of binary data whose size is indicated by the cb parameter. It returns in the sz string, within (2*cb)+1 bytes of memory, a representation of this binary information in hexadecimal numbers. If the byte value is decimal 10, for example, the hexadecimal string will be 0A, so one byte converts to two bytes in the string.

Show:
© 2015 Microsoft