Source code of Windows XP (NT5)
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.

119 lines
2.8 KiB

  1. #ifndef _K16THK_H
  2. #define _K16THK_H
  3. #define MEOW_LOGGING 1
  4. #define MEOW_FLAG_HIGH_THUNK 0x00000001
  5. #define MEOW_FLAG_NO_SUSPEND 0x00000002
  6. #define MEOW_FLAG_ME_CREATE_PROCESS 0x00000004
  7. #define MEOW_FLAG_NO_READ_ONLY 0x00000008
  8. #define MEOW_FLAG_FAKE_NO_DEBUG 0x00000010
  9. #define MEOW_FLAG_LOGGING 0x00000020
  10. #define MEOW_FLAG_ON 0x80000000
  11. #define MEOWTHK_HANDLE 0
  12. #define MEOWTHK_PASSTHRU 1
  13. #ifdef MEOW_LOGGING
  14. typedef struct _LOGGINGWRAPPER { /* LW */
  15. CHAR szNop;
  16. CHAR szShortJump[2];
  17. CHAR szNop2;
  18. CHAR *pszFunctionName;
  19. PVOID pOriginalFunction;
  20. CHAR szFileName[8];
  21. } LOGGINGWRAPPER, *PLOGGINGWRAPPER;
  22. #endif // def MEOW_LOGGING
  23. //
  24. // This number must be a power of 2.
  25. //
  26. #define MEOWTHK_STACK_MAX_PARAM 64
  27. typedef struct _MEOWTHKSTACK { /* MTS */
  28. DWORD dwGS;
  29. DWORD dwFS;
  30. DWORD dwES;
  31. DWORD dwDS;
  32. DWORD dwEDI;
  33. DWORD dwESI;
  34. DWORD dwEBP;
  35. DWORD dwESP;
  36. DWORD dwEBX;
  37. DWORD dwEDX;
  38. DWORD dwECX;
  39. DWORD dwEAX;
  40. DWORD dwEFlags;
  41. DWORD dwFunction;
  42. DWORD dwReturn;
  43. } MEOWTHKSTACK;
  44. typedef MEOWTHKSTACK *PMEOWTHKSTACK;
  45. #define MEOWTHKSTACK_PARAMS(p) (PDWORD)(((PBYTE)p)+sizeof(MEOWTHKSTACK))
  46. #ifdef WOW
  47. #define MEOW_PLEH_SIGNATURE 0x574F454D
  48. #define WOW_FLATCS_SELECTOR 0x1B
  49. #define WOW_FLATDS_SELECTOR 0x23
  50. #define WOW_TIB_SELECTOR 0x3B
  51. #define ERROR_LOADING_NT_DLL 1
  52. /* XLATOFF */
  53. #pragma pack(2)
  54. /* XLATON */
  55. typedef struct _STACK32 { /* k212 */
  56. DWORD dwGS;
  57. DWORD dwFS;
  58. DWORD dwES;
  59. DWORD dwDS;
  60. DWORD dwEDI;
  61. DWORD dwESI;
  62. DWORD dwEBP;
  63. DWORD dwESP;
  64. DWORD dwEBX;
  65. DWORD dwEDX;
  66. DWORD dwECX;
  67. DWORD dwEAX;
  68. DWORD dwEFlags;
  69. DWORD dwMovedStack;
  70. DWORD dwReturnOffset;
  71. DWORD dwService;
  72. DWORD dwParam0;
  73. DWORD dwParam1;
  74. DWORD dwParam2;
  75. DWORD dwParam3;
  76. DWORD dwParam4;
  77. DWORD dwParam5;
  78. DWORD dwParam6;
  79. DWORD dwParam7;
  80. DWORD dwParam8;
  81. DWORD dwParam9;
  82. DWORD dwParam10;
  83. DWORD dwParam11;
  84. } STACK32;
  85. typedef STACK32 UNALIGNED *PSTACK32;
  86. typedef PSTACK32 UNALIGNED *PPSTACK32;
  87. typedef struct _LOADKERNEL32 { /* k213 */
  88. WORD wPSPSegment;
  89. WORD wPSPSelector;
  90. WORD wDOS386ArenaHead;
  91. WORD wDOS386PSPSel;
  92. PVOID pVxDEntry;
  93. PVOID pKrn32LoadBaseAddr;
  94. } LOADKERNEL32;
  95. typedef LOADKERNEL32 UNALIGNED *PLOADKERNEL32;
  96. /* XLATOFF */
  97. #pragma pack()
  98. /* XLATON */
  99. #endif // def WOW
  100. #endif // ndef _K16THK_H