Changeset 6822 for trunk/src


Ignore:
Timestamp:
Sep 26, 2001, 6:01:56 AM (24 years ago)
Author:
bird
Message:

New imports.

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:52 bird Exp $
     1/* $Id: testcase.h,v 1.2 2001-09-26 04:01:56 bird Exp $
    22 *
    33 * Definitions and declarations for testcase moduls.
     
    146146ULONG LDRCALL   fakeldrGetFileName(PSZ pszFilename, PCHAR *ppchName, PCHAR *ppchExt);
    147147VOID  LDRCALL   fakeldrUCaseString(PCHAR pachString, unsigned cchString);
     148PMTE LDRCALL    fakeldrValidateMteHandle(HMTE hMTE);
     149ULONG LDRCALL   fakeldrGetOrdNum(PMTE pMTE, PSZ pszExportName, PUSHORT pusOrdinal);
     150ULONG LDRCALL   fakeldrWasLoadModuled(HMTE hmte, PPTDA pptda, PULONG pcUsage);
     151ULONG LDRCALL   fakeLDRGetProcAddr(HMTE hmte, ULONG ulOrdinal, PCSZ pszName, PULONG pulAddress, BOOL fFlat, PULONG pulProcType);
     152void KRNLCALL   fakeLDRFreeTask(PPTDA pPTDA);
    148153
    149154ULONG KRNLCALL  fakeKSEMRequestMutex(HKSEMMTX hkmtx, ULONG ulTimeout);
     
    167172PTCB  KRNLCALL  fakeTKQueryWakeup(ULONG ulSleepId, ULONG flWakeupType);
    168173
    169 PMTE LDRCALL    fakeldrValidateMteHandle(HMTE hMTE);
    170174PSZ  SECCALL    fakeSecPathFromSFN(SFN hFile);
    171175ULONG KRNLCALL  fakePGPhysAvail(void);
    172176ULONG KRNLCALL  fakePGPhysPresent(void);
    173177VOID  KRNLCALL  fakevmRecalcShrBound(ULONG flFlags, PULONG pulSentinelAddress);
     178
     179PVOID KRNLCALL  fakeSELVirtToLin(ULONG ulOffset, USHORT usSel);
     180PVOID KRNLCALL  fakeSELConvertToLinear(USHORT usSel, PPTDA pPTDA);
     181USHORT KRNLCALL fakeSELConvertToSelector(PVOID pv, ULONG ulRPL, HPTDA hPTDA);
     182ULONG  KRNLCALL fakeSELAllocGDT(PUSHORT pusSel);
    174183
    175184void _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:13 bird Exp $
     1/* $Id: Fake.c,v 1.2 2001-09-26 03:58:37 bird Exp $
    22 *
    33 * Fake stubs for the ldr and kernel functions we imports or overloads.
     
    153153*   Internal Functions                                                         *
    154154*******************************************************************************/
     155#pragma info(nopar)
    155156ULONG LDRCALL   fakeLDRLoadExe(PSZ pszFilename, ldrrei_t *pEI);
    156157ULONG LDRCALL   fakeldrGetModule(PSZ pszFilename, ULONG ul);
     
    22102211    DUMMY();
    22112212    printf("fakeTKQueryWakeup:                     - not implemented\n");
    2212     return ERROR_NOT_SUPPORTED;
     2213    return NULL;
    22132214}
    22142215
     
    22742275
    22752276
     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 */
     2286ULONG 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 */
     2305ULONG 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 */
     2328ULONG 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 */
     2340void 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 */
     2353PVOID 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 */
     2366PVOID 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 */
     2380USHORT 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 */
     2392ULONG  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.