diff --git a/snapshot/win/system_snapshot_win.cc b/snapshot/win/system_snapshot_win.cc index ba1c1e75..6fc69458 100644 --- a/snapshot/win/system_snapshot_win.cc +++ b/snapshot/win/system_snapshot_win.cc @@ -76,12 +76,12 @@ bool ReadRegistryDWORD(HKEY key, const wchar_t* name, int* out_value) { DWORD type; DWORD local_value; DWORD size = sizeof(local_value); - if (RegQueryValueEx(key, - name, - nullptr, - &type, - reinterpret_cast(&local_value), - &size) == ERROR_SUCCESS && + if (RegQueryValueExW(key, + name, + nullptr, + &type, + reinterpret_cast(&local_value), + &size) == ERROR_SUCCESS && type == REG_DWORD) { *out_value = static_cast(local_value); return true;