Click to See Complete Forum and Search --> : Values


cube01
August 11th, 1999, 11:13 PM
I have a hex value in the registry.. How do I get it into a variable in my app?
I know how to use RegQueryValueEx, But I dont know how to use it with Hex values...
Any help would be very much appreciated... Thanks...

August 11th, 1999, 11:42 PM
You can read the hex values into a string, and format the string to whatever output you like. But first, it doesn't matter how the registry's values look. Not matter they are a string, or hex values, they are just ascii values. So you can read as a string and convert them to the output you want after that.

I found the registry class on this codeguru site by John Joelle Cruz useful.
(Registry manipulation class with exception handling,
http://www.codeguru.com/system/RegistryWithEH.shtml)
I think it is easier to use than the CRegKey Class by MFC.

Good luck.

cube01
August 12th, 1999, 12:24 AM
How do I do That?
I looked at CString.Format, but didn't find anything...

Burlacu Ovidiu
August 12th, 1999, 01:05 AM
Try to use REG_DWORD_LITTLE_ENDIAN or REG_DWORD_BIG_ENDIAN at lType parameter
Let me know if thsi help u
Regards,
Ovidiu