Changeset 1467 for trunk/src/win32k/include/ldr.h
- Timestamp:
- Oct 27, 1999, 4:03:01 AM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/win32k/include/ldr.h
r1269 r1467 1 /* $Id: ldr.h,v 1. 2 1999-10-14 01:16:49bird Exp $1 /* $Id: ldr.h,v 1.3 1999-10-27 02:02:56 bird Exp $ 2 2 * 3 3 * ldr - loader header file. … … 14 14 extern BOOL fQAppType; 15 15 16 /* **************************************************************/17 /* handle state - Array of handle states. Four state per byte! */18 /***************************************************************/16 /* 17 * handle state - Array of handle states. Eight state per byte! 18 */ 19 19 #define MAX_FILE_HANDLES 0x10000 20 20 … … 31 31 32 32 33 /* *************/34 /* PE handles */35 /**************/36 typedef struct _ PENode33 /* 34 * Module struct. 35 */ 36 typedef struct _Module 37 37 { 38 /* linking stuff */ 39 struct _PENode *left; 40 struct _PENode *right; 38 AVLNODECORE coreKey; /* Key is hFile. */ 39 AVLNODECORE coreMTE; /* Key is pMTE. */ 41 40 42 /* key*/43 SFN hFile; /* system file number or file handle if you prefer that*/41 SFN hFile; /* System file number or file handle if you prefer that. */ 42 PMTE pMTE; /* Pointer to MTE if we got one - NULL is allowed. */ 44 43 45 /* misc */ 46 PMTE pMTE; /* pointer to MTE if we got one - may be NULL */ 44 ULONG fFlags; /* Flags. Flags if coreMte is in use and what Data contains. */ 45 union 46 { 47 Pe2Lx * pPe2Lx; /* Pointer to a Pe2Lx object. (Win32 executables) */ 48 #if 0 49 Elf2Lx * pElf2Lx; /* Pointer to a Elf2Lx object. (ELF executables) */ 50 Script * pScript; /* Pointer to a Script object. (Shell scripts) */ 51 Pe * pPe; /* Pointer to a Pe object. (Ring3 loader) */ 52 #endif 53 void * pv; 54 } Data; /* Pointer to data. Currently it's allways a Pe2Lx object! */ 55 } MODULE, *PMODULE; 47 56 48 /* Pe2Lx object */ 49 Pe2Lx *pPe2Lx; 50 } PENODE, *PPENODE; 57 #define MOD_FLAGS_IN_MTETREE 0x00000010 /* The node is present in the MTE-tree. */ 58 #define MOD_TYPE_MASK 0x0000000F /* Type mask. */ 59 #define MOD_TYPE_PE2LX 0x00000001 /* Pe2Lx module. */ 60 #define MOD_TYPE_ELF2LX 0x00000002 /* Elf2Lx module. */ 61 #define MOD_TYPE_SCRIPT 0x00000003 /* Script module. */ 62 #define MOD_TYPE_PE 0x00000004 /* Pe module. */ 51 63 52 #define SIZEOF_NODE (sizeof(NODE))53 64 54 ULONG insertNode(PPENODE pNode); 55 ULONG deleteNode(SFN key); /* removes from tree and freeNode */ 56 PPENODE getNodePtr(SFN key); 57 PPENODE findNodePtr(const char *pszFilename); 58 ULONG depthPE(void); 59 PPENODE allocateNode(void); 60 ULONG freeNode(PPENODE pNode); /* don't remove from tree! */ 65 /* 66 * Modules operations. 67 */ 68 PMODULE getModuleBySFN(SFN hFile); 69 PMODULE getModuleByMTE(PMTE pMTE); 70 PMODULE getModuleByFilename(PCSZ pszFilename); 61 71 62 /* if sequential insertion - this will give a lower tree. */ 63 /* testing shows that 3 gives best results for 27 to 134 nodes */ 64 #define ROTATION 3 65 #define AdjustKey(a) ((USHORT)(a << 16-ROTATION) | (USHORT)(a >> ROTATION) ) 66 #define UnAdjustKey(a) ((USHORT)(a >> 16-ROTATION) | (USHORT)(a << ROTATION) ) 72 ULONG addModule(SFN hFile, PMTE pMTE, ULONG fFlags, void *pData); 73 ULONG removeModule(SFN hFile); 67 74 68 75 #endif 76 69 77 /*************/ 70 78 /* functions */
Note:
See TracChangeset
for help on using the changeset viewer.