Changeset 4164 for trunk/src/win32k/include/LdrCalls.h
- Timestamp:
- Sep 2, 2000, 11:08:23 PM (25 years ago)
- File:
-
- 1 edited
-
trunk/src/win32k/include/LdrCalls.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/win32k/include/LdrCalls.h
r2501 r4164 1 /* $Id: LdrCalls.h,v 1. 3 2000-01-22 18:21:00bird Exp $1 /* $Id: LdrCalls.h,v 1.4 2000-09-02 21:08:02 bird Exp $ 2 2 * 3 3 * Prototypes for the loader overrided function. … … 35 35 */ 36 36 extern ULONG LDRCALL ldrOpen( /* retd 0x0c */ 37 PSFN p1,/* ebp + 0x08 */38 PCHAR p2,/* ebp + 0x0c */39 ULONG p3/* ebp + 0x10 */40 ); 41 42 ULONG LDRCALL myldrOpen(PSFN ,PCHAR,ULONG);37 PSFN p1, /* ebp + 0x08 */ 38 PCHAR p2, /* ebp + 0x0c */ 39 PULONG p3 /* ebp + 0x10 */ 40 ); 41 42 ULONG LDRCALL myldrOpen(PSFN phFile, PSZ pszFilename, PULONG pfl); 43 43 44 44 … … 47 47 */ 48 48 extern ULONG LDRCALL ldrRead( /* retd 0x18 */ 49 SFN p1,/* ebp + 0x08 */50 ULONG p2,/* ebp + 0x0c */51 PVOID p3,/* ebp + 0x10 */52 ULONG p4,/* ebp + 0x14 */53 ULONG p5,/* ebp + 0x18 */54 PMTE p6/* ebp + 0x1c */49 SFN hFile, /* ebp + 0x08 */ 50 ULONG ulOffset, /* ebp + 0x0c */ 51 PVOID pvBuffer, /* ebp + 0x10 */ 52 ULONG fpBuffer, /* ebp + 0x14 */ 53 ULONG cbToRead, /* ebp + 0x18 */ 54 PMTE pMTE /* ebp + 0x1c */ 55 55 ); 56 56 57 57 ULONG LDRCALL myldrRead( 58 SFN hFile,59 ULONG ulOffset,60 PVOID pBuffer,61 ULONG ulFlags,62 ULONG ulBytesToRead,63 PMTE pMTE58 SFN hFile, 59 ULONG ulOffset, 60 PVOID pvBuffer, 61 ULONG fpBuffer, 62 ULONG cbToRead, 63 PMTE pMTE 64 64 ); 65 65 … … 99 99 100 100 101 #if 0 102 /****************************************/ 103 /* _LDRLoadExe */ 104 /****************************************/ 105 extern int LDRCALL _LDRLoadExe( /* retd 0x08 */ 106 PCHAR pExeName, /* ebp + 0x08 */ 107 PULONG param2 /* ebp + 0x0c */ 108 ); 109 110 int LDRCALL myLDRLoadExe(PCHAR,PULONG); 111 112 113 114 /****************************************/ 115 /* _ldrGetResource */ 116 /****************************************/ 117 extern int LDRCALL _ldrGetResource( /* retd 0x14 - 20d */ 118 USHORT idType, /* ebp + 0x08 */ 119 ULONG idName, /* ebp + 0x0c */ 120 USHORT hMod, /* ebp + 0x10 */ 121 PPVOID ppRes, /* ebp + 0x14 */ 122 ULONG ulP5 /* ebp + 0x18 */ 123 ); 124 125 int LDRCALL myldrGetResource(USHORT,ULONG,USHORT,PPVOID,ULONG); 126 127 128 129 /****************************************/ 130 /* _ldrOpenNewExe */ 131 /****************************************/ 132 extern int LDRCALL _ldrOpenNewExe( /* retd 0x10 - 16d */ 133 PCHAR pszName, /* ebp + 0x08 */ 134 USHORT lenName, /* ebp + 0x0c */ 135 ULONG ulP3, /* ebp + 0x10 */ 136 ULONG ulP4 /* ebp + 0x14 */ 137 ); 138 139 int LDRCALL myldrOpenNewExe(PCHAR,USHORT,ULONG,ULONG); 140 141 142 143 /****************************************/ 144 /* _ldrCreateMte */ 145 /****************************************/ 146 extern int LDRCALL _ldrCreateMte( /* retd 0x08 */ 147 ULONG p1, /* ebp + 0x08 */ 148 ULONG p2 /* ebp + 0x0c */ 149 ); 150 151 int LDRCALL myldrCreateMte(ULONG,ULONG); 152 153 154 155 /****************************************/ 156 /* _ldrGetMte */ 157 /****************************************/ 158 extern int LDRCALL _ldrGetMte( /* retd 0x14 - 20d */ 159 ULONG p1, /* ebp + 0x08 */ 160 ULONG p2, /* ebp + 0x0c */ 161 ULONG p3, /* ebp + 0x10 */ 162 ULONG p4, /* ebp + 0x14 */ 163 ULONG p5 /* ebp + 0x18 */ 164 ); 165 166 int LDRCALL myldrGetMte(ULONG,ULONG,ULONG,ULONG,ULONG); 167 168 #endif 101 102 /** 103 * Loader local variables from KERNEL.SDF. 104 */ 105 typedef struct ldrlv_s /* #memb 12 size 39 (0x027) */ 106 { 107 PMTE lv_pmte; /* Pointer to mte. (ldrCreateMte/ldrXXX) */ 108 ULONG lv_lbufaddr; 109 ULONG lv_sbufaddr; 110 ULONG lv_lrecbufaddr; 111 ULONG lv_srecbufaddr; 112 ULONG lv_new_exe_off; 113 USHORT lv_sfn; /* Handle to the module being loaded */ 114 USHORT lv_hobmte; 115 ULONG lv_objnum; 116 ULONG lv_csmte; /* size of the swappable mte heap block. (ldrCreateMte) */ 117 USHORT lv_class; /* Object class CLASS_* defines in OS2Krnl (mteflags1) it seems. */ 118 /* CLASS_PROGRAM Program class. */ 119 /* CLASS_GLOBAL Global class. */ 120 /* CLASS_SPECIFIC Specific class, as against global. */ 121 /* CLASS_ALL (0) Nonspecific class all modules. */ 122 /* CLASS_MASK Class mask. */ 123 UCHAR lv_type; /* Type of executable image expected loaded. */ 124 } ldrlv_t; 125 126 127 /* 128 * Values of the lv_type byte. (Qualified guesses.) 129 */ 130 #define LVTYPE_EXE 0 /* Executable program. */ 131 #define LVTYPE_DLL 1 /* Dynamic Link Library. */ 132 #define LVTYPE_DD 2 /* Device Driver. */ 133 #define LVTYPE_IFS 3 /* Installable Filesystem. */ 134 #define LVTYPE_VDD 4 /* Virtual Device Driver (for VDMs). */ 135 136 137 138 /** 139 * ldrOpenPath 140 * @returns OS2 return code. 141 * pLdrLv->lv_sfn is set to filename handle. 142 * @param pachModname Pointer to modulename. Not zero terminated! 143 * @param cchModname Modulename length. 144 * @param pLdrLv Loader local variables? (Struct from KERNEL.SDF) 145 * @param pfl Pointer to flags which are passed on to ldrOpen. 146 * @sketch 147 * if !CLASS_GLOBAL or miniifs then 148 * ldrOpen(pachModName) 149 * else 150 * loop until no more libpath elements 151 * get next libpath element and add it to the modname. 152 * try open the modname 153 * if successfull then break the loop. 154 * endloop 155 * endif 156 */ 157 extern ULONG LDRCALL ldrOpenPath( /* retd 0x10 */ 158 PCHAR pachFilename, /* ebp + 0x08 */ 159 USHORT cchFilename, /* ebp + 0x0c */ 160 ldrlv_t * plv, /* ebp + 0x10 */ 161 PULONG pful /* ebp + 0x14 */ 162 ); 163 164 ULONG LDRCALL myldrOpenPath(PCHAR pachFilename, USHORT cchFilename, ldrlv_t *plv, PULONG pful); 165 166 167 /** 168 * Finds a module if it's loaded. 169 * @returns NO_ERROR on success. 170 * OS/2 errorcode on error. 171 * @param pachFilename Pointer to module filename. 172 * @param cchFilename Length of modulefilename. 173 * @param usClass Module class. (CLASS_*) 174 * @param ppMTE Pointer to pMTE found. 175 * @sketch 176 */ 177 ULONG LDRCALL ldrFindModule(PCHAR pachFilename, USHORT cchFilename, USHORT usClass, PPMTE ppMTE); 178 179 180 /** 181 * LDRClearSem - Clears the loader semaphore. 182 * (It does some garbage collection on release.) 183 * @returns NO_ERROR on success. 184 * OS/2 error on failure. (ERROR_INTERRUPT?) 185 */ 186 extern ULONG LDRCALL LDRClearSem(void); 187 188 189 /** 190 * LDRRequestSem - Requests the loader semaphore.. 191 * @returns NO_ERROR if succesfully. 192 * OS2 errorcode on failure. (ERROR_INTERRUPT?) 193 */ 194 #define LDRRequestSem() KSEMRequestMutex(pLdrSem, (ULONG)-1) 195 196 197 /* 198 * Pointer to the loader semaphore. 199 */ 200 #ifdef _OS2KSEM_h_ 201 extern PKSEMMTX pLdrSem; 202 #endif 203 204 205 /** 206 * Validates an hMTE and gets the MTE pointer. 207 * @returns Pointer to MTE on success. 208 * NULL on error. 209 * @param hMTE MTE handle. 210 * @remark If you wan't to this faster: 211 * Use the hMTE as a HOB and get the HOB address (by using VMGetHandleInfo). 212 */ 213 extern PMTE LDRCALL ldrValidateMteHandle(HMTE hMTE); 214 215 216 /** 217 * Gets the pMTE from a hMTE. No checks. 218 * @returns Pointer to the pMTE for a given hMTE. 219 * @param hMTE Module handle. 220 * @sketch 221 */ 222 extern PMTE KRNLCALL ldrASMpMTEFromHandle(HMTE hMTE); 223 224 225 /** 226 * Pointer to the loader filename buffer. 227 * Upon return from ldrOpen (and ldrOpenPath which calls ldrOpen) this is 228 * set to the fully qualified filename of the file last opened (successfully). 229 */ 230 extern PSZ *pldrpFileNameBuf; 231 #define ldrpFileNameBuf (*pldrpFileNameBuf) 232 169 233 170 234 #ifdef __cplusplus
Note:
See TracChangeset
for help on using the changeset viewer.
