NtUnDoc.h
上传用户:kittypts
上传日期:2018-02-11
资源大小:241k
文件大小:8k
源码类别:

PlugIns编程

开发平台:

Visual C++

  1. #ifndef _NTUNDOC_H_
  2. #define _NTUNDOC_H_
  3. typedef struct _ClientId
  4. {
  5. DWORD UniqueProcessId;
  6. DWORD UniqueThreadId;
  7. } ClientId, *PClientId;
  8. typedef struct _UndocTeb
  9. {
  10. NT_TIB Tib;                         // 00h
  11. PVOID EnvironmentPointer;           // 1Ch
  12. ClientId Cid;                      // 20h
  13. PVOID ActiveRpcInfo;                // 28h
  14. PVOID ThreadLocalStoragePointer;    // 2Ch
  15. PPEB Peb;                           // 30h
  16. ULONG LastErrorValue;               // 34h
  17. ULONG CountOfOwnedCriticalSections; // 38h
  18. PVOID CsrClientThread;              // 3Ch
  19. PVOID Win32ThreadInfo;              // 40h
  20. ULONG Win32ClientInfo[0x1F];        // 44h
  21. PVOID WOW32Reserved;                // C0h
  22. ULONG CurrentLocale;                // C4h
  23. ULONG FpSoftwareStatusRegister;     // C8h
  24. PVOID SystemReserved1[0x36];        // CCh
  25. PVOID Spare1;                       // 1A4h
  26. LONG ExceptionCode;                 // 1A8h
  27. ULONG SpareBytes1[0x28];            // 1ACh
  28. PVOID SystemReserved2[0xA];         // 1D4h
  29. //   GDI_TEB_BATCH GdiTebBatch;          // 1FCh
  30. ULONG gdiRgn;                       // 6DCh
  31. ULONG gdiPen;                       // 6E0h
  32. ULONG gdiBrush;                     // 6E4h
  33. ClientId RealClientId;             // 6E8h
  34. PVOID GdiCachedProcessHandle;       // 6F0h
  35. ULONG GdiClientPID;                 // 6F4h
  36. ULONG GdiClientTID;                 // 6F8h
  37. PVOID GdiThreadLocaleInfo;          // 6FCh
  38. PVOID UserReserved[5];              // 700h
  39. PVOID glDispatchTable[0x118];       // 714h
  40. ULONG glReserved1[0x1A];            // B74h
  41. PVOID glReserved2;                  // BDCh
  42. PVOID glSectionInfo;                // BE0h
  43. PVOID glSection;                    // BE4h
  44. PVOID glTable;                      // BE8h
  45. PVOID glCurrentRC;                  // BECh
  46. PVOID glContext;                    // BF0h
  47. NTSTATUS LastStatusValue;           // BF4h
  48. UNICODE_STRING StaticUnicodeString; // BF8h
  49. WCHAR StaticUnicodeBuffer[0x105];   // C00h
  50. PVOID DeallocationStack;            // E0Ch
  51. PVOID TlsSlots[0x40];               // E10h
  52. LIST_ENTRY TlsLinks;                // F10h
  53. PVOID Vdm;                          // F18h
  54. PVOID ReservedForNtRpc;             // F1Ch
  55. PVOID DbgSsReserved[0x2];           // F20h
  56. ULONG HardErrorDisabled;            // F28h
  57. PVOID Instrumentation[0x10];        // F2Ch
  58. PVOID WinSockData;                  // F6Ch
  59. ULONG GdiBatchCount;                // F70h
  60. ULONG Spare2;                       // F74h
  61. ULONG Spare3;                       // F78h
  62. ULONG Spare4;                       // F7Ch
  63. PVOID ReservedForOle;               // F80h
  64. ULONG WaitingOnLoaderLock;          // F84h
  65. } UndocTeb, *PUndocTeb;
  66. #ifndef _UNDOC_PEB_
  67. #define _UNDOC_PEB_
  68. typedef PVOID* PPVOID;
  69. typedef void (*PPEBLOCKROUTINE)(PVOID PebLock); 
  70. //
  71. // _PEB_LDR_DATA
  72. //
  73. typedef struct _PEB_LDR_DATA 
  74. {
  75.    ULONG                   Length;
  76.    BOOLEAN                 Initialized;
  77.    PVOID                   SsHandle;
  78.    LIST_ENTRY              InLoadOrderModuleList;
  79.    LIST_ENTRY              InMemoryOrderModuleList;
  80.    LIST_ENTRY              InInitializationOrderModuleList;
  81. } PEB_LDR_DATA, *PPEB_LDR_DATA;
  82. //
  83. // _RTL_DRIVE_LETTER_CURDIR
  84. //
  85. typedef struct _RTL_DRIVE_LETTER_CURDIR 
  86. {
  87.    USHORT                  Flags;
  88.    USHORT                  Length;
  89.    ULONG                   TimeStamp;
  90.    UNICODE_STRING          DosPath;
  91. } RTL_DRIVE_LETTER_CURDIR, *PRTL_DRIVE_LETTER_CURDIR;
  92. //
  93. // _RTL_USER_PROCESS_PARAMETERS
  94. //
  95. typedef struct _RTL_USER_PROCESS_PARAMETERS 
  96. {
  97.    ULONG                   MaximumLength;
  98.    ULONG                   Length;
  99.    ULONG                   Flags;
  100.    ULONG                   DebugFlags;
  101.    PVOID                   ConsoleHandle;
  102.    ULONG                   ConsoleFlags;
  103.    HANDLE                  StdInputHandle;
  104.    HANDLE                  StdOutputHandle;
  105.    HANDLE                  StdErrorHandle;
  106.    UNICODE_STRING          CurrentDirectoryPath;
  107.    HANDLE                  CurrentDirectoryHandle;
  108.    UNICODE_STRING          DllPath;
  109.    UNICODE_STRING          ImagePathName;
  110.    UNICODE_STRING          CommandLine;
  111.    PVOID                   Environment;
  112.    ULONG                   StartingPositionLeft;
  113.    ULONG                   StartingPositionTop;
  114.    ULONG                   Width;
  115.    ULONG                   Height;
  116.    ULONG                   CharWidth;
  117.    ULONG                   CharHeight;
  118.    ULONG                   ConsoleTextAttributes;
  119.    ULONG                   WindowFlags;
  120.    ULONG                   ShowWindowFlags;
  121.    UNICODE_STRING          WindowTitle;
  122.    UNICODE_STRING          DesktopName;
  123.    UNICODE_STRING          ShellInfo;
  124.    UNICODE_STRING          RuntimeData;
  125.    RTL_DRIVE_LETTER_CURDIR DLCurrentDirectory[0x20];
  126. } RTL_USER_PROCESS_PARAMETERS, *PRTL_USER_PROCESS_PARAMETERS;
  127. //
  128. // _PEB_FREE_BLOCK
  129. //
  130. typedef struct _PEB_FREE_BLOCK 
  131. {
  132.    _PEB_FREE_BLOCK         *Next;
  133.    ULONG                   Size;
  134. } PEB_FREE_BLOCK, *PPEB_FREE_BLOCK;
  135. //
  136. // _UNDOC_PEB
  137. //
  138. typedef struct _UNDOC_PEB 
  139. {
  140.    BOOLEAN                 InheritedAddressSpace;
  141.    BOOLEAN                 ReadImageFileExecOptions;
  142.    BOOLEAN                 BeingDebugged;
  143.    BOOLEAN                 Spare;
  144.    HANDLE                  Mutant;
  145.    PVOID                   ImageBaseAddress;
  146.    PPEB_LDR_DATA           LoaderData;
  147.    PRTL_USER_PROCESS_PARAMETERS ProcessParameters;
  148.    PVOID                   SubSystemData;
  149.    PVOID                   ProcessHeap;
  150.    PVOID                   FastPebLock;
  151.    PPEBLOCKROUTINE         FastPebLockRoutine;
  152.    PPEBLOCKROUTINE         FastPebUnlockRoutine;
  153.    ULONG                   EnvironmentUpdateCount;
  154.    PPVOID                  KernelCallbackTable;
  155.    PVOID                   EventLogSection;
  156.    PVOID                   EventLog;
  157.    PPEB_FREE_BLOCK         FreeList;
  158.    ULONG                   TlsExpansionCounter;
  159.    PVOID                   TlsBitmap;
  160.    ULONG                   TlsBitmapBits[0x2];
  161.    PVOID                   ReadOnlySharedMemoryBase;
  162.    PVOID                   ReadOnlySharedMemoryHeap;
  163.    PPVOID                  ReadOnlyStaticServerData;
  164.    PVOID                   AnsiCodePageData;
  165.    PVOID                   OemCodePageData;
  166.    PVOID                   UnicodeCaseTableData;
  167.    ULONG                   NumberOfProcessors;
  168.    ULONG                   NtGlobalFlag;
  169.    BYTE                    Spare2[0x4];
  170.    LARGE_INTEGER           CriticalSectionTimeout;
  171.    ULONG                   HeapSegmentReserve;
  172.    ULONG                   HeapSegmentCommit;
  173.    ULONG                   HeapDeCommitTotalFreeThreshold;
  174.    ULONG                   HeapDeCommitFreeBlockThreshold;
  175.    ULONG                   NumberOfHeaps;
  176.    ULONG                   MaximumNumberOfHeaps;
  177.    PPVOID                  *ProcessHeaps;
  178.    PVOID                   GdiSharedHandleTable;
  179.    PVOID                   ProcessStarterHelper;
  180.    PVOID                   GdiDCAttributeList;
  181.    PVOID                   LoaderLock;
  182.    ULONG                   OSMajorVersion;
  183.    ULONG                   OSMinorVersion;
  184.    ULONG                   OSBuildNumber;
  185.    ULONG                   OSPlatformId;
  186.    ULONG                   ImageSubSystem;
  187.    ULONG                   ImageSubSystemMajorVersion;
  188.    ULONG                   ImageSubSystemMinorVersion;
  189.    ULONG                   GdiHandleBuffer[0x22];
  190.    ULONG                   PostProcessInitRoutine;
  191.    ULONG                   TlsExpansionBitmap;
  192.    BYTE                    TlsExpansionBitmapBits[0x80];
  193.    ULONG                   SessionId;
  194. } UNDOC_PEB, *PUNDOC_PEB;
  195. #endif // _UNDOC_PEB_
  196. #endif //_NTUNDOC_H_