Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(669)

Unified Diff: util/win/process_info_test.cc

Issue 1405323003: win: Add and use GET_FUNCTION() and GET_FUNCTION_REQUIRED() (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Address review feedback Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « util/win/process_info.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/win/process_info_test.cc
diff --git a/util/win/process_info_test.cc b/util/win/process_info_test.cc
index 925d0062273b0f9e55361b91803092d9723565da..075f8eb445b74e035b03d90b6455eb2ed370733b 100644
--- a/util/win/process_info_test.cc
+++ b/util/win/process_info_test.cc
@@ -31,6 +31,7 @@
#include "test/win/child_launcher.h"
#include "util/file/file_io.h"
#include "util/misc/uuid.h"
+#include "util/win/get_function.h"
#include "util/win/scoped_handle.h"
namespace crashpad {
@@ -40,9 +41,8 @@ namespace {
const wchar_t kNtdllName[] = L"\\ntdll.dll";
bool IsProcessWow64(HANDLE process_handle) {
- static decltype(IsWow64Process)* is_wow64_process =
- reinterpret_cast<decltype(IsWow64Process)*>(
- GetProcAddress(LoadLibrary(L"kernel32.dll"), "IsWow64Process"));
+ static const auto is_wow64_process =
+ GET_FUNCTION(L"kernel32.dll", ::IsWow64Process);
if (!is_wow64_process)
return false;
BOOL is_wow64;
« no previous file with comments | « util/win/process_info.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698