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:
Ben Hamilton 2022-03-10 13:27:13 -07:00 committed by Crashpad LUCI CQ
parent 785cb10e80
commit ab43d794a6

View File

@ -76,7 +76,7 @@ bool ReadRegistryDWORD(HKEY key, const wchar_t* name, int* out_value) {
DWORD type;
DWORD local_value;
DWORD size = sizeof(local_value);
if (RegQueryValueEx(key,
if (RegQueryValueExW(key,
name,
nullptr,
&type,