Changeset 6786 for trunk/src


Ignore:
Timestamp:
Sep 23, 2001, 8:45:21 AM (24 years ago)
Author:
bird
Message:

More 32-bit wrappers due to 16-bit stack.

Location:
trunk/src/win32k/kKrnlLib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/win32k/kKrnlLib/kKrnlLibTst.def

    r6734 r6786  
    1 ;/* $Id: kKrnlLibTst.def,v 1.1 2001-09-17 01:17:01 bird Exp $
     1;/* $Id: kKrnlLibTst.def,v 1.2 2001-09-23 06:45:21 bird Exp $
    22; *
    33; * Definition file for the Ring-3 test program.
     
    4444
    4545IMPORTS
     46     DosQuerySysState = DOSCALL1.368
     47
     48     _DosRead         = DOSCALL1.281
    4649     _DosWrite        = DOSCALL1.282
     50     _DosOpen         = DOSCALL1.273
     51     _DosClose        = DOSCALL1.257
     52     _DosSetFilePtr   = DOSCALL1.256
     53
    4754     _DOS16OPEN       = DOSCALL1.70
    4855     _DOS16CLOSE      = DOSCALL1.59
    49      DosQuerySysState = DOSCALL1.368
  • trunk/src/win32k/kKrnlLib/testcase/Dos.c

    r6736 r6786  
    1 /* $Id: Dos.c,v 1.1 2001-09-17 01:41:12 bird Exp $
     1/* $Id: Dos.c,v 1.2 2001-09-23 06:45:20 bird Exp $
    22 *
    33 * Thunkers for OS/2 APIs.
     
    3333*******************************************************************************/
    3434APIRET  APIENTRY        _DosWrite(HFILE hFile, PVOID pBuffer, ULONG cbWrite, PULONG pcbActual);
    35 
     35APIRET  APIENTRY        _DosClose(HFILE hFile);
     36APIRET  APIENTRY        _DosOpen(
     37                            PSZ     pszFileName,
     38                            PHFILE  pHf,
     39                            PULONG  pulAction,
     40                            ULONG   cbFile,
     41                            ULONG   ulAttribute,
     42                            ULONG   fsOpenFlags,
     43                            ULONG   fsOpenMode,
     44                            PEAOP2  peaop2);
     45APIRET  APIENTRY        _DosSetFilePtr(
     46                            HFILE   hFile,
     47                            LONG    ib,
     48                            ULONG   method,
     49                            PULONG  ibActual);
    3650
    3751/**
     
    5367}
    5468
     69
     70/**
     71 * DosClose overload. Ensures that the stack is 32-bit!
     72 */
     73APIRET  APIENTRY        DosClose(HFILE hFile)
     74{
     75    BOOL    f32Stack = ((int)&hFile > 0x10000);
     76    APIRET  rc;
     77    if (!f32Stack)
     78        ThunkStack16To32();
     79
     80    rc = _DosClose(hFile);
     81
     82    if (!f32Stack)
     83        ThunkStack32To16();
     84
     85    return rc;
     86}
     87
     88
     89/**
     90 * DosOpen overload. Ensures that the stack is 32-bit!
     91 */
     92APIRET  APIENTRY        DosOpen(
     93                            PSZ    pszFileName,
     94                            PHFILE pHf,
     95                            PULONG pulAction,
     96                            ULONG  cbFile,
     97                            ULONG  ulAttribute,
     98                            ULONG  fsOpenFlags,
     99                            ULONG  fsOpenMode,
     100                            PEAOP2 peaop2)
     101{
     102    BOOL    f32Stack = ((int)&cbFile > 0x10000);
     103    APIRET  rc;
     104    if (!f32Stack)
     105        ThunkStack16To32();
     106
     107    rc = _DosOpen(pszFileName,
     108                   pHf,
     109                   pulAction,
     110                   cbFile,
     111                   ulAttribute,
     112                   fsOpenFlags,
     113                   fsOpenMode,
     114                   peaop2);
     115
     116    if (!f32Stack)
     117        ThunkStack32To16();
     118
     119    return rc;
     120}
     121
     122
     123/**
     124 * DosSetFilePtr overload. Ensures that the stack is 32-bit!
     125 */
     126APIRET  APIENTRY        DosSetFilePtr(
     127                            HFILE   hFile,
     128                            LONG    ib,
     129                            ULONG   method,
     130                            PULONG  ibActual)
     131{
     132    BOOL    f32Stack = ((int)&hFile > 0x10000);
     133    APIRET  rc;
     134    if (!f32Stack)
     135        ThunkStack16To32();
     136
     137    rc = _DosSetFilePtr(hFile,
     138                        ib,
     139                        method,
     140                        ibActual);
     141
     142    if (!f32Stack)
     143        ThunkStack32To16();
     144
     145    return rc;
     146}
     147
     148
     149
Note: See TracChangeset for help on using the changeset viewer.