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

Side by Side Diff: sandbox/src/sandbox_utils.h

Issue 10783004: Move Windows Sandbox, trybots version (don't commit me!) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to top of tree Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sandbox/src/sandbox_types.h ('k') | sandbox/src/sandbox_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef SANDBOX_SRC_SANDBOX_UTILS_H__
6 #define SANDBOX_SRC_SANDBOX_UTILS_H__
7
8 #include <windows.h>
9 #include <string>
10
11 #include "base/basictypes.h"
12 #include "sandbox/src/nt_internals.h"
13
14 namespace sandbox {
15
16 typedef BOOL (WINAPI* GetModuleHandleExFunction)(DWORD flags,
17 LPCWSTR module_name,
18 HMODULE* module);
19
20 // Windows XP provides a nice function in kernel32.dll called GetModuleHandleEx
21 // This function allows us to verify if a function exported by the module
22 // lies in the module itself.
23 // As we need compatibility with windows 2000, we cannot use this function
24 // by calling it by name. This helper function checks if the GetModuleHandleEx
25 // function is exported by kernel32 and uses it, otherwise, implemets part of
26 // the functionality exposed by GetModuleHandleEx.
27 bool GetModuleHandleHelper(DWORD flags, const wchar_t* module_name,
28 HMODULE* module);
29
30 // Returns true if the current OS is Windows XP SP2 or later.
31 bool IsXPSP2OrLater();
32
33 void InitObjectAttribs(const std::wstring& name, ULONG attributes, HANDLE root,
34 OBJECT_ATTRIBUTES* obj_attr, UNICODE_STRING* uni_name);
35
36 }; // namespace sandbox
37
38 #endif // SANDBOX_SRC_SANDBOX_UTILS_H__
OLDNEW
« no previous file with comments | « sandbox/src/sandbox_types.h ('k') | sandbox/src/sandbox_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698