| Index: snapshot/win/pe_image_reader_test.cc
|
| diff --git a/snapshot/win/pe_image_reader_test.cc b/snapshot/win/pe_image_reader_test.cc
|
| index 4a3bbd2205a344926911a9d99c8a78dd768c0026..3928fee92412cbdc92a49fe460ab3f7ddb85f43d 100644
|
| --- a/snapshot/win/pe_image_reader_test.cc
|
| +++ b/snapshot/win/pe_image_reader_test.cc
|
| @@ -19,6 +19,7 @@
|
|
|
| #include "gtest/gtest.h"
|
| #include "snapshot/win/process_reader_win.h"
|
| +#include "util/win/get_function.h"
|
|
|
| extern "C" IMAGE_DOS_HEADER __ImageBase;
|
|
|
| @@ -30,10 +31,8 @@ BOOL CrashpadGetModuleInformation(HANDLE process,
|
| HMODULE module,
|
| MODULEINFO* module_info,
|
| DWORD cb) {
|
| - static decltype(GetModuleInformation)* get_module_information =
|
| - reinterpret_cast<decltype(GetModuleInformation)*>(
|
| - GetProcAddress(LoadLibrary(L"psapi.dll"), "GetModuleInformation"));
|
| - DCHECK(get_module_information);
|
| + static const auto get_module_information =
|
| + GET_FUNCTION_REQUIRED(L"psapi.dll", ::GetModuleInformation);
|
| return get_module_information(process, module, module_info, cb);
|
| }
|
|
|
|
|