1 // Copyright (c) 2012 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.
5 #ifndef SANDBOX_WIN_SRC_INTERNAL_TYPES_H_
6 #define SANDBOX_WIN_SRC_INTERNAL_TYPES_H_
10 const wchar_t kNtdllName
[] = L
"ntdll.dll";
11 const wchar_t kKerneldllName
[] = L
"kernel32.dll";
12 const wchar_t kKernelBasedllName
[] = L
"kernelbase.dll";
14 // Defines the supported C++ types encoding to numeric id. Like a poor's man
15 // RTTI. Note that true C++ RTTI will not work because the types are not
16 // polymorphic anyway.
28 // Encapsulates a pointer to a buffer and the size of the buffer.
31 CountedBuffer(void* buffer
, uint32 size
) : size_(size
), buffer_(buffer
) {}
37 void* Buffer() const {
46 // Helper class to convert void-pointer packed ints for both
47 // 32 and 64 bit builds. This construct is non-portable.
50 explicit IPCInt(void* buffer
) {
54 explicit IPCInt(unsigned __int32 i32
) {
59 unsigned __int32
As32Bit() const {
63 void* AsVoidPtr() const {
74 } // namespace sandbox
76 #endif // SANDBOX_WIN_SRC_INTERNAL_TYPES_H_