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
);
Parameters
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.
Return Value
None.
Remarks
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.