Fix feature code

This commit is contained in:
momo5502 2019-01-05 20:17:16 +01:00
parent 855d3620e6
commit f2c84ce3d4

View File

@ -156,8 +156,7 @@ void html_frame::initialize_browser()
void html_frame::set_browser_feature(const std::string& feature, DWORD value)
{
utils::nt::module self;
std::string registry_path = R"(SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\)" + feature;
const auto registry_path = R"(SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\)" + feature;
HKEY key = nullptr;
if (RegOpenKeyExA(
@ -165,6 +164,7 @@ void html_frame::set_browser_feature(const std::string& feature, DWORD value)
KEY_ALL_ACCESS, &key) != ERROR_SUCCESS)
return;
const utils::nt::module self;
const auto name = self.get_name();
RegSetValueExA(key, name.data(), 0, REG_DWORD, reinterpret_cast<const BYTE*>(&value), sizeof(value));