#include <windows.h>
#include <stdio.h>
int main()
{
HKEY hKey;
DWORD szLocation = 0;
DWORD dwSize = sizeof(DWORD);
DWORD dwType = REG_DWORD;
LPCTSTR studioPath = TEXT("SOFTWARE\\Microsoft\\Internet Explorer\\MAIN\\FeatureControl\\FEATURE_BROWSER_EMULATION");
LONG ret;
ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE, studioPath, 0, KEY_READ, &hKey);
wprintf(L"RegOpenKeyEx returns %d\n", ret);
if (ERROR_SUCCESS == ret)
{
ret = RegQueryValueEx(hKey, TEXT("ENWebBrowser.exe"), 0, &dwType, (LPBYTE)&szLocation, &dwSize);
wprintf(L"RegQueryValueEx returns %d, dwSize=%d\n", ret, dwSize);
if (ERROR_SUCCESS == ret)
{
wprintf(L"Location: %x\n", szLocation);
}
RegCloseKey(hKey);
}
system("pause");
return 0;
}