- Timestamp:
- Sep 26, 2001, 6:01:56 AM (24 years ago)
- Location:
- trunk/src/win32k/kKrnlLib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/win32k/kKrnlLib/include/testcase.h
r6736 r6822 1 /* $Id: testcase.h,v 1. 1 2001-09-17 01:41:52bird Exp $1 /* $Id: testcase.h,v 1.2 2001-09-26 04:01:56 bird Exp $ 2 2 * 3 3 * Definitions and declarations for testcase moduls. … … 146 146 ULONG LDRCALL fakeldrGetFileName(PSZ pszFilename, PCHAR *ppchName, PCHAR *ppchExt); 147 147 VOID LDRCALL fakeldrUCaseString(PCHAR pachString, unsigned cchString); 148 PMTE LDRCALL fakeldrValidateMteHandle(HMTE hMTE); 149 ULONG LDRCALL fakeldrGetOrdNum(PMTE pMTE, PSZ pszExportName, PUSHORT pusOrdinal); 150 ULONG LDRCALL fakeldrWasLoadModuled(HMTE hmte, PPTDA pptda, PULONG pcUsage); 151 ULONG LDRCALL fakeLDRGetProcAddr(HMTE hmte, ULONG ulOrdinal, PCSZ pszName, PULONG pulAddress, BOOL fFlat, PULONG pulProcType); 152 void KRNLCALL fakeLDRFreeTask(PPTDA pPTDA); 148 153 149 154 ULONG KRNLCALL fakeKSEMRequestMutex(HKSEMMTX hkmtx, ULONG ulTimeout); … … 167 172 PTCB KRNLCALL fakeTKQueryWakeup(ULONG ulSleepId, ULONG flWakeupType); 168 173 169 PMTE LDRCALL fakeldrValidateMteHandle(HMTE hMTE);170 174 PSZ SECCALL fakeSecPathFromSFN(SFN hFile); 171 175 ULONG KRNLCALL fakePGPhysAvail(void); 172 176 ULONG KRNLCALL fakePGPhysPresent(void); 173 177 VOID KRNLCALL fakevmRecalcShrBound(ULONG flFlags, PULONG pulSentinelAddress); 178 179 PVOID KRNLCALL fakeSELVirtToLin(ULONG ulOffset, USHORT usSel); 180 PVOID KRNLCALL fakeSELConvertToLinear(USHORT usSel, PPTDA pPTDA); 181 USHORT KRNLCALL fakeSELConvertToSelector(PVOID pv, ULONG ulRPL, HPTDA hPTDA); 182 ULONG KRNLCALL fakeSELAllocGDT(PUSHORT pusSel); 174 183 175 184 void _Optlink fakeg_tkExecPgm(void); /* Not callable! (fakea.asm) */ -
trunk/src/win32k/kKrnlLib/testcase/Fake.c
r6736 r6822 1 /* $Id: Fake.c,v 1. 1 2001-09-17 01:41:13bird Exp $1 /* $Id: Fake.c,v 1.2 2001-09-26 03:58:37 bird Exp $ 2 2 * 3 3 * Fake stubs for the ldr and kernel functions we imports or overloads. … … 153 153 * Internal Functions * 154 154 *******************************************************************************/ 155 #pragma info(nopar) 155 156 ULONG LDRCALL fakeLDRLoadExe(PSZ pszFilename, ldrrei_t *pEI); 156 157 ULONG LDRCALL fakeldrGetModule(PSZ pszFilename, ULONG ul); … … 2210 2211 DUMMY(); 2211 2212 printf("fakeTKQueryWakeup: - not implemented\n"); 2212 return ERROR_NOT_SUPPORTED;2213 return NULL; 2213 2214 } 2214 2215 … … 2274 2275 2275 2276 2277 /** 2278 * Resolves the ordinal number of an name export. 2279 * @returns OS2 return code. (I.e. ON_ERROR on success) 2280 * @param pMTE Pointer to the module table entry for the 2281 * module. 2282 * @param pszExportName Name to resolve. This is case sensitive. 2283 * @param pusOrdinal Pointer to variable which on success will hold 2284 * the ordinal value found for the name export. 2285 */ 2286 ULONG LDRCALL fakeldrGetOrdNum(PMTE pMTE, PSZ pszExportName, PUSHORT pusOrdinal) 2287 { 2288 DUMMY(); 2289 printf("fakeldrGetOrdNum: - not implemented\n"); 2290 return ERROR_NOT_SUPPORTED; 2291 } 2292 2293 2294 /** 2295 * Checks if a module was loaded using DosLoadModule. 2296 * This is called from LDRGetProcAddr and LDRFreeModule. 2297 * @returns NO_ERROR if the module was LoadModuled or executable. 2298 * ERROR_INVALID_HANDLE if not LoadModuled. 2299 * @param hmte MTE handle. 2300 * @param pptda Pointer to the PTDA of the process calling. (current) 2301 * @param pcUsage Pointer to usage variable. (output) 2302 * The usage count is returned. 2303 * @sketch 2304 */ 2305 ULONG LDRCALL fakeldrWasLoadModuled(HMTE hmte, PPTDA pptda, PULONG pcUsage) 2306 { 2307 DUMMY(); 2308 printf("fakeldrWasLoadModuled: - not implemented\n"); 2309 return ERROR_NOT_SUPPORTED; 2310 } 2311 2312 /** 2313 * LDRGetProcAddr gets address and proctype for a entry point to a module. 2314 * @returns NO_ERROR if the module was LoadModuled. 2315 * ERROR_INVALID_HANDLE if not LoadModuled. 2316 * @param hmte Handle of module. 2317 * @param ulOrdinal Procedure ordinal. 2318 * @param pszName Pointer to procedure name. 2319 * NULL is allowed. Ignored if ulOrdinal is not zero. 2320 * @param pulAddress Pointer to address variable. (output) 2321 * @param fFlat TRUE if a flat 0:32 address is to be returned. 2322 * FALSE if a far 16:16 address is to be returned. 2323 * @param pulProcType Pointer to procedure type variable. (output) 2324 * NULL is allowed. (DosQueryProcAddr uses NULL) 2325 * In user space. 2326 * @sketch 2327 */ 2328 ULONG LDRCALL fakeLDRGetProcAddr(HMTE hmte, ULONG ulOrdinal, PCSZ pszName, PULONG pulAddress, BOOL fFlat, PULONG pulProcType) 2329 { 2330 DUMMY(); 2331 printf("fakeLDRGetProcAddr: - not implemented\n"); 2332 return ERROR_NOT_SUPPORTED; 2333 } 2334 2335 2336 /** 2337 * Frees a task. 2338 * @param pPTDA Pointer to per task data area of the task to be freed. 2339 */ 2340 void KRNLCALL fakeLDRFreeTask(PPTDA pPTDA) 2341 { 2342 DUMMY(); 2343 printf("fakeLDRFreeTask: - not implemented\n"); 2344 } 2345 2346 /** 2347 * Converts 16:32 address to FLAT 32-bits address. 2348 * @returns Flat 32-bits address. 2349 * -1 on error. 2350 * @param ulOffset Offset. 2351 * @param usSel Selector. 2352 */ 2353 PVOID KRNLCALL fakeSELVirtToLin(ULONG ulOffset, USHORT usSel) 2354 { 2355 DUMMY(); 2356 printf("fakeSELVirtToLin: - not implemented\n"); 2357 return (void*)-1; 2358 } 2359 2360 /** 2361 * Converts selector to linar address. 2362 * @returns Flat 32-bits address. 2363 * -1 on error. 2364 * @param usSel Selector. 2365 */ 2366 PVOID KRNLCALL fakeSELConvertToLinear(USHORT usSel, PPTDA pPTDA) 2367 { 2368 DUMMY(); 2369 printf("fakeSELConvertToLinear: - not implemented\n"); 2370 return (void*)-1; 2371 } 2372 2373 /** 2374 * Converts a 32-bit flat pointer to an selector if possible. 2375 * @returns Selector (eax), offset (edx). 2376 * @param pv Flat 32-bit address. 2377 * @param ulRPL Requested privilege level of the selector. 2378 * @param hPTDA PTDA handle. NULLHANDLE means current PTDA. 2379 */ 2380 USHORT KRNLCALL fakeSELConvertToSelector(PVOID pv, ULONG ulRPL, HPTDA hPTDA) 2381 { 2382 DUMMY(); 2383 printf("fakeSELConvertToSelector: - not implemented\n"); 2384 return ERROR_NOT_SUPPORTED; 2385 } 2386 2387 /** 2388 * Allocates a GDT selector. 2389 * @returns OS2 return code. (I.e. NO_ERROR on success.) 2390 * @param pusSel Where to put the selector on successful return. 2391 */ 2392 ULONG KRNLCALL fakeSELAllocGDT(PUSHORT pusSel) 2393 { 2394 DUMMY(); 2395 printf("fakeSELAllocGDT: - not implemented\n"); 2396 return ERROR_NOT_SUPPORTED; 2397 } 2398
Note:
See TracChangeset
for help on using the changeset viewer.