| Index: base/process_util_win.cc
|
| diff --git a/base/process_util_win.cc b/base/process_util_win.cc
|
| index ae5ee6a8d0be11304d411305c040fe6bd0925dbb..d640d683e3a5b805f7d2fbedf573a35a3bcfb8b1 100644
|
| --- a/base/process_util_win.cc
|
| +++ b/base/process_util_win.cc
|
| @@ -174,6 +174,16 @@ ProcessHandle GetCurrentProcessHandle() {
|
| return ::GetCurrentProcess();
|
| }
|
|
|
| +HMODULE GetModuleFromAddress(void* address) {
|
| + HMODULE hinst = NULL;
|
| + if (!::GetModuleHandleExA(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS,
|
| + static_cast<char*>(address),
|
| + &hinst)) {
|
| + NOTREACHED();
|
| + }
|
| + return hinst;
|
| +}
|
| +
|
| bool OpenProcessHandle(ProcessId pid, ProcessHandle* handle) {
|
| // We try to limit privileges granted to the handle. If you need this
|
| // for test code, consider using OpenPrivilegedProcessHandle instead of
|
|
|