This boolean always returns false :S
Anyone have any suggestions as to why?
And I'm checking it's return value like so:Code:bool keyExists()
{
HKEY hKey;
DWORD lRv = RegOpenKeyEx(HKEY_CURRENT_USER,(LPCTSTR)"Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer", 0, KEY_READ, &hKey);
if (lRv == ERROR_SUCCESS)
return true;
else
return false;
RegCloseKey(hKey);
}
Code:if (keyExists())
printf("Found");
else
printf("Not Found");