PDA

View Full Version : Getting const from string c++


richmasta+
10-30-2005, 12:53 AM
In win32 im reading data from a text file with registry information

when i read HKEY_CURRENT_USER from a file it doesn't have the same meaning if i typed it in the program.


Is there some way I can get the #define value of HKEY_CURRENT_USER with the string "HKEY_CURRENT_USER"

aman
10-31-2005, 09:49 AM
Not sure i know what you need to do, but I think this may help.


HKEY hKey=0;

if( !strcmp(string, "HKEY_CURRENT_USER") )
hKey = HKEY_CURRENT_USER;