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

Unified Diff: sandbox/win/src/service_resolver_32.cc

Issue 10951038: Remove GetModuleHandleHelper(), which was only needed for Win2k (which we don't support). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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 | « sandbox/win/src/sandbox_utils.cc ('k') | sandbox/win/tests/common/controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/service_resolver_32.cc
===================================================================
--- sandbox/win/src/service_resolver_32.cc (revision 157629)
+++ sandbox/win/src/service_resolver_32.cc (working copy)
@@ -5,7 +5,6 @@
#include "sandbox/win/src/service_resolver.h"
#include "base/memory/scoped_ptr.h"
-#include "sandbox/win/src/sandbox_utils.h"
#include "sandbox/win/src/win_utils.h"
namespace {
@@ -210,10 +209,9 @@
HMODULE module_1, module_2;
// last check, call_stub should point to a KiXXSystemCall function on ntdll
- if (!GetModuleHandleHelper(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS |
- GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
- bit_cast<const wchar_t*>(ki_system_call),
- &module_1))
+ if (!GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS |
+ GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
+ bit_cast<const wchar_t*>(ki_system_call), &module_1))
return false;
if (NULL != ntdll_base_) {
@@ -221,13 +219,11 @@
// able to patch a buffer in memory, so target_ is not inside ntdll.
module_2 = ntdll_base_;
} else {
- if (!GetModuleHandleHelper(
- GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS |
- GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
- reinterpret_cast<const wchar_t*>(target_),
- &module_2)) {
+ if (!GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS |
+ GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
+ reinterpret_cast<const wchar_t*>(target_),
+ &module_2))
return false;
- }
}
if (module_1 != module_2)
« no previous file with comments | « sandbox/win/src/sandbox_utils.cc ('k') | sandbox/win/tests/common/controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698