I need to convert from an unsigned long
(hex) to a DWORD
.
I normally would have
DWORD MyHex = 0x3F0000;
but instead I'm given
unsigned long MyLong = 3f0000;
How can I convert MyLong
into MyHex
?
It was fine when I was just visually printing it to a file and doing.
fprintf(pFile, "0x%X\n", MyLong);
But now I need to actually use that string as DWORD
.