Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
1.7 KiB

  1. /****************************** Module Header ******************************\
  2. * Module Name: w32w64.h
  3. *
  4. * Copyright (c) Microsoft Corporation. All rights reserved.
  5. *
  6. * This header file contains macros used to access kernel mode data
  7. * from user mode for wow64.
  8. *
  9. * History:
  10. * 08-18-98 PeterHal Created.
  11. \***************************************************************************/
  12. #ifndef _W32W64_
  13. #define _W32W64_
  14. /*
  15. * Kernel32 includes this structure, but we don't want to use _ptr64 in it yet.
  16. * Kernel32 does not use any shared memory itself.
  17. */
  18. #if defined(BUILD_WOW6432) && !defined(_KERNEL32_)
  19. #define KPTR_MODIFIER __ptr64
  20. typedef VOID * __ptr64 KERNEL_PVOID;
  21. typedef unsigned __int64 KERNEL_UINT_PTR;
  22. typedef __int64 KERNEL_INT_PTR;
  23. typedef unsigned __int64 KERNEL_ULONG_PTR;
  24. typedef __int64 KERNEL_LONG_PTR;
  25. #define KHANDLE_NULL 0
  26. #ifdef STRICT
  27. typedef void * KPTR_MODIFIER KHANDLE;
  28. #define DECLARE_KHANDLE(name) typedef struct name##__ * KPTR_MODIFIER K ## name
  29. #else
  30. typedef KERNEL_PVOID KHANDLE;
  31. #define DECLARE_KHANDLE(name) typedef KHANDLE K ## name
  32. #endif
  33. #else
  34. #define KPTR_MODIFIER
  35. typedef PVOID KERNEL_PVOID;
  36. typedef UINT_PTR KERNEL_UINT_PTR;
  37. typedef INT_PTR KERNEL_INT_PTR;
  38. typedef ULONG_PTR KERNEL_ULONG_PTR;
  39. typedef LONG_PTR KERNEL_LONG_PTR;
  40. #define KHANDLE_NULL NULL
  41. #define DECLARE_KHANDLE(name) typedef name K ## name
  42. typedef HANDLE KHANDLE;
  43. #endif
  44. #endif // _W32W64_