DWORD DStudioRegistry::GetDWORDValue(HKEY hKey1, LPCWSTR key, LPCWSTR string)
{
DWORD dwSavePageSettings = 0;
HKEY hKey = NULL;
REGSAM sam = KEY_READ;
char* pszKey = "Software\\Microsoft\\Raja";
if ( ERROR_SUCCESS != RegOpenKeyEx ( hKey1, key, 0, sam, &hKey)) {
return dwSavePageSettings;
} else {
DWORD dwType = REG_DWORD;
DWORD dwSize = sizeof ( DWORD);
if ( ERROR_SUCCESS != RegQueryValueEx ( hKey, string, NULL, &dwType, ( LPBYTE) &dwSavePageSettings, &dwSize))
{
// error
}
}
RegCloseKey ( hKey);
return dwSavePageSettings;
}
1 comment:
Thank you, very helped!
Post a Comment