vgandhi2003
asked on
Cant read registry entry in MFC using studio.net
I am using the following function
RegOpenKeyEx(HKEY_LOCAL_MA CHINE, "SYSTEM\\CurrentSet\\WebSe rvices\\Ne tlogon", 0,KEY_READ, &hKey) == ERROR_SUCCESS)
to open the key.
This function returns SUCCESS indicating that it has opened the key. However when I try to read one of the values under this key by using the following function
DWORD DataType ; DWORD DataSize;DWORD lpData;
::RegQueryValueExW(hKey, KEYNAME, NULL, &DataType, ( LPBYTE )&lpData, &DataSize);
it does nothing the value in lpData remains zero where as the value should be 2.
Any ideas to what might be going wrong.
RegOpenKeyEx(HKEY_LOCAL_MA
to open the key.
This function returns SUCCESS indicating that it has opened the key. However when I try to read one of the values under this key by using the following function
DWORD DataType ; DWORD DataSize;DWORD lpData;
::RegQueryValueExW(hKey, KEYNAME, NULL, &DataType, ( LPBYTE )&lpData, &DataSize);
it does nothing the value in lpData remains zero where as the value should be 2.
Any ideas to what might be going wrong.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.