去除IE长时间运行脚本提示信息

//去除IE长时间运行Javascript出现提示信息
HKEY hKey = NULL;
LPTSTR strKey = L"Software\\Microsoft\\Internet Explorer\\Styles";
DWORD dwDisp;
if ((ERROR_SUCCESS!=::RegOpenKeyEx(HKEY_CURRENT_USER, strKey, NULL, KEY_ALL_ACCESS, &hKey)
	&& (ERROR_SUCCESS != RegCreateKeyEx(HKEY_CURRENT_USER , strKey, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey, &dwDisp)))) {
	AfxMessageBox(L"写注册表失败!", MB_ICONERROR);
	return FALSE;
}

DWORD dwVal = 0xFFFFFFFF;
if (ERROR_SUCCESS!=RegSetValueEx(hKey, L"MaxScriptStatements", 0, REG_DWORD, (BYTE*)&dwVal, sizeof(DWORD))) {
	MessageBox(GetFocus(), L"写注册表值失败!", L"错误", MB_ICONERROR);
	return FALSE;
}

RegCloseKey(hKey);




你可能感兴趣的:(去除IE长时间运行脚本提示信息)