diff --git a/src/base/debug/stack_trace_win.cc b/src/base/debug/stack_trace_win.cc index f981bec6..16655d51 100644 --- a/src/base/debug/stack_trace_win.cc +++ b/src/base/debug/stack_trace_win.cc @@ -81,7 +81,7 @@ bool InitializeSymbols() { } wchar_t exe_path[MAX_PATH]; - GetModuleFileName(nullptr, exe_path, MAX_PATH); + GetModuleFileNameW(nullptr, exe_path, MAX_PATH); std::wstring exe_path_wstring(exe_path); // To get the path without the filename, we just need to remove the final // slash and everything after it. diff --git a/src/base/platform/platform-win32.cc b/src/base/platform/platform-win32.cc index 11402689..b8cfb30d 100644 --- a/src/base/platform/platform-win32.cc +++ b/src/base/platform/platform-win32.cc @@ -802,13 +802,13 @@ void OS::EnsureWin32MemoryAPILoaded() { static bool loaded = false; if (!loaded) { VirtualAlloc2 = (VirtualAlloc2_t)GetProcAddress( - GetModuleHandle(L"kernelbase.dll"), "VirtualAlloc2"); + GetModuleHandleW(L"kernelbase.dll"), "VirtualAlloc2"); MapViewOfFile3 = (MapViewOfFile3_t)GetProcAddress( - GetModuleHandle(L"kernelbase.dll"), "MapViewOfFile3"); + GetModuleHandleW(L"kernelbase.dll"), "MapViewOfFile3"); UnmapViewOfFile2 = (UnmapViewOfFile2_t)GetProcAddress( - GetModuleHandle(L"kernelbase.dll"), "UnmapViewOfFile2"); + GetModuleHandleW(L"kernelbase.dll"), "UnmapViewOfFile2"); loaded = true; } @@ -1097,7 +1097,7 @@ bool OS::DiscardSystemPages(void* address, size_t size) { reinterpret_cast(-1)) discard_virtual_memory = reinterpret_cast(GetProcAddress( - GetModuleHandle(L"Kernel32.dll"), "DiscardVirtualMemory")); + GetModuleHandleW(L"Kernel32.dll"), "DiscardVirtualMemory")); // Use DiscardVirtualMemory when available because it releases faster than // MEM_RESET. DiscardVirtualMemoryFunction discard_function = discard_virtual_memory.load(); diff --git a/src/diagnostics/unwinding-info-win64.cc b/src/diagnostics/unwinding-info-win64.cc index 1312609e..0290c5a0 100644 --- a/src/diagnostics/unwinding-info-win64.cc +++ b/src/diagnostics/unwinding-info-win64.cc @@ -473,7 +473,7 @@ static decltype( void LoadNtdllUnwindingFunctionsOnce() { // Load functions from the ntdll.dll module. HMODULE ntdll_module = - LoadLibraryEx(L"ntdll.dll", nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32); + LoadLibraryExW(L"ntdll.dll", nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32); DCHECK_NOT_NULL(ntdll_module); // This fails on Windows 7.