OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "sandbox/src/sandbox_utils.h" | 5 #include "sandbox/win/src/sandbox_utils.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/win/windows_version.h" | 10 #include "base/win/windows_version.h" |
11 #include "sandbox/src/internal_types.h" | 11 #include "sandbox/win/src/internal_types.h" |
12 #include "sandbox/src/nt_internals.h" | 12 #include "sandbox/win/src/nt_internals.h" |
13 | 13 |
14 namespace sandbox { | 14 namespace sandbox { |
15 | 15 |
16 bool GetModuleHandleHelper(DWORD flags, const wchar_t* module_name, | 16 bool GetModuleHandleHelper(DWORD flags, const wchar_t* module_name, |
17 HMODULE* module) { | 17 HMODULE* module) { |
18 DCHECK(module); | 18 DCHECK(module); |
19 | 19 |
20 HMODULE kernel32_base = ::GetModuleHandle(kKerneldllName); | 20 HMODULE kernel32_base = ::GetModuleHandle(kKerneldllName); |
21 if (!kernel32_base) { | 21 if (!kernel32_base) { |
22 NOTREACHED(); | 22 NOTREACHED(); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 HMODULE ntdll = ::GetModuleHandle(kNtdllName); | 70 HMODULE ntdll = ::GetModuleHandle(kNtdllName); |
71 RtlInitUnicodeString = reinterpret_cast<RtlInitUnicodeStringFunction>( | 71 RtlInitUnicodeString = reinterpret_cast<RtlInitUnicodeStringFunction>( |
72 GetProcAddress(ntdll, "RtlInitUnicodeString")); | 72 GetProcAddress(ntdll, "RtlInitUnicodeString")); |
73 DCHECK(RtlInitUnicodeString); | 73 DCHECK(RtlInitUnicodeString); |
74 } | 74 } |
75 RtlInitUnicodeString(uni_name, name.c_str()); | 75 RtlInitUnicodeString(uni_name, name.c_str()); |
76 InitializeObjectAttributes(obj_attr, uni_name, attributes, root, NULL); | 76 InitializeObjectAttributes(obj_attr, uni_name, attributes, root, NULL); |
77 } | 77 } |
78 | 78 |
79 }; // namespace sandbox | 79 }; // namespace sandbox |
OLD | NEW |