mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-26 23:01:05 +08:00
win: Use RegQueryValueExW()
instead of RegQueryValueEx()
crrev.com/c/3434090 introduced a change that breaks the Windows build when the `UNICODE` preprocessor macro is not defined, as it passed a `wchar_t*` to `RegQueryValueEx()`. This fixes the build by explicitly using `RegQueryValueExW()` instead. Change-Id: Ic438bd982fdeffba05b4224051242b45e797ebd8 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3516536 Reviewed-by: Joshua Peraza <jperaza@chromium.org> Reviewed-by: Mark Mentovai <mark@chromium.org> Commit-Queue: Mark Mentovai <mark@chromium.org>
This commit is contained in:
parent
785cb10e80
commit
ab43d794a6
@ -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<BYTE*>(&local_value),
|
||||
&size) == ERROR_SUCCESS &&
|
||||
if (RegQueryValueExW(key,
|
||||
name,
|
||||
nullptr,
|
||||
&type,
|
||||
reinterpret_cast<BYTE*>(&local_value),
|
||||
&size) == ERROR_SUCCESS &&
|
||||
type == REG_DWORD) {
|
||||
*out_value = static_cast<int>(local_value);
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user