sandbox_nt_types.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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
  3. // found in the LICENSE file.
  4. #ifndef SANDBOX_WIN_SRC_SANDBOX_NT_TYPES_H_
  5. #define SANDBOX_WIN_SRC_SANDBOX_NT_TYPES_H_
  6. #include "sandbox/win/src/nt_internals.h"
  7. namespace sandbox {
  8. struct NtExports {
  9. bool Initialized;
  10. NtAllocateVirtualMemoryFunction AllocateVirtualMemory;
  11. NtCreateFileFunction CreateFile;
  12. NtCreateSectionFunction CreateSection;
  13. NtCloseFunction Close;
  14. NtDuplicateObjectFunction DuplicateObject;
  15. NtFreeVirtualMemoryFunction FreeVirtualMemory;
  16. NtMapViewOfSectionFunction MapViewOfSection;
  17. NtOpenFileFunction OpenFile;
  18. NtOpenThreadFunction OpenThread;
  19. NtOpenProcessFunction OpenProcess;
  20. NtOpenProcessTokenFunction OpenProcessToken;
  21. NtOpenProcessTokenExFunction OpenProcessTokenEx;
  22. NtProtectVirtualMemoryFunction ProtectVirtualMemory;
  23. NtQueryAttributesFileFunction QueryAttributesFile;
  24. NtQueryFullAttributesFileFunction QueryFullAttributesFile;
  25. NtQueryInformationProcessFunction QueryInformationProcess;
  26. NtQueryObjectFunction QueryObject;
  27. NtQuerySectionFunction QuerySection;
  28. NtQueryVirtualMemoryFunction QueryVirtualMemory;
  29. NtSetInformationFileFunction SetInformationFile;
  30. NtSetInformationProcessFunction SetInformationProcess;
  31. NtSignalAndWaitForSingleObjectFunction SignalAndWaitForSingleObject;
  32. NtUnmapViewOfSectionFunction UnmapViewOfSection;
  33. NtWaitForSingleObjectFunction WaitForSingleObject;
  34. RtlAllocateHeapFunction RtlAllocateHeap;
  35. RtlAnsiStringToUnicodeStringFunction RtlAnsiStringToUnicodeString;
  36. RtlCompareUnicodeStringFunction RtlCompareUnicodeString;
  37. RtlCreateHeapFunction RtlCreateHeap;
  38. RtlCreateUserThreadFunction RtlCreateUserThread;
  39. RtlDestroyHeapFunction RtlDestroyHeap;
  40. RtlFreeHeapFunction RtlFreeHeap;
  41. RtlNtStatusToDosErrorFunction RtlNtStatusToDosError;
  42. _strnicmpFunction _strnicmp;
  43. strlenFunction strlen;
  44. wcslenFunction wcslen;
  45. memcpyFunction memcpy;
  46. };
  47. // This is the value used for the ntdll level allocator.
  48. enum AllocationType {
  49. NT_ALLOC,
  50. NT_PAGE
  51. };
  52. } // namespace sandbox
  53. #endif // SANDBOX_WIN_SRC_SANDBOX_NT_TYPES_H_