Hexprint4A, Hexprint4W

int Hexprint4A(char *s,ulong u);
int Hexprint4W(wchar_t *s,ulong u);

Converts unsigned long number to ASCII (Hexprint4A()) or UNICODE (Hexprint4W()) null-terminated string in hexadecimal uppercase format. If resulting string is shorter than 8 characters and first hexadecimal digit is a letter, prepends string with 0. If string is shorter than 4 characters, prepends it with zeros to the total length of 4 characters.


Parameters:

s
(out) String that receives text. It must be at least 9 characters long
u
(in) Unsigned long number that will be converted to text


Return values:

Length of the resulting string, characters, not including the terminal null


Example:

u
s
0 0000
0x1234 1234
0xFEDC 0FEDC
0xABCD1234 ABCD1234


See also:
HexdumpA(), HexdumpW(), HexprintA(), HexprintW(), Hexprint8A(), Hexprint8W(), SignedhexA(), SignedhexW()