diff options
Diffstat (limited to 'src/apps/mplayerc/Struct.h')
-rw-r--r-- | src/apps/mplayerc/Struct.h | 350 |
1 files changed, 187 insertions, 163 deletions
diff --git a/src/apps/mplayerc/Struct.h b/src/apps/mplayerc/Struct.h index cffe115c7..83e45e992 100644 --- a/src/apps/mplayerc/Struct.h +++ b/src/apps/mplayerc/Struct.h @@ -9,11 +9,11 @@ #include <winternl.h>
#ifdef _WIN64
- typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
- typedef ULONG_PTR KAFFINITY, *PKAFFINITY;
+typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
+typedef ULONG_PTR KAFFINITY, *PKAFFINITY;
#else
- typedef unsigned long ULONG_PTR, *PULONG_PTR;
- typedef ULONG KAFFINITY, *PKAFFINITY;
+typedef unsigned long ULONG_PTR, *PULONG_PTR;
+typedef ULONG KAFFINITY, *PKAFFINITY;
#endif
typedef LONG NTSTATUS, *PNTSTATUS;
@@ -25,9 +25,10 @@ typedef LONG KPRIORITY; typedef void (CALLBACK *PKNORMAL_ROUTINE)(PVOID, PVOID, PVOID);
-typedef struct _CLIENT_ID {
- HANDLE UniqueProcess;
- HANDLE UniqueThread;
+typedef struct _CLIENT_ID
+{
+ HANDLE UniqueProcess;
+ HANDLE UniqueThread;
} CLIENT_ID, *PCLIENT_ID;
#define InitializeObjectAttributes( p, n, a, r, s ) { \
@@ -48,14 +49,16 @@ typedef struct _CLIENT_ID { #define OBJ_KERNEL_HANDLE 0x00000200L
-typedef struct RTL_DRIVE_LETTER_CURDIR { // Size = 0x10
+typedef struct RTL_DRIVE_LETTER_CURDIR // Size = 0x10
+{
USHORT Flags;
USHORT Length;
ULONG TimeStamp;
UNICODE_STRING DosPath;
} RTL_DRIVE_LETTER_CURDIR, *PRTL_DRIVE_LETTER_CURDIR;
-typedef struct _RTL_USER_PROCESS_PARAMETERS_MPC { // Size = 0x290
+typedef struct _RTL_USER_PROCESS_PARAMETERS_MPC // Size = 0x290
+{
ULONG AllocationSize;
ULONG Size;
ULONG Flags;
@@ -87,23 +90,25 @@ typedef struct _RTL_USER_PROCESS_PARAMETERS_MPC { // Size = 0x290 RTL_DRIVE_LETTER_CURDIR DLCurrentDirectory[0x20];
} RTL_USER_PROCESS_PARAMETERS_MPC, *PRTL_USER_PROCESS_PARAMETERS_MPC;
-typedef struct _LDR_MODULE {
- LIST_ENTRY InLoadOrderModuleList;
- LIST_ENTRY InMemoryOrderModuleList;
- LIST_ENTRY InInitializationOrderModuleList;
- PVOID BaseAddress;
- PVOID EntryPoint;
- ULONG SizeOfImage;
- UNICODE_STRING FullDllName;
- UNICODE_STRING BaseDllName;
- ULONG Flags;
- SHORT LoadCount;
- SHORT TlsIndex;
- LIST_ENTRY HashTableEntry;
- ULONG TimeDateStamp;
+typedef struct _LDR_MODULE
+{
+ LIST_ENTRY InLoadOrderModuleList;
+ LIST_ENTRY InMemoryOrderModuleList;
+ LIST_ENTRY InInitializationOrderModuleList;
+ PVOID BaseAddress;
+ PVOID EntryPoint;
+ ULONG SizeOfImage;
+ UNICODE_STRING FullDllName;
+ UNICODE_STRING BaseDllName;
+ ULONG Flags;
+ SHORT LoadCount;
+ SHORT TlsIndex;
+ LIST_ENTRY HashTableEntry;
+ ULONG TimeDateStamp;
} LDR_MODULE, *PLDR_MODULE;
-typedef struct _PEB_LDR_DATA_MPC { // Size = 0x24
+typedef struct _PEB_LDR_DATA_MPC // Size = 0x24
+{
ULONG Length; // 00
BOOLEAN Initialized; // 04
PVOID SsHandle; // 08
@@ -113,13 +118,15 @@ typedef struct _PEB_LDR_DATA_MPC { // Size = 0x24 // void * EntryInProgress; // 24
} PEB_LDR_DATA_MPC, *PPEB_LDR_DATA_MPC;
-typedef struct _PEB_FREE_BLOCK { // Size = 8
-struct _PEB_FREE_BLOCK *Next;
-ULONG Size;
+typedef struct _PEB_FREE_BLOCK // Size = 8
+{
+ struct _PEB_FREE_BLOCK *Next;
+ ULONG Size;
} PEB_FREE_BLOCK, *PPEB_FREE_BLOCK;
// Structured Exception Handler
-typedef struct _SEH {
+typedef struct _SEH
+{
struct _SEH *pNext;
FARPROC pfnHandler;
} SEH, *PSEH;
@@ -127,12 +134,14 @@ typedef struct _SEH { #pragma pack(1)
// Thread Information Block (FS:[0])
-typedef struct _TIB_NT {
+typedef struct _TIB_NT
+{
PSEH pvExcept; // 00 Head of exception record list
PVOID pvStackBase; // 04
PVOID pvStackLimit; // 08
PVOID SubSystemTib; // 0C
- union {
+ union
+ {
PVOID FiberData; // 10
DWORD Version;
};
@@ -144,124 +153,126 @@ typedef void (*PPEBLOCKROUTINE)(PVOID); // PEB (Process Environment Block) data structure (FS:[0x30])
// Located at addr. 0x7FFDF000
-typedef struct _PEB_NT { // Size = 0x1E8
- BOOLEAN InheritedAddressSpace; //000
- BOOLEAN ReadImageFileExecOptions; //001
- BOOLEAN BeingDebugged; //002
- BOOLEAN SpareBool; //003 Allocation size
- HANDLE Mutant; //004
- HINSTANCE ImageBaseAddress; //008 Instance
- PPEB_LDR_DATA_MPC LdrData; //00C
- PRTL_USER_PROCESS_PARAMETERS_MPC ProcessParameters; //010
- ULONG SubSystemData; //014
- HANDLE ProcessHeap; //018
- KSPIN_LOCK FastPebLock; //01C
- PPEBLOCKROUTINE FastPebLockRoutine; //020
- PPEBLOCKROUTINE FastPebUnlockRoutine; //024
- ULONG EnvironmentUpdateCount; //028
- PVOID * KernelCallbackTable; //02C
- PVOID EventLogSection; //030
- PVOID EventLog; //034
- PPEB_FREE_BLOCK FreeList; //038
- ULONG TlsExpansionCounter; //03C
- ULONG TlsBitmap; //040
- LARGE_INTEGER TlsBitmapBits; //044
- PVOID ReadOnlySharedMemoryBase; //04C
- PVOID ReadOnlySharedMemoryHeap; //050
- PVOID * ReadOnlyStaticServerData; //054
- PVOID AnsiCodePageData; //058
- PVOID OemCodePageData; //05C
- PVOID UnicodeCaseTableData; //060
- ULONG NumberOfProcessors; //064
- LARGE_INTEGER NtGlobalFlag; //068 Address of a local copy
- LARGE_INTEGER CriticalSectionTimeout; //070
- ULONG HeapSegmentReserve; //078
- ULONG HeapSegmentCommit; //07C
- ULONG HeapDeCommitTotalFreeThreshold; //080
- ULONG HeapDeCommitFreeBlockThreshold; //084
- ULONG NumberOfHeaps; //088
- ULONG MaximumNumberOfHeaps; //08C
- PVOID ** ProcessHeaps; //090
- PVOID GdiSharedHandleTable; //094
- PVOID ProcessStarterHelper; //098
- PVOID GdiDCAttributeList; //09C
- KSPIN_LOCK LoaderLock; //0A0
- ULONG OSMajorVersion; //0A4
- ULONG OSMinorVersion; //0A8
- USHORT OSBuildNumber; //0AC
- USHORT OSCSDVersion; //0AE
- ULONG OSPlatformId; //0B0
- ULONG ImageSubsystem; //0B4
- ULONG ImageSubsystemMajorVersion; //0B8
- ULONG ImageSubsystemMinorVersion; //0BC
- ULONG ImageProcessAffinityMask; //0C0
- ULONG GdiHandleBuffer[0x22]; //0C4
- ULONG PostProcessInitRoutine; //14C
- ULONG TlsExpansionBitmap; //150
- UCHAR TlsExpansionBitmapBits[0x80]; //154
- ULONG SessionId; //1D4
- void * AppCompatInfo; //1D8
- UNICODE_STRING CSDVersion; //1DC
+typedef struct _PEB_NT // Size = 0x1E8
+{
+ BOOLEAN InheritedAddressSpace; //000
+ BOOLEAN ReadImageFileExecOptions; //001
+ BOOLEAN BeingDebugged; //002
+ BOOLEAN SpareBool; //003 Allocation size
+ HANDLE Mutant; //004
+ HINSTANCE ImageBaseAddress; //008 Instance
+ PPEB_LDR_DATA_MPC LdrData; //00C
+ PRTL_USER_PROCESS_PARAMETERS_MPC ProcessParameters; //010
+ ULONG SubSystemData; //014
+ HANDLE ProcessHeap; //018
+ KSPIN_LOCK FastPebLock; //01C
+ PPEBLOCKROUTINE FastPebLockRoutine; //020
+ PPEBLOCKROUTINE FastPebUnlockRoutine; //024
+ ULONG EnvironmentUpdateCount; //028
+ PVOID * KernelCallbackTable; //02C
+ PVOID EventLogSection; //030
+ PVOID EventLog; //034
+ PPEB_FREE_BLOCK FreeList; //038
+ ULONG TlsExpansionCounter; //03C
+ ULONG TlsBitmap; //040
+ LARGE_INTEGER TlsBitmapBits; //044
+ PVOID ReadOnlySharedMemoryBase; //04C
+ PVOID ReadOnlySharedMemoryHeap; //050
+ PVOID * ReadOnlyStaticServerData; //054
+ PVOID AnsiCodePageData; //058
+ PVOID OemCodePageData; //05C
+ PVOID UnicodeCaseTableData; //060
+ ULONG NumberOfProcessors; //064
+ LARGE_INTEGER NtGlobalFlag; //068 Address of a local copy
+ LARGE_INTEGER CriticalSectionTimeout; //070
+ ULONG HeapSegmentReserve; //078
+ ULONG HeapSegmentCommit; //07C
+ ULONG HeapDeCommitTotalFreeThreshold; //080
+ ULONG HeapDeCommitFreeBlockThreshold; //084
+ ULONG NumberOfHeaps; //088
+ ULONG MaximumNumberOfHeaps; //08C
+ PVOID ** ProcessHeaps; //090
+ PVOID GdiSharedHandleTable; //094
+ PVOID ProcessStarterHelper; //098
+ PVOID GdiDCAttributeList; //09C
+ KSPIN_LOCK LoaderLock; //0A0
+ ULONG OSMajorVersion; //0A4
+ ULONG OSMinorVersion; //0A8
+ USHORT OSBuildNumber; //0AC
+ USHORT OSCSDVersion; //0AE
+ ULONG OSPlatformId; //0B0
+ ULONG ImageSubsystem; //0B4
+ ULONG ImageSubsystemMajorVersion; //0B8
+ ULONG ImageSubsystemMinorVersion; //0BC
+ ULONG ImageProcessAffinityMask; //0C0
+ ULONG GdiHandleBuffer[0x22]; //0C4
+ ULONG PostProcessInitRoutine; //14C
+ ULONG TlsExpansionBitmap; //150
+ UCHAR TlsExpansionBitmapBits[0x80]; //154
+ ULONG SessionId; //1D4
+ void * AppCompatInfo; //1D8
+ UNICODE_STRING CSDVersion; //1DC
} PEB_NT, *PPEB_NT;
// TEB (Thread Environment Block) data structure (FS:[0x18])
// Located at 0x7FFDE000, 0x7FFDD000, ...
-typedef struct _TEB_NT { // Size = 0xF88
- NT_TIB Tib; //000
- PVOID EnvironmentPointer; //01C
- CLIENT_ID ClientId; //020
- HANDLE ActiveRpcHandle; //028
- PVOID ThreadLocalStoragePointer; //02C
- PPEB_NT ProcessEnvironmentBlock; //030 PEB
- ULONG LastErrorValue; //034
- ULONG CountOfOwnedCriticalSections; //038
- ULONG CsrClientThread; //03C
- ULONG Win32ThreadInfo; //040
- UCHAR Win32ClientInfo[0x7C]; //044
- ULONG WOW32Reserved; //0C0
- ULONG CurrentLocale; //0C4
- ULONG FpSoftwareStatusRegister; //0C8
- UCHAR SystemReserved1[0xD8]; //0CC
- ULONG Spare1; //1A4
- ULONG ExceptionCode; //1A8
- UCHAR SpareBytes1[0x28]; //1AC
- UCHAR SystemReserved2[0x28]; //1D4
- UCHAR GdiTebBatch[0x4E0]; //1FC
- ULONG GdiRgn; //6DC
- ULONG GdiPen; //6E0
- ULONG GdiBrush; //6E4
- CLIENT_ID RealClientId; //6E8
- ULONG GdiCachedProcessHandle; //6F0
- ULONG GdiClientPID; //6F4
- ULONG GdiClientTID; //6F8
- ULONG GdiThreadLocalInfo; //6FC
- UCHAR UserReserved[0x14]; //700
- UCHAR glDispatchTable[0x460]; //714
- UCHAR glReserved1[0x68]; //B74
- ULONG glReserved2; //BDC
- ULONG glSectionInfo; //BE0
- ULONG glSection; //BE4
- ULONG glTable; //BE8
- ULONG glCurrentRC; //BEC
- ULONG glContext; //BF0
- ULONG LastStatusValue; //BF4
- LARGE_INTEGER StaticUnicodeString; //BF8
- UCHAR StaticUnicodeBuffer[0x20C]; //C00
- ULONG DeallocationStack; //E0C
- UCHAR TlsSlots[0x100]; //E10
- LARGE_INTEGER TlsLinks; //F10
- ULONG Vdm; //F18
- ULONG ReservedForNtRpc; //F1C
- LARGE_INTEGER DbgSsReserved; //F20
- ULONG HardErrorsAreDisabled; //F28
- UCHAR Instrumentation[0x40]; //F2C
- ULONG WinSockData; //F6C
- ULONG GdiBatchCount; //F70
- ULONG Spare2; //F74
- ULONG Spare3; //F78
- ULONG Spare4; //F7C
- ULONG ReservedForOle; //F80
- ULONG WaitingOnLoaderLock; //F84
+typedef struct _TEB_NT // Size = 0xF88
+{
+ NT_TIB Tib; //000
+ PVOID EnvironmentPointer; //01C
+ CLIENT_ID ClientId; //020
+ HANDLE ActiveRpcHandle; //028
+ PVOID ThreadLocalStoragePointer; //02C
+ PPEB_NT ProcessEnvironmentBlock; //030 PEB
+ ULONG LastErrorValue; //034
+ ULONG CountOfOwnedCriticalSections; //038
+ ULONG CsrClientThread; //03C
+ ULONG Win32ThreadInfo; //040
+ UCHAR Win32ClientInfo[0x7C]; //044
+ ULONG WOW32Reserved; //0C0
+ ULONG CurrentLocale; //0C4
+ ULONG FpSoftwareStatusRegister; //0C8
+ UCHAR SystemReserved1[0xD8]; //0CC
+ ULONG Spare1; //1A4
+ ULONG ExceptionCode; //1A8
+ UCHAR SpareBytes1[0x28]; //1AC
+ UCHAR SystemReserved2[0x28]; //1D4
+ UCHAR GdiTebBatch[0x4E0]; //1FC
+ ULONG GdiRgn; //6DC
+ ULONG GdiPen; //6E0
+ ULONG GdiBrush; //6E4
+ CLIENT_ID RealClientId; //6E8
+ ULONG GdiCachedProcessHandle; //6F0
+ ULONG GdiClientPID; //6F4
+ ULONG GdiClientTID; //6F8
+ ULONG GdiThreadLocalInfo; //6FC
+ UCHAR UserReserved[0x14]; //700
+ UCHAR glDispatchTable[0x460]; //714
+ UCHAR glReserved1[0x68]; //B74
+ ULONG glReserved2; //BDC
+ ULONG glSectionInfo; //BE0
+ ULONG glSection; //BE4
+ ULONG glTable; //BE8
+ ULONG glCurrentRC; //BEC
+ ULONG glContext; //BF0
+ ULONG LastStatusValue; //BF4
+ LARGE_INTEGER StaticUnicodeString; //BF8
+ UCHAR StaticUnicodeBuffer[0x20C]; //C00
+ ULONG DeallocationStack; //E0C
+ UCHAR TlsSlots[0x100]; //E10
+ LARGE_INTEGER TlsLinks; //F10
+ ULONG Vdm; //F18
+ ULONG ReservedForNtRpc; //F1C
+ LARGE_INTEGER DbgSsReserved; //F20
+ ULONG HardErrorsAreDisabled; //F28
+ UCHAR Instrumentation[0x40]; //F2C
+ ULONG WinSockData; //F6C
+ ULONG GdiBatchCount; //F70
+ ULONG Spare2; //F74
+ ULONG Spare3; //F78
+ ULONG Spare4; //F7C
+ ULONG ReservedForOle; //F80
+ ULONG WaitingOnLoaderLock; //F84
// PVOID StackCommit;
// PVOID StackCommitMax;
// PVOID StackReserved;
@@ -272,13 +283,14 @@ typedef struct _TEB_NT { // Size = 0xF88 -typedef struct _THREAD_BASIC_INFORMATION {
- NTSTATUS ExitStatus;
- PTIB_NT TebBaseAddress;
- CLIENT_ID ClientId;
- KAFFINITY AffinityMask;
- KPRIORITY Priority;
- KPRIORITY BasePriority;
+typedef struct _THREAD_BASIC_INFORMATION
+{
+ NTSTATUS ExitStatus;
+ PTIB_NT TebBaseAddress;
+ CLIENT_ID ClientId;
+ KAFFINITY AffinityMask;
+ KPRIORITY Priority;
+ KPRIORITY BasePriority;
} THREAD_BASIC_INFORMATION, *PTHREAD_BASIC_INFORMATION;
@@ -286,7 +298,8 @@ typedef struct _THREAD_BASIC_INFORMATION { #define SystemProcessesAndThreadsInformation 5
-typedef struct _VM_COUNTERS {
+typedef struct _VM_COUNTERS
+{
SIZE_T PeakVirtualSize;
SIZE_T VirtualSize;
ULONG PageFaultCount;
@@ -300,7 +313,8 @@ typedef struct _VM_COUNTERS { SIZE_T PeakPagefileUsage;
} VM_COUNTERS;
-typedef struct _SYSTEM_THREAD_INFORMATION {
+typedef struct _SYSTEM_THREAD_INFORMATION
+{
LARGE_INTEGER KernelTime;
LARGE_INTEGER UserTime;
LARGE_INTEGER CreateTime;
@@ -317,7 +331,8 @@ typedef struct _SYSTEM_THREAD_INFORMATION { // The size of the SYSTEM_PROCESS_INFORMATION structure is
// different on NT 4 and Win2K.
-typedef struct _SYSTEM_PROCESS_INFORMATION_NT4 {
+typedef struct _SYSTEM_PROCESS_INFORMATION_NT4
+{
ULONG NextEntryDelta;
ULONG ThreadCount;
ULONG Reserved1[6];
@@ -416,7 +431,8 @@ typedef struct _SYSTEM_PROCESS_INFORMATION_NT4 { #define BLOCK_TERMINATE_APC 0x00040000
// Environment Database
-typedef struct _ENVIRONMENT_DATABASE {
+typedef struct _ENVIRONMENT_DATABASE
+{
PSTR pszEnvironment; //00 Pointer to Process Environment
DWORD un1; //04 (always 0)
PSTR pszCmdLine; //08 Pointer to command line
@@ -435,13 +451,15 @@ typedef struct _ENVIRONMENT_DATABASE { } EDB, *PEDB;
// Handle Table Entry
-typedef struct _HANDLE_TABLE_ENTRY {
+typedef struct _HANDLE_TABLE_ENTRY
+{
DWORD flags; // Valid flags depend on what type of object this is
PVOID pObject; // Pointer to the object that the handle refers to
} HANDLE_TABLE_ENTRY, *PHANDLE_TABLE_ENTRY;
// Handle Table
-typedef struct _HANDLE_TABLE {
+typedef struct _HANDLE_TABLE
+{
DWORD cEntries; // Max number of handles in table
HANDLE_TABLE_ENTRY array[1]; // An array (number is given by cEntries)
} HANDLE_TABLE, *PHANDLE_TABLE;
@@ -470,7 +488,8 @@ typedef struct _IMTE } IMTE, *PIMTE;
// Thread Information Block (FS:[0x18])
-typedef struct _TIB95 { // Size = 0x34
+typedef struct _TIB95 // Size = 0x34
+{
PSEH pvExcept; // 00 Pointer to head of structured exception handling chain
PVOID pvStackUserTop; // 04 Max. address for stack
PVOID pvStackUserBase; // 08 Lowest page aligned addr. of stack
@@ -490,7 +509,8 @@ typedef struct _TIB95 { // Size = 0x34 // Thread Database Extension
-typedef struct _TDBX95 {
+typedef struct _TDBX95
+{
DWORD ptdb; // 00 TDB
DWORD ppdb; // 04 PDB
DWORD ContextHandle; // 08 R0 memory context
@@ -546,7 +566,8 @@ typedef struct _TDBX98 TDBX98; typedef struct _PDB98 PDB98;
// Thread Information Block (FS:[0x18])
-typedef struct _TIB98 { // Size = 0x38
+typedef struct _TIB98 // Size = 0x38
+{
PSEH pvExcept; // 00 Head of exception record list
PVOID pvStackUserTop; // 04 Top of user stack
PVOID pvStackUserBase; // 08 Base of user stack
@@ -566,7 +587,8 @@ typedef struct _TIB98 { // Size = 0x38 } TIB98, *PTIB98;
// Thread database (FS:[0x18] - 0x8)
-typedef struct _TDB98 { // Size = 0x228 (from Kernel32)
+typedef struct _TDB98 // Size = 0x228 (from Kernel32)
+{
WORD Type; // 00 K32 object type
WORD cReference; // 02 Reference count
DWORD pSomeEvent; // 04 K32 event object used when someone waits on the thread object
@@ -584,7 +606,8 @@ typedef struct _TDB98 { // Size = 0x228 (from Kernel32) } TDB98, *PTDB98;
// Thread database extension
-typedef struct _TDBX98 {
+typedef struct _TDBX98
+{
DWORD un0; // 00
TDB98 *ptdb; // 04 R3 thread database
PDB98 *ppdb; // 08 R3 process database
@@ -615,7 +638,8 @@ typedef struct _TDBX98 { typedef TIB98 TIBME;
typedef TIBME *PTIBME;
-typedef struct _TDBME { // Size = 0x228 (from Kernel32)
+typedef struct _TDBME // Size = 0x228 (from Kernel32)
+{
WORD Type; // 00 K32 object type
WORD cReference; // 02 Reference count
DWORD pSomeEvent; // 04 K32 event object used when someone waits on the thread object
|