| Index: base/base_paths_win.cc
|
| diff --git a/base/base_paths_win.cc b/base/base_paths_win.cc
|
| index 58f925f7e1f69d06529a1f7489faea656ce7285b..7102f7487533e696240352f62380ed7b6029422f 100644
|
| --- a/base/base_paths_win.cc
|
| +++ b/base/base_paths_win.cc
|
| @@ -10,12 +10,10 @@
|
| #include "base/files/file_path.h"
|
| #include "base/path_service.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| +#include "base/win/current_module.h"
|
| #include "base/win/scoped_co_mem.h"
|
| #include "base/win/windows_version.h"
|
|
|
| -// http://blogs.msdn.com/oldnewthing/archive/2004/10/25/247180.aspx
|
| -extern "C" IMAGE_DOS_HEADER __ImageBase;
|
| -
|
| using base::FilePath;
|
|
|
| namespace base {
|
| @@ -39,8 +37,7 @@ bool PathProviderWin(int key, FilePath* result) {
|
| case base::FILE_MODULE: {
|
| // the resource containing module is assumed to be the one that
|
| // this code lives in, whether that's a dll or exe
|
| - HMODULE this_module = reinterpret_cast<HMODULE>(&__ImageBase);
|
| - if (GetModuleFileName(this_module, system_buffer, MAX_PATH) == 0)
|
| + if (GetModuleFileName(CURRENT_MODULE(), system_buffer, MAX_PATH) == 0)
|
| return false;
|
| cur = FilePath(system_buffer);
|
| break;
|
|
|