OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #ifndef SANDBOX_SRC_WIN_UTILS_H_ | 5 #ifndef SANDBOX_SRC_WIN_UTILS_H_ |
6 #define SANDBOX_SRC_WIN_UTILS_H_ | 6 #define SANDBOX_SRC_WIN_UTILS_H_ |
7 | 7 |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <string> | 9 #include <string> |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/scoped_ptr.h" | |
12 | 11 |
13 namespace sandbox { | 12 namespace sandbox { |
14 | 13 |
15 // Prefix for path used by NT calls. | 14 // Prefix for path used by NT calls. |
16 const wchar_t kNTPrefix[] = L"\\??\\"; | 15 const wchar_t kNTPrefix[] = L"\\??\\"; |
17 const size_t kNTPrefixLen = arraysize(kNTPrefix) - 1; | 16 const size_t kNTPrefixLen = arraysize(kNTPrefix) - 1; |
18 | 17 |
19 // Automatically acquires and releases a lock when the object is | 18 // Automatically acquires and releases a lock when the object is |
20 // is destroyed. | 19 // is destroyed. |
21 class AutoLock { | 20 class AutoLock { |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 // cannot be resolved. | 85 // cannot be resolved. |
87 bool ResolveRegistryName(std::wstring name, std::wstring* resolved_name); | 86 bool ResolveRegistryName(std::wstring name, std::wstring* resolved_name); |
88 | 87 |
89 } // namespace sandbox | 88 } // namespace sandbox |
90 | 89 |
91 // Resolves a function name in NTDLL to a function pointer. The second parameter | 90 // Resolves a function name in NTDLL to a function pointer. The second parameter |
92 // is a pointer to the function pointer. | 91 // is a pointer to the function pointer. |
93 void ResolveNTFunctionPtr(const char* name, void* ptr); | 92 void ResolveNTFunctionPtr(const char* name, void* ptr); |
94 | 93 |
95 #endif // SANDBOX_SRC_WIN_UTILS_H_ | 94 #endif // SANDBOX_SRC_WIN_UTILS_H_ |
OLD | NEW |