Changeset 278


Ignore:
Timestamp:
Jul 6, 1999, 5:48:48 PM (26 years ago)
Author:
phaller
Message:

Add: HandleManager support for kernel objects, various fixes

Location:
trunk
Files:
8 added
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/HandleManager.h

    r271 r278  
    1 /* $Id: HandleManager.h,v 1.3 1999-07-05 09:58:13 phaller Exp $ */
     1/* $Id: HandleManager.h,v 1.4 1999-07-06 15:48:44 phaller Exp $ */
    22
    33/*
     
    126126#endif
    127127
    128 HFILE HMCreateFile(LPCSTR lpFileName,
    129                    DWORD  dwDesiredAccess,
    130                    DWORD  dwShareMode,
    131                    LPSECURITY_ATTRIBUTES lpSecurityAttributes,
    132                    DWORD  dwCreationDisposition,
    133                    DWORD  dwFlagsAndAttributes,
    134                    HANDLE hTemplateFile);
    135 
    136 HANDLE HMOpenFile(LPCSTR    lpFileName,
    137                   OFSTRUCT* pOFStruct,
    138                   UINT      fuMode);
    139 
    140 BOOL HMCloseHandle(HANDLE hObject);
    141 
    142 BOOL HMReadFile(HANDLE       hFile,
    143                 LPVOID       lpBuffer,
    144                 DWORD        nNumberOfBytesToRead,
    145                 LPDWORD      lpNumberOfBytesRead,
    146                 LPOVERLAPPED lpOverlapped);
    147 
    148 BOOL HMWriteFile(HANDLE       hFile,
    149                  LPCVOID      lpBuffer,
    150                  DWORD        nNumberOfBytesToWrite,
    151                  LPDWORD      lpNumberOfBytesWritten,
    152                  LPOVERLAPPED lpOverlapped);
    153 
    154 DWORD HMGetFileType(HANDLE hFile);
    155 
    156 DWORD   HMDeviceRequest (HANDLE hFile,
    157                          ULONG  ulRequestCode,
    158                          ULONG  arg1,
    159                          ULONG  arg2,
    160                          ULONG  arg3,
    161                          ULONG  arg4);
    162 
    163 DWORD HMGetFileInformationByHandle (HANDLE                     hFile,
    164                                     BY_HANDLE_FILE_INFORMATION *pHFI);
    165 
    166 BOOL HMSetEndOfFile (HANDLE hFile);
    167 
    168 BOOL HMSetFileTime (HANDLE         hFile,
    169                     const FILETIME *pFT1,
    170                     const FILETIME *pFT2,
    171                     const FILETIME *pFT3);
    172 
    173 DWORD HMGetFileSize (HANDLE hFile,
    174                      PDWORD pSize);
    175 
    176 DWORD HMSetFilePointer (HANDLE hFile,
    177                         LONG   lDistanceToMove,
    178                         PLONG  lpDistanceToMoveHigh,
    179                         DWORD  dwMoveMethod);
    180 
    181 BOOL HMLockFile (HFILE         hFile,
    182                  DWORD         arg2,
    183                  DWORD         arg3,
    184                  DWORD         arg4,
    185                  DWORD         arg5);
    186 
    187 DWORD HMLockFileEx(HANDLE        hFile,
    188                    DWORD         dwFlags,
    189                    DWORD         dwReserved,
    190                    DWORD         nNumberOfBytesToLockLow,
    191                    DWORD         nNumberOfBytesToLockHigh,
    192                    LPOVERLAPPED  lpOverlapped);
    193 
    194 BOOL HMUnlockFile (HFILE         hFile,
    195                    DWORD         arg2,
    196                    DWORD         arg3,
    197                    DWORD         arg4,
    198                    DWORD         arg5);
    199 
    200 BOOL HMUnlockFileEx(HANDLE        hFile,
    201                     DWORD         dwFlags,
    202                     DWORD         dwReserved,
    203                     DWORD         nNumberOfBytesToLockLow,
    204                     DWORD         nNumberOfBytesToLockHigh,
    205                     LPOVERLAPPED  lpOverlapped);
     128HANDLE HMCreateEvent                (LPSECURITY_ATTRIBUTES      lpsa,
     129                                     BOOL                       bManualReset,
     130                                     BOOL                       bInitialState,
     131                                     LPCSTR                     lpName);
     132
     133HANDLE HMCreateMutex                (LPSECURITY_ATTRIBUTES      lpsa,
     134                                     BOOL                       bInitialOwner,
     135                                     LPCSTR                     lpName);
     136
     137HANDLE HMCreateFile                 (LPCSTR                     lpFileName,
     138                                     DWORD                      dwDesiredAccess,
     139                                     DWORD                      dwShareMode,
     140                                     LPSECURITY_ATTRIBUTES      lpSecurityAttributes,
     141                                     DWORD                      dwCreationDisposition,
     142                                     DWORD                      dwFlagsAndAttributes,
     143                                     HANDLE                     hTemplateFile);
     144
     145HANDLE HMOpenFile                   (LPCSTR                     lpFileName,
     146                                     OFSTRUCT*                  pOFStruct,
     147                                     UINT                       fuMode);
     148
     149HANDLE HMOpenEvent                  (DWORD                      fdwAccess,
     150                                     BOOL                       fInherit,
     151                                     LPCSTR                     lpName);
     152
     153HANDLE HMOpenMutex                  (DWORD                      fdwAccess,
     154                                     BOOL                       fInherit,
     155                                     LPCSTR                    lpName);
     156
     157BOOL   HMCloseHandle                (HANDLE                     hObject);
     158
     159BOOL   HMReadFile                   (HANDLE                     hFile,
     160                                     LPVOID                     lpBuffer,
     161                                     DWORD                      nNumberOfBytesToRead,
     162                                     LPDWORD                    lpNumberOfBytesRead,
     163                                     LPOVERLAPPED               lpOverlapped);
     164
     165BOOL   HMWriteFile                  (HANDLE                     hFile,
     166                                     LPCVOID                    lpBuffer,
     167                                     DWORD                      nNumberOfBytesToWrite,
     168                                     LPDWORD                    lpNumberOfBytesWritten,
     169                                     LPOVERLAPPED               lpOverlapped);
     170
     171DWORD  HMGetFileType                (HANDLE                     hFile);
     172
     173DWORD  HMDeviceRequest              (HANDLE                     hFile,
     174                                     ULONG                      ulRequestCode,
     175                                     ULONG                      arg1,
     176                                     ULONG                      arg2,
     177                                     ULONG                      arg3,
     178                                     ULONG                      arg4);
     179
     180BOOL   HMGetFileInformationByHandle (HANDLE                     hFile,
     181                                     BY_HANDLE_FILE_INFORMATION *pHFI);
     182
     183BOOL   HMSetEndOfFile               (HANDLE                     hFile);
     184
     185BOOL   HMSetFileTime                (HANDLE                     hFile,
     186                                     const FILETIME             *pFT1,
     187                                     const FILETIME             *pFT2,
     188                                     const FILETIME             *pFT3);
     189
     190DWORD  HMGetFileSize                (HANDLE                     hFile,
     191                                     PDWORD                     pSize);
     192
     193DWORD  HMSetFilePointer             (HANDLE                     hFile,
     194                                     LONG                       lDistanceToMove,
     195                                     PLONG                      lpDistanceToMoveHigh,
     196                                     DWORD                      dwMoveMethod);
     197
     198BOOL   HMLockFile                   (HFILE                      hFile,
     199                                     DWORD                      dwFileOffsetLow,
     200                                     DWORD                      dwFileOffsetHigh,
     201                                     DWORD                      nNumberOfBytesToLockLow,
     202                                     DWORD                      nNumberOfBytesToLockHigh);
     203
     204BOOL   HMLockFileEx                 (HANDLE                     hFile,
     205                                     DWORD                      dwFlags,
     206                                     DWORD                      dwReserved,
     207                                     DWORD                      nNumberOfBytesToLockLow,
     208                                     DWORD                      nNumberOfBytesToLockHigh,
     209                                     LPOVERLAPPED               lpOverlapped);
     210
     211BOOL   HMUnlockFile                 (HANDLE                     hFile,
     212                                     DWORD                      dwFileOffsetLow,
     213                                     DWORD                      dwFileOffsetHigh,
     214                                     DWORD                      cbUnlockLow,
     215                                     DWORD                      cbUnlockHigh);
     216
     217BOOL   HMUnlockFileEx               (HANDLE                     hFile,
     218                                     DWORD                      dwFlags,
     219                                     DWORD                      dwReserved,
     220                                     DWORD                      nNumberOfBytesToLockLow,
     221                                     DWORD                      nNumberOfBytesToLockHigh,
     222                                     LPOVERLAPPED               lpOverlapped);
     223
     224DWORD  HMWaitForSingleObject        (HANDLE                     hObject,
     225                                     DWORD                      dwTimeout);
     226
     227DWORD  HMWaitForSingleObjectEx      (HANDLE                     hObject,
     228                                     DWORD                      dwTimeout,
     229                                     BOOL                       fAlertable);
     230
     231DWORD  HMWaitForMultipleObjects     (DWORD                      cObjects,
     232                                     HANDLE                    *lphObjects,
     233                                     BOOL                       fWaitAll,
     234                                     DWORD                      dwTimeout);
     235
     236DWORD  HMWaitForMultipleObjectsEx   (DWORD                      cObjects,
     237                                     HANDLE                    *lphObjects,
     238                                     BOOL                       fWaitAll,
     239                                     DWORD                      dwTimeout,
     240                                     BOOL                       fAlertable);
     241
     242BOOL   HMFlushFileBuffers           (HANDLE                     hObject);
     243
     244BOOL   HMGetOverlappedResult        (HANDLE                     hObject,
     245                                     LPOVERLAPPED               lpOverlapped,
     246                                     LPDWORD                    lpNumberOfBytesTransferred,
     247                                     BOOL                       bWait);
     248
     249BOOL   HMReleaseMutex               (HANDLE                     hObject);
     250
     251BOOL   HMSetEvent                   (HANDLE                     hEvent);
     252
     253BOOL   HMPulseEvent                 (HANDLE                     hEvent);
     254
     255BOOL   HMResetEvent                 (HANDLE                     hEvent);
     256
     257HANDLE HMCreateSemaphore            (LPSECURITY_ATTRIBUTES      lpsa,
     258                                     LONG                       lInitialCount,
     259                                     LONG                       lMaximumCount,
     260                                     LPCSTR                     lpszSemaphoreName);
     261
     262HANDLE HMOpenSemaphore              (DWORD                      fdwAccess,
     263                                     BOOL                       fInheritHandle,
     264                                     LPCSTR                     lpszSemaphoreName);
     265
     266BOOL   HMReleaseSemaphore           (HANDLE                     hSemaphore,
     267                                     LONG                       cReleaseCount,
     268                                     LPLONG                     lpPreviousCount);
    206269
    207270
  • trunk/include/win/winbase.h

    r4 r278  
    1 /* $Id: winbase.h,v 1.1 1999-05-24 20:19:21 ktk Exp $ */
     1/* $Id: winbase.h,v 1.2 1999-07-06 15:48:44 phaller Exp $ */
    22
    33#ifndef __WINE_WINBASE_H
     
    321321
    322322/* Purge functions for Comm Port */
    323 #define PURGE_TXABORT       0x0001  /* Kill the pending/current writes to the 
     323#define PURGE_TXABORT       0x0001  /* Kill the pending/current writes to the
    324324                                       comm port */
    325 #define PURGE_RXABORT       0x0002  /*Kill the pending/current reads to 
     325#define PURGE_RXABORT       0x0002  /*Kill the pending/current reads to
    326326                                     the comm port */
    327327#define PURGE_TXCLEAR       0x0004  /* Kill the transmit queue if there*/
     
    398398
    399399
    400 #define LMEM_FIXED          0   
     400#define LMEM_FIXED          0
    401401#define LMEM_MOVEABLE       0x0002
    402402#define LMEM_NOCOMPACT      0x0010
     
    867867            BYTE        BaseMid;
    868868            BYTE        Flags1;/*Declare as bytes to avoid alignment problems */
    869             BYTE        Flags2; 
     869            BYTE        Flags2;
    870870            BYTE        BaseHi;
    871871        } Bytes;
    872         struct {           
     872        struct {       
    873873            unsigned    BaseMid         : 8;
    874874            unsigned    Type            : 5;
     
    935935 * WINAPI instead of CALLBACK in the windows headers.
    936936 */
    937 typedef DWORD (* WINAPI LPPROGRESS_ROUTINE)(LARGE_INTEGER, LARGE_INTEGER, LARGE_INTEGER, 
     937typedef DWORD (* WINAPI LPPROGRESS_ROUTINE)(LARGE_INTEGER, LARGE_INTEGER, LARGE_INTEGER,
    938938                                           LARGE_INTEGER, DWORD, DWORD, HANDLE,
    939939                                           HANDLE, LPVOID);
     
    997997
    998998#define STATUS_SUCCESS                   0x00000000
    999 #define STATUS_WAIT_0                    0x00000000   
    1000 #define STATUS_ABANDONED_WAIT_0          0x00000080   
    1001 #define STATUS_USER_APC                  0x000000C0   
    1002 #define STATUS_TIMEOUT                   0x00000102   
    1003 #define STATUS_PENDING                   0x00000103   
    1004 #define STATUS_GUARD_PAGE_VIOLATION      0x80000001   
    1005 #define STATUS_DATATYPE_MISALIGNMENT     0x80000002   
    1006 #define STATUS_BREAKPOINT                0x80000003   
    1007 #define STATUS_SINGLE_STEP               0x80000004   
     999#define STATUS_WAIT_0                    0x00000000
     1000#define STATUS_ABANDONED_WAIT_0          0x00000080
     1001#define STATUS_USER_APC                  0x000000C0
     1002#define STATUS_TIMEOUT                   0x00000102
     1003#define STATUS_PENDING                   0x00000103
     1004#define STATUS_GUARD_PAGE_VIOLATION      0x80000001
     1005#define STATUS_DATATYPE_MISALIGNMENT     0x80000002
     1006#define STATUS_BREAKPOINT                0x80000003
     1007#define STATUS_SINGLE_STEP               0x80000004
    10081008#define STATUS_BUFFER_OVERFLOW           0x80000005
    1009 #define STATUS_ACCESS_VIOLATION          0xC0000005   
    1010 #define STATUS_IN_PAGE_ERROR             0xC0000006   
     1009#define STATUS_ACCESS_VIOLATION          0xC0000005
     1010#define STATUS_IN_PAGE_ERROR             0xC0000006
    10111011#define STATUS_INVALID_PARAMETER         0xC000000D
    1012 #define STATUS_NO_MEMORY                 0xC0000017   
    1013 #define STATUS_ILLEGAL_INSTRUCTION       0xC000001D   
     1012#define STATUS_NO_MEMORY                 0xC0000017
     1013#define STATUS_ILLEGAL_INSTRUCTION       0xC000001D
    10141014#define STATUS_BUFFER_TOO_SMALL          0xC0000023
    1015 #define STATUS_NONCONTINUABLE_EXCEPTION  0xC0000025   
    1016 #define STATUS_INVALID_DISPOSITION       0xC0000026   
     1015#define STATUS_NONCONTINUABLE_EXCEPTION  0xC0000025
     1016#define STATUS_INVALID_DISPOSITION       0xC0000026
    10171017#define STATUS_UNKNOWN_REVISION          0xC0000058
    10181018#define STATUS_INVALID_SECURITY_DESCR    0xC0000079
    1019 #define STATUS_ARRAY_BOUNDS_EXCEEDED     0xC000008C   
    1020 #define STATUS_FLOAT_DENORMAL_OPERAND    0xC000008D   
    1021 #define STATUS_FLOAT_DIVIDE_BY_ZERO      0xC000008E   
    1022 #define STATUS_FLOAT_INEXACT_RESULT      0xC000008F   
    1023 #define STATUS_FLOAT_INVALID_OPERATION   0xC0000090   
    1024 #define STATUS_FLOAT_OVERFLOW            0xC0000091   
    1025 #define STATUS_FLOAT_STACK_CHECK         0xC0000092   
    1026 #define STATUS_FLOAT_UNDERFLOW           0xC0000093   
    1027 #define STATUS_INTEGER_DIVIDE_BY_ZERO    0xC0000094   
    1028 #define STATUS_INTEGER_OVERFLOW          0xC0000095   
    1029 #define STATUS_PRIVILEGED_INSTRUCTION    0xC0000096   
     1019#define STATUS_ARRAY_BOUNDS_EXCEEDED     0xC000008C
     1020#define STATUS_FLOAT_DENORMAL_OPERAND    0xC000008D
     1021#define STATUS_FLOAT_DIVIDE_BY_ZERO      0xC000008E
     1022#define STATUS_FLOAT_INEXACT_RESULT      0xC000008F
     1023#define STATUS_FLOAT_INVALID_OPERATION   0xC0000090
     1024#define STATUS_FLOAT_OVERFLOW            0xC0000091
     1025#define STATUS_FLOAT_STACK_CHECK         0xC0000092
     1026#define STATUS_FLOAT_UNDERFLOW           0xC0000093
     1027#define STATUS_INTEGER_DIVIDE_BY_ZERO    0xC0000094
     1028#define STATUS_INTEGER_OVERFLOW          0xC0000095
     1029#define STATUS_PRIVILEGED_INSTRUCTION    0xC0000096
    10301030#define STATUS_INVALID_PARAMETER_2       0xC00000F0
    1031 #define STATUS_STACK_OVERFLOW            0xC00000FD   
    1032 #define STATUS_CONTROL_C_EXIT            0xC000013A   
     1031#define STATUS_STACK_OVERFLOW            0xC00000FD
     1032#define STATUS_CONTROL_C_EXIT            0xC000013A
    10331033
    10341034#define DUPLICATE_CLOSE_SOURCE          0x00000001
     
    10491049#define THREAD_PRIORITY_IDLE            THREAD_BASE_PRIORITY_IDLE
    10501050
    1051 typedef struct 
     1051typedef struct
    10521052{
    10531053  int type;
    10541054} wine_exception;
    10551055
    1056 typedef struct 
     1056typedef struct
    10571057{
    10581058  int pad[39];
     
    12281228        DWORD   WriteTotalTimeoutConstant;
    12291229} COMMTIMEOUTS,*LPCOMMTIMEOUTS;
    1230  
     1230
    12311231typedef struct _COMMCONFIG {
    12321232    DWORD dwSize;
     
    12571257BOOL      WINAPI TransmitCommChar(INT,CHAR);
    12581258
    1259  
     1259
    12601260/*DWORD WINAPI GetVersion( void );*/
    12611261BOOL16 WINAPI GetVersionEx16(OSVERSIONINFO16*);
     
    12781278BOOL    WINAPI TerminateProcess(HANDLE,DWORD);
    12791279BOOL    WINAPI TerminateThread(HANDLE,DWORD);
    1280 BOOL    WINAPI GetExitCodeThread(HANDLE,LPDWORD); 
     1280BOOL    WINAPI GetExitCodeThread(HANDLE,LPDWORD);
    12811281
    12821282/* GetBinaryType return values.
     
    13121312HANDLE    WINAPI CreateEventA(LPSECURITY_ATTRIBUTES,BOOL,BOOL,LPCSTR);
    13131313HANDLE    WINAPI CreateEventW(LPSECURITY_ATTRIBUTES,BOOL,BOOL,LPCWSTR);
    1314 #define     CreateEvent WINELIB_NAME_AW(CreateEvent)
    13151314HFILE     WINAPI CreateFileA(LPCSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES,
    13161315                                 DWORD,DWORD,HANDLE);
     
    14771476HANDLE    WINAPI OpenEventA(DWORD,BOOL,LPCSTR);
    14781477HANDLE    WINAPI OpenEventW(DWORD,BOOL,LPCWSTR);
    1479 #define     OpenEvent WINELIB_NAME_AW(OpenEvent)
    14801478HANDLE    WINAPI OpenFileMappingA(DWORD,BOOL,LPCSTR);
    14811479HANDLE    WINAPI OpenFileMappingW(DWORD,BOOL,LPCWSTR);
    1482 #define     OpenFileMapping WINELIB_NAME_AW(OpenFileMapping)
    14831480HANDLE    WINAPI OpenMutexA(DWORD,BOOL,LPCSTR);
    14841481HANDLE    WINAPI OpenMutexW(DWORD,BOOL,LPCWSTR);
    1485 #define     OpenMutex WINELIB_NAME_AW(OpenMutex)
    14861482HANDLE    WINAPI OpenProcess(DWORD,BOOL,DWORD);
    14871483HANDLE    WINAPI OpenSemaphoreA(DWORD,BOOL,LPCSTR);
    14881484HANDLE    WINAPI OpenSemaphoreW(DWORD,BOOL,LPCWSTR);
    1489 #define     OpenSemaphore WINELIB_NAME_AW(OpenSemaphore)
    14901485BOOL      WINAPI PulseEvent(HANDLE);
    14911486BOOL      WINAPI PurgeComm(HANDLE,DWORD);
    14921487DWORD       WINAPI QueryDosDeviceA(LPCSTR,LPSTR,DWORD);
    14931488DWORD       WINAPI QueryDosDeviceW(LPCWSTR,LPWSTR,DWORD);
    1494 #define     QueryDosDevice WINELIB_NAME_AW(QueryDosDevice)
    14951489BOOL      WINAPI QueryPerformanceCounter(PLARGE_INTEGER);
    14961490BOOL      WINAPI ReadConsoleA(HANDLE,LPVOID,DWORD,LPDWORD,LPVOID);
    14971491BOOL      WINAPI ReadConsoleW(HANDLE,LPVOID,DWORD,LPDWORD,LPVOID);
    1498 #define     ReadConsole WINELIB_NAME_AW(ReadConsole)
    14991492BOOL      WINAPI ReadConsoleOutputCharacterA(HANDLE,LPSTR,DWORD,
    15001493                                                 COORD,LPDWORD);
    1501 #define     ReadConsoleOutputCharacter WINELIB_NAME_AW(ReadConsoleOutputCharacter)
    15021494BOOL      WINAPI ReadFile(HANDLE,LPVOID,DWORD,LPDWORD,LPOVERLAPPED);
    15031495BOOL      WINAPI ReleaseMutex(HANDLE);
  • trunk/include/win/windef.h

    r13 r278  
    1 /* $Id: windef.h,v 1.2 1999-05-31 17:04:19 phaller Exp $ */
     1/* $Id: windef.h,v 1.3 1999-07-06 15:48:44 phaller Exp $ */
    22
    33/*
     
    9797#endif
    9898
    99 #ifndef pascal 
     99#ifndef pascal
    100100  #define pascal      __stdcall
    101101#endif
     
    468468/* Macros to access unaligned or wrong-endian WORDs and DWORDs. */
    469469/* Note: These macros are semantically broken, at least for wrc.  wrc
    470    spits out data in the platform's current binary format, *not* in 
     470   spits out data in the platform's current binary format, *not* in
    471471   little-endian format.  These macros are used throughout the resource
    472    code to load and store data to the resources.  Since it is unlikely 
    473    that we'll ever be dealing with little-endian resource data, the 
    474    byte-swapping nature of these macros has been disabled.  Rather than 
     472   code to load and store data to the resources.  Since it is unlikely
     473   that we'll ever be dealing with little-endian resource data, the
     474   byte-swapping nature of these macros has been disabled.  Rather than
    475475   remove the use of these macros from the resource loading code, the
    476    macros have simply been disabled.  In the future, someone may want 
     476   macros have simply been disabled.  In the future, someone may want
    477477   to reactivate these macros for other purposes.  In that case, the
    478    resource code will have to be modified to use different macros. */ 
     478   resource code will have to be modified to use different macros. */
    479479
    480480#if 1
     
    618618{
    619619    LONG left;
    620     LONG top; 
     620    LONG top;
    621621    LONG right;
    622622    LONG bottom;
  • trunk/src/NTDLL/sec.cpp

    r97 r278  
    1 /* $Id: sec.cpp,v 1.2 1999-06-10 17:06:46 phaller Exp $ */
     1/* $Id: sec.cpp,v 1.3 1999-07-06 15:48:45 phaller Exp $ */
    22
    33/*
     
    305305    return STATUS_UNKNOWN_REVISION ;
    306306
    307   if ( (*lpbDaclPresent = (SE_DACL_PRESENT & pSecurityDescriptor->Control) ? 1 : 0) )
     307  *lpbDaclPresent = (SE_DACL_PRESENT & pSecurityDescriptor->Control);
     308  if (*lpbDaclPresent ? 1 : 0)
    308309  {
    309310    if ( SE_SELF_RELATIVE & pSecurityDescriptor->Control)
     
    378379    return STATUS_UNKNOWN_REVISION ;
    379380
    380   if ( (*lpbSaclPresent = (SE_SACL_PRESENT & pSecurityDescriptor->Control) ? 1 : 0) )
     381  *lpbSaclPresent = (SE_SACL_PRESENT & pSecurityDescriptor->Control);
     382  if (*lpbSaclPresent ? 1 : 0)
    381383  {
    382384    if ( SE_SELF_RELATIVE & pSecurityDescriptor->Control)
  • trunk/src/kernel32/HandleManager.cpp

    r271 r278  
    1 /* $Id: HandleManager.cpp,v 1.5 1999-07-05 09:58:14 phaller Exp $ */
     1/* $Id: HandleManager.cpp,v 1.6 1999-07-06 15:48:45 phaller Exp $ */
    22
    33/*
     
    5252#include "HMDevice.h"
    5353#include "HMOpen32.h"
     54#include "HMEvent.h"
     55#include "HMMutex.h"
     56#include "HMSemaphore.h"
    5457
    5558
     
    5962
    6063                    /* this is the size of our currently static handle table */
    61 #define MAX_OS2_HMHANDLES 1024
     64#define MAX_OS2_HMHANDLES 2048
    6265
    6366
     
    8386
    8487
    85 typedef struct _HMTRANSHANDLE
    86 {
    87 /* @@@PH
    88    UCHAR ucSubsystemID; to determine "lost" handles
    89  */
    90   /* the index position in the array is the 16bit windows part of the handle */
    91   ULONG hHandle32;                         /* 32-bit OS/2 part of the handle */
    92 } HMTRANSHANDLE, *PHMTRANSHANDLE;
    93 
    94 
    9588/*****************************************************************************
    9689 * This pseudo-device logs all device requests to the logfile and returns    *
     
    123116                                         /* this MUST !!! be false initially */
    124117
    125   HMDeviceHandler *pHMOpen32;             /* default handle manager instance */
     118  HMDeviceHandler        *pHMOpen32;      /* default handle manager instance */
     119  HMDeviceHandler        *pHMEvent;        /* static instances of subsystems */
     120  HMDeviceHandler        *pHMMutex;
     121  HMDeviceHandler        *pHMSemaphore;
    126122
    127123  ULONG         ulHandleLast;                   /* index of last used handle */
     
    312308
    313309                        /* create handle manager instance for Open32 handles */
    314     HMGlobals.pHMOpen32 = new HMDeviceOpen32Class("\\\\.\\");
     310    HMGlobals.pHMOpen32     = new HMDeviceOpen32Class("\\\\.\\");
     311    HMGlobals.pHMEvent      = new HMDeviceEventClass("\\\\EVENT\\");
     312    HMGlobals.pHMMutex      = new HMDeviceMutexClass("\\\\MUTEX\\");
     313    HMGlobals.pHMSemaphore  = new HMDeviceSemaphoreClass("\\\\SEM\\");
    315314  }
    316315  return (NO_ERROR);
     
    333332{
    334333  /* @@@PH we could deallocate the device list here */
     334
     335  delete HMGlobals.pHMOpen32;
     336  delete HMGlobals.pHMEvent;
     337  delete HMGlobals.pHMMutex;
     338  delete HMGlobals.pHMSemaphore;
    335339
    336340  return (NO_ERROR);
     
    357361 * Remark    : no parameter checking is done, phHandle may not be invalid
    358362 *             hHandle32 shouldn't be 0
     363 *             Should be protected with a HM-Mutex !
    359364 * Status    :
    360365 *
     
    546551 *****************************************************************************/
    547552
    548 DWORD  HMHandleTranslateToOS2i (ULONG  hHandle16)
     553DWORD HMHandleTranslateToOS2i (ULONG  hHandle16)
    549554{
    550555#ifdef DEBUG_LOCAL
     
    922927 * Author    : Patrick Haller [Wed, 1998/02/11 20:44]
    923928 *****************************************************************************/
     929
    924930BOOL HMReadFile(HANDLE       hFile,
    925931                LPVOID       lpBuffer,
     
    10381044 * Author    : Patrick Haller [Wed, 1998/02/11 20:44]
    10391045 *****************************************************************************/
     1046
    10401047DWORD   HMDeviceRequest (HANDLE hFile,
    10411048                         ULONG  ulRequestCode,
     
    10801087 * Author    : Patrick Haller [Wed, 1999/06/17 20:44]
    10811088 *****************************************************************************/
    1082 DWORD HMGetFileInformationByHandle (HANDLE                     hFile,
    1083                                     BY_HANDLE_FILE_INFORMATION *pHFI)
     1089
     1090BOOL HMGetFileInformationByHandle (HANDLE                     hFile,
     1091                                   BY_HANDLE_FILE_INFORMATION *pHFI)
    10841092{
    10851093  int       iIndex;                           /* index into the handle table */
     
    11031111
    11041112
    1105 
    11061113/*****************************************************************************
    11071114 * Name      : HMDeviceHandler::SetEndOfFile
     
    11151122 * Author    : Patrick Haller [Wed, 1999/06/17 20:44]
    11161123 *****************************************************************************/
     1124
    11171125BOOL HMSetEndOfFile (HANDLE hFile)
    11181126{
     
    11471155 * Author    : Patrick Haller [Wed, 1999/06/17 20:44]
    11481156 *****************************************************************************/
     1157
    11491158BOOL HMSetFileTime (HANDLE         hFile,
    11501159                    const FILETIME *pFT1,
     
    11851194 * Author    : Patrick Haller [Wed, 1999/06/17 20:44]
    11861195 *****************************************************************************/
     1196
    11871197DWORD HMGetFileSize (HANDLE hFile,
    11881198                     PDWORD pSize)
     
    12191229 * Author    : Patrick Haller [Wed, 1999/06/17 20:44]
    12201230 *****************************************************************************/
     1231
    12211232DWORD HMSetFilePointer (HANDLE hFile,
    12221233                        LONG   lDistanceToMove,
     
    12571268 * Author    : Patrick Haller [Wed, 1999/06/17 20:44]
    12581269 *****************************************************************************/
     1270
    12591271BOOL HMLockFile (HFILE         hFile,
    12601272                 DWORD         arg2,
     
    12971309 * Author    : Patrick Haller [Wed, 1999/06/17 20:44]
    12981310 *****************************************************************************/
    1299 DWORD HMLockFileEx(HANDLE        hFile,
    1300                    DWORD         dwFlags,
    1301                    DWORD         dwReserved,
    1302                    DWORD         nNumberOfBytesToLockLow,
    1303                    DWORD         nNumberOfBytesToLockHigh,
    1304                    LPOVERLAPPED  lpOverlapped)
     1311
     1312BOOL HMLockFileEx(HANDLE        hFile,
     1313                  DWORD         dwFlags,
     1314                  DWORD         dwReserved,
     1315                  DWORD         nNumberOfBytesToLockLow,
     1316                  DWORD         nNumberOfBytesToLockHigh,
     1317                  LPOVERLAPPED  lpOverlapped)
    13051318{
    13061319  int       iIndex;                           /* index into the handle table */
     
    13401353 * Author    : Patrick Haller [Wed, 1999/06/17 20:44]
    13411354 *****************************************************************************/
     1355
    13421356BOOL HMUnlockFile (HFILE         hFile,
    13431357                   DWORD         arg2,
     
    13681382}
    13691383
     1384
    13701385/*****************************************************************************
    13711386 * Name      : HMDeviceHandler::UnlockFileEx
     
    13791394 * Author    : Patrick Haller [Wed, 1999/06/17 20:44]
    13801395 *****************************************************************************/
     1396
    13811397BOOL HMUnlockFileEx(HANDLE        hFile,
    13821398                    DWORD         dwFlags,
     
    14091425}
    14101426
     1427
     1428/*****************************************************************************
     1429 * Name      : HMDeviceHandler::WaitForSingleObject
     1430 * Purpose   : router function for WaitForSingleObject
     1431 * Parameters:
     1432 * Variables :
     1433 * Result    :
     1434 * Remark    :
     1435 * Status    :
     1436 *
     1437 * Author    : Patrick Haller [Wed, 1999/06/17 20:44]
     1438 *****************************************************************************/
     1439
     1440DWORD HMWaitForSingleObject(HANDLE hObject,
     1441                            DWORD  dwTimeout)
     1442{
     1443  int       iIndex;                           /* index into the handle table */
     1444  DWORD     dwResult;                /* result from the device handler's API */
     1445  PHMHANDLE pHMHandle;       /* pointer to the handle structure in the table */
     1446
     1447                                                          /* validate handle */
     1448  iIndex = _HMHandleQuery(hObject);                         /* get the index */
     1449  if (-1 == iIndex)                                               /* error ? */
     1450  {
     1451    SetLastError(ERROR_INVALID_HANDLE);       /* set win32 error information */
     1452    return (INVALID_HANDLE_ERROR);                         /* signal failure */
     1453  }
     1454
     1455  pHMHandle = &TabWin32Handles[iIndex];               /* call device handler */
     1456  dwResult = pHMHandle->pDeviceHandler->WaitForSingleObject(&pHMHandle->hmHandleData,
     1457                                                            dwTimeout);
     1458
     1459  return (dwResult);                                  /* deliver return code */
     1460}
     1461
     1462
     1463/*****************************************************************************
     1464 * Name      : HMDeviceHandler::WaitForSingleObjectEx
     1465 * Purpose   : router function for WaitForSingleObjectEx
     1466 * Parameters:
     1467 * Variables :
     1468 * Result    :
     1469 * Remark    :
     1470 * Status    :
     1471 *
     1472 * Author    : Patrick Haller [Wed, 1999/06/17 20:44]
     1473 *****************************************************************************/
     1474
     1475DWORD HMWaitForSingleObjectEx(HANDLE hObject,
     1476                              DWORD  dwTimeout,
     1477                              BOOL   fAlertable)
     1478{
     1479  int       iIndex;                           /* index into the handle table */
     1480  DWORD     dwResult;                /* result from the device handler's API */
     1481  PHMHANDLE pHMHandle;       /* pointer to the handle structure in the table */
     1482
     1483                                                          /* validate handle */
     1484  iIndex = _HMHandleQuery(hObject);                         /* get the index */
     1485  if (-1 == iIndex)                                               /* error ? */
     1486  {
     1487    SetLastError(ERROR_INVALID_HANDLE);       /* set win32 error information */
     1488    return (INVALID_HANDLE_ERROR);                         /* signal failure */
     1489  }
     1490
     1491  pHMHandle = &TabWin32Handles[iIndex];               /* call device handler */
     1492  dwResult = pHMHandle->pDeviceHandler->WaitForSingleObjectEx(&pHMHandle->hmHandleData,
     1493                                                              dwTimeout,
     1494                                                              fAlertable);
     1495
     1496  return (dwResult);                                  /* deliver return code */
     1497}
     1498
     1499
     1500/*****************************************************************************
     1501 * Name      : HMDeviceHandler::FlushFileBuffers
     1502 * Purpose   : router function for FlushFileBuffers
     1503 * Parameters:
     1504 * Variables :
     1505 * Result    :
     1506 * Remark    :
     1507 * Status    :
     1508 *
     1509 * Author    : Patrick Haller [Wed, 1999/06/17 20:44]
     1510 *****************************************************************************/
     1511
     1512BOOL HMFlushFileBuffers(HANDLE hFile)
     1513{
     1514  int       iIndex;                           /* index into the handle table */
     1515  DWORD     dwResult;                /* result from the device handler's API */
     1516  PHMHANDLE pHMHandle;       /* pointer to the handle structure in the table */
     1517
     1518                                                          /* validate handle */
     1519  iIndex = _HMHandleQuery(hFile);                           /* get the index */
     1520  if (-1 == iIndex)                                               /* error ? */
     1521  {
     1522    SetLastError(ERROR_INVALID_HANDLE);       /* set win32 error information */
     1523    return (INVALID_HANDLE_ERROR);                         /* signal failure */
     1524  }
     1525
     1526  pHMHandle = &TabWin32Handles[iIndex];               /* call device handler */
     1527  dwResult = pHMHandle->pDeviceHandler->FlushFileBuffers(&pHMHandle->hmHandleData);
     1528
     1529  return (dwResult);                                  /* deliver return code */
     1530}
     1531
     1532
     1533/*****************************************************************************
     1534 * Name      : HMDeviceHandler::GetOverlappedResult
     1535 * Purpose   : router function for GetOverlappedResult
     1536 * Parameters:
     1537 * Variables :
     1538 * Result    :
     1539 * Remark    :
     1540 * Status    :
     1541 *
     1542 * Author    : Patrick Haller [Wed, 1999/06/17 20:44]
     1543 *****************************************************************************/
     1544
     1545BOOL HMGetOverlappedResult(HANDLE       hObject,
     1546                           LPOVERLAPPED lpOverlapped,
     1547                           LPDWORD      arg3,
     1548                           BOOL         arg4)
     1549{
     1550  int       iIndex;                           /* index into the handle table */
     1551  DWORD     dwResult;                /* result from the device handler's API */
     1552  PHMHANDLE pHMHandle;       /* pointer to the handle structure in the table */
     1553
     1554                                                          /* validate handle */
     1555  iIndex = _HMHandleQuery(hObject);                         /* get the index */
     1556  if (-1 == iIndex)                                               /* error ? */
     1557  {
     1558    SetLastError(ERROR_INVALID_HANDLE);       /* set win32 error information */
     1559    return (INVALID_HANDLE_ERROR);                         /* signal failure */
     1560  }
     1561
     1562  pHMHandle = &TabWin32Handles[iIndex];               /* call device handler */
     1563  dwResult = pHMHandle->pDeviceHandler->GetOverlappedResult(&pHMHandle->hmHandleData,
     1564                                                            lpOverlapped,
     1565                                                            arg3,
     1566                                                            arg4);
     1567
     1568  return (dwResult);                                  /* deliver return code */
     1569}
     1570
     1571
     1572/*****************************************************************************
     1573 * Name      : HMReleaseMutex
     1574 * Purpose   : router function for ReleaseMutex
     1575 * Parameters:
     1576 * Variables :
     1577 * Result    :
     1578 * Remark    :
     1579 * Status    :
     1580 *
     1581 * Author    : Patrick Haller [Wed, 1999/06/17 20:44]
     1582 *****************************************************************************/
     1583
     1584BOOL HMReleaseMutex(HANDLE hObject)
     1585{
     1586  int       iIndex;                           /* index into the handle table */
     1587  DWORD     dwResult;                /* result from the device handler's API */
     1588  PHMHANDLE pHMHandle;       /* pointer to the handle structure in the table */
     1589
     1590                                                          /* validate handle */
     1591  iIndex = _HMHandleQuery(hObject);                         /* get the index */
     1592  if (-1 == iIndex)                                               /* error ? */
     1593  {
     1594    SetLastError(ERROR_INVALID_HANDLE);       /* set win32 error information */
     1595    return (INVALID_HANDLE_ERROR);                         /* signal failure */
     1596  }
     1597
     1598  pHMHandle = &TabWin32Handles[iIndex];               /* call device handler */
     1599  dwResult = pHMHandle->pDeviceHandler->ReleaseMutex(&pHMHandle->hmHandleData);
     1600
     1601  return (dwResult);                                  /* deliver return code */
     1602}
     1603
     1604
     1605/*****************************************************************************
     1606 * Name      : HMSetEvent
     1607 * Purpose   : router function for SetEvent
     1608 * Parameters:
     1609 * Variables :
     1610 * Result    :
     1611 * Remark    :
     1612 * Status    :
     1613 *
     1614 * Author    : Patrick Haller [Wed, 1999/06/17 20:44]
     1615 *****************************************************************************/
     1616
     1617BOOL HMSetEvent(HANDLE hEvent)
     1618{
     1619  int       iIndex;                           /* index into the handle table */
     1620  DWORD     dwResult;                /* result from the device handler's API */
     1621  PHMHANDLE pHMHandle;       /* pointer to the handle structure in the table */
     1622
     1623                                                          /* validate handle */
     1624  iIndex = _HMHandleQuery(hEvent);                          /* get the index */
     1625  if (-1 == iIndex)                                               /* error ? */
     1626  {
     1627    SetLastError(ERROR_INVALID_HANDLE);       /* set win32 error information */
     1628    return (INVALID_HANDLE_ERROR);                         /* signal failure */
     1629  }
     1630
     1631  pHMHandle = &TabWin32Handles[iIndex];               /* call device handler */
     1632  dwResult = pHMHandle->pDeviceHandler->SetEvent(&pHMHandle->hmHandleData);
     1633
     1634  return (dwResult);                                  /* deliver return code */
     1635}
     1636
     1637
     1638/*****************************************************************************
     1639 * Name      : HMPulseEvent
     1640 * Purpose   : router function for PulseEvent
     1641 * Parameters:
     1642 * Variables :
     1643 * Result    :
     1644 * Remark    :
     1645 * Status    :
     1646 *
     1647 * Author    : Patrick Haller [Wed, 1999/06/17 20:44]
     1648 *****************************************************************************/
     1649
     1650BOOL HMPulseEvent(HANDLE hEvent)
     1651{
     1652  int       iIndex;                           /* index into the handle table */
     1653  DWORD     dwResult;                /* result from the device handler's API */
     1654  PHMHANDLE pHMHandle;       /* pointer to the handle structure in the table */
     1655
     1656                                                          /* validate handle */
     1657  iIndex = _HMHandleQuery(hEvent);                          /* get the index */
     1658  if (-1 == iIndex)                                               /* error ? */
     1659  {
     1660    SetLastError(ERROR_INVALID_HANDLE);       /* set win32 error information */
     1661    return (INVALID_HANDLE_ERROR);                         /* signal failure */
     1662  }
     1663
     1664  pHMHandle = &TabWin32Handles[iIndex];               /* call device handler */
     1665  dwResult = pHMHandle->pDeviceHandler->PulseEvent(&pHMHandle->hmHandleData);
     1666
     1667  return (dwResult);                                  /* deliver return code */
     1668}
     1669
     1670
     1671/*****************************************************************************
     1672 * Name      : HMResetEvent
     1673 * Purpose   : router function for ResetEvent
     1674 * Parameters:
     1675 * Variables :
     1676 * Result    :
     1677 * Remark    :
     1678 * Status    :
     1679 *
     1680 * Author    : Patrick Haller [Wed, 1999/06/17 20:44]
     1681 *****************************************************************************/
     1682
     1683BOOL HMResetEvent(HANDLE hEvent)
     1684{
     1685  int       iIndex;                           /* index into the handle table */
     1686  DWORD     dwResult;                /* result from the device handler's API */
     1687  PHMHANDLE pHMHandle;       /* pointer to the handle structure in the table */
     1688
     1689                                                          /* validate handle */
     1690  iIndex = _HMHandleQuery(hEvent);                          /* get the index */
     1691  if (-1 == iIndex)                                               /* error ? */
     1692  {
     1693    SetLastError(ERROR_INVALID_HANDLE);       /* set win32 error information */
     1694    return (INVALID_HANDLE_ERROR);                         /* signal failure */
     1695  }
     1696
     1697  pHMHandle = &TabWin32Handles[iIndex];               /* call device handler */
     1698  dwResult = pHMHandle->pDeviceHandler->ResetEvent(&pHMHandle->hmHandleData);
     1699
     1700  return (dwResult);                                  /* deliver return code */
     1701}
     1702
     1703
     1704/*****************************************************************************
     1705 * Name      : HANDLE  HMCreateEvent
     1706 * Purpose   : Wrapper for the CreateEvent() API
     1707 * Parameters:
     1708 * Variables :
     1709 * Result    :
     1710 * Remark    :
     1711 * Status    :
     1712 *
     1713 * Author    : Patrick Haller [Wed, 1998/02/11 20:44]
     1714 *****************************************************************************/
     1715
     1716HANDLE HMCreateEvent(LPSECURITY_ATTRIBUTES lpsa,
     1717                     BOOL                  bManualReset,
     1718                     BOOL                  bInitialState,
     1719                     LPCTSTR               lpName)
     1720{
     1721  int             iIndex;                     /* index into the handle table */
     1722  int             iIndexNew;                  /* index into the handle table */
     1723  HMDeviceHandler *pDeviceHandler;         /* device handler for this handle */
     1724  PHMHANDLEDATA   pHMHandleData;
     1725  DWORD           rc;                                     /* API return code */
     1726
     1727
     1728  pDeviceHandler = HMGlobals.pHMEvent;               /* device is predefined */
     1729
     1730  iIndexNew = _HMHandleGetFree();                         /* get free handle */
     1731  if (-1 == iIndexNew)                            /* oops, no free handles ! */
     1732  {
     1733    SetLastError(ERROR_NOT_ENOUGH_MEMORY);      /* use this as error message */
     1734    return (INVALID_HANDLE_VALUE);                           /* signal error */
     1735  }
     1736
     1737
     1738                           /* initialize the complete HMHANDLEDATA structure */
     1739  pHMHandleData = &TabWin32Handles[iIndexNew].hmHandleData;
     1740  pHMHandleData->dwType     = FILE_TYPE_UNKNOWN;      /* unknown handle type */
     1741  pHMHandleData->dwAccess   = 0;
     1742  pHMHandleData->dwShare    = 0;
     1743  pHMHandleData->dwCreation = 0;
     1744  pHMHandleData->dwFlags    = 0;
     1745  pHMHandleData->lpHandlerData = NULL;
     1746
     1747
     1748      /* we've got to mark the handle as occupied here, since another device */
     1749                   /* could be created within the device handler -> deadlock */
     1750
     1751          /* write appropriate entry into the handle table if open succeeded */
     1752  TabWin32Handles[iIndexNew].hmHandleData.hHMHandle = iIndexNew;
     1753  TabWin32Handles[iIndexNew].pDeviceHandler         = pDeviceHandler;
     1754
     1755                                                  /* call the device handler */
     1756  rc = pDeviceHandler->CreateEvent(&TabWin32Handles[iIndexNew].hmHandleData,
     1757                                   lpsa,
     1758                                   bManualReset,
     1759                                   bInitialState,
     1760                                   lpName);
     1761  if (rc != NO_ERROR)     /* oops, creation failed within the device handler */
     1762  {
     1763    TabWin32Handles[iIndexNew].hmHandleData.hHMHandle = INVALID_HANDLE_VALUE;
     1764    SetLastError(rc);          /* Hehe, OS/2 and NT are pretty compatible :) */
     1765    return (INVALID_HANDLE_VALUE);                           /* signal error */
     1766  }
     1767
     1768  return iIndexNew;                                   /* return valid handle */
     1769}
     1770
     1771
     1772/*****************************************************************************
     1773 * Name      : HANDLE  HMCreateMutex
     1774 * Purpose   : Wrapper for the CreateMutex() API
     1775 * Parameters:
     1776 * Variables :
     1777 * Result    :
     1778 * Remark    :
     1779 * Status    :
     1780 *
     1781 * Author    : Patrick Haller [Wed, 1998/02/11 20:44]
     1782 *****************************************************************************/
     1783
     1784HANDLE HMCreateMutex(LPSECURITY_ATTRIBUTES lpsa,
     1785                     BOOL                  bInitialOwner,
     1786                     LPCTSTR               lpName)
     1787{
     1788  int             iIndex;                     /* index into the handle table */
     1789  int             iIndexNew;                  /* index into the handle table */
     1790  HMDeviceHandler *pDeviceHandler;         /* device handler for this handle */
     1791  PHMHANDLEDATA   pHMHandleData;
     1792  DWORD           rc;                                     /* API return code */
     1793
     1794
     1795  pDeviceHandler = HMGlobals.pHMMutex;               /* device is predefined */
     1796
     1797  iIndexNew = _HMHandleGetFree();                         /* get free handle */
     1798  if (-1 == iIndexNew)                            /* oops, no free handles ! */
     1799  {
     1800    SetLastError(ERROR_NOT_ENOUGH_MEMORY);      /* use this as error message */
     1801    return (INVALID_HANDLE_VALUE);                           /* signal error */
     1802  }
     1803
     1804
     1805                           /* initialize the complete HMHANDLEDATA structure */
     1806  pHMHandleData = &TabWin32Handles[iIndexNew].hmHandleData;
     1807  pHMHandleData->dwType     = FILE_TYPE_UNKNOWN;      /* unknown handle type */
     1808  pHMHandleData->dwAccess   = 0;
     1809  pHMHandleData->dwShare    = 0;
     1810  pHMHandleData->dwCreation = 0;
     1811  pHMHandleData->dwFlags    = 0;
     1812  pHMHandleData->lpHandlerData = NULL;
     1813
     1814
     1815      /* we've got to mark the handle as occupied here, since another device */
     1816                   /* could be created within the device handler -> deadlock */
     1817
     1818          /* write appropriate entry into the handle table if open succeeded */
     1819  TabWin32Handles[iIndexNew].hmHandleData.hHMHandle = iIndexNew;
     1820  TabWin32Handles[iIndexNew].pDeviceHandler         = pDeviceHandler;
     1821
     1822                                                  /* call the device handler */
     1823  rc = pDeviceHandler->CreateMutex(&TabWin32Handles[iIndexNew].hmHandleData,
     1824                                   lpsa,
     1825                                   bInitialOwner,
     1826                                   lpName);
     1827  if (rc != NO_ERROR)     /* oops, creation failed within the device handler */
     1828  {
     1829    TabWin32Handles[iIndexNew].hmHandleData.hHMHandle = INVALID_HANDLE_VALUE;
     1830    SetLastError(rc);          /* Hehe, OS/2 and NT are pretty compatible :) */
     1831    return (INVALID_HANDLE_VALUE);                           /* signal error */
     1832  }
     1833
     1834  return iIndexNew;                                   /* return valid handle */
     1835}
     1836
     1837
     1838/*****************************************************************************
     1839 * Name      : HANDLE  HMOpenEvent
     1840 * Purpose   : Wrapper for the OpenEvent() API
     1841 * Parameters:
     1842 * Variables :
     1843 * Result    :
     1844 * Remark    :
     1845 * Status    :
     1846 *
     1847 * Author    : Patrick Haller [Wed, 1998/02/11 20:44]
     1848 *****************************************************************************/
     1849
     1850HANDLE HMOpenEvent(DWORD   fdwAccess,
     1851                   BOOL    fInherit,
     1852                   LPCTSTR lpName)
     1853{
     1854  int             iIndex;                     /* index into the handle table */
     1855  int             iIndexNew;                  /* index into the handle table */
     1856  HMDeviceHandler *pDeviceHandler;         /* device handler for this handle */
     1857  PHMHANDLEDATA   pHMHandleData;
     1858  DWORD           rc;                                     /* API return code */
     1859
     1860
     1861  pDeviceHandler = HMGlobals.pHMEvent;               /* device is predefined */
     1862
     1863  iIndexNew = _HMHandleGetFree();                         /* get free handle */
     1864  if (-1 == iIndexNew)                            /* oops, no free handles ! */
     1865  {
     1866    SetLastError(ERROR_NOT_ENOUGH_MEMORY);      /* use this as error message */
     1867    return (INVALID_HANDLE_VALUE);                           /* signal error */
     1868  }
     1869
     1870
     1871                           /* initialize the complete HMHANDLEDATA structure */
     1872  pHMHandleData = &TabWin32Handles[iIndexNew].hmHandleData;
     1873  pHMHandleData->dwType     = FILE_TYPE_UNKNOWN;      /* unknown handle type */
     1874  pHMHandleData->dwAccess   = fdwAccess;
     1875  pHMHandleData->dwShare    = 0;
     1876  pHMHandleData->dwCreation = 0;
     1877  pHMHandleData->dwFlags    = 0;
     1878  pHMHandleData->lpHandlerData = NULL;
     1879
     1880
     1881      /* we've got to mark the handle as occupied here, since another device */
     1882                   /* could be created within the device handler -> deadlock */
     1883
     1884          /* write appropriate entry into the handle table if open succeeded */
     1885  TabWin32Handles[iIndexNew].hmHandleData.hHMHandle = iIndexNew;
     1886  TabWin32Handles[iIndexNew].pDeviceHandler         = pDeviceHandler;
     1887
     1888                                                  /* call the device handler */
     1889  rc = pDeviceHandler->OpenEvent(&TabWin32Handles[iIndexNew].hmHandleData,
     1890                                 fInherit,
     1891                                 lpName);
     1892  if (rc != NO_ERROR)     /* oops, creation failed within the device handler */
     1893  {
     1894    TabWin32Handles[iIndexNew].hmHandleData.hHMHandle = INVALID_HANDLE_VALUE;
     1895    SetLastError(rc);          /* Hehe, OS/2 and NT are pretty compatible :) */
     1896    return (INVALID_HANDLE_VALUE);                           /* signal error */
     1897  }
     1898
     1899  return iIndexNew;                                   /* return valid handle */
     1900}
     1901
     1902
     1903/*****************************************************************************
     1904 * Name      : HANDLE  HMOpenMutex
     1905 * Purpose   : Wrapper for the OpenMutex() API
     1906 * Parameters:
     1907 * Variables :
     1908 * Result    :
     1909 * Remark    :
     1910 * Status    :
     1911 *
     1912 * Author    : Patrick Haller [Wed, 1998/02/11 20:44]
     1913 *****************************************************************************/
     1914
     1915HANDLE HMOpenMutex(DWORD   fdwAccess,
     1916                   BOOL    fInherit,
     1917                   LPCTSTR lpName)
     1918{
     1919  int             iIndex;                     /* index into the handle table */
     1920  int             iIndexNew;                  /* index into the handle table */
     1921  HMDeviceHandler *pDeviceHandler;         /* device handler for this handle */
     1922  PHMHANDLEDATA   pHMHandleData;
     1923  DWORD           rc;                                     /* API return code */
     1924
     1925
     1926  pDeviceHandler = HMGlobals.pHMMutex;               /* device is predefined */
     1927
     1928  iIndexNew = _HMHandleGetFree();                         /* get free handle */
     1929  if (-1 == iIndexNew)                            /* oops, no free handles ! */
     1930  {
     1931    SetLastError(ERROR_NOT_ENOUGH_MEMORY);      /* use this as error message */
     1932    return (INVALID_HANDLE_VALUE);                           /* signal error */
     1933  }
     1934
     1935
     1936                           /* initialize the complete HMHANDLEDATA structure */
     1937  pHMHandleData = &TabWin32Handles[iIndexNew].hmHandleData;
     1938  pHMHandleData->dwType     = FILE_TYPE_UNKNOWN;      /* unknown handle type */
     1939  pHMHandleData->dwAccess   = fdwAccess;
     1940  pHMHandleData->dwShare    = 0;
     1941  pHMHandleData->dwCreation = 0;
     1942  pHMHandleData->dwFlags    = 0;
     1943  pHMHandleData->lpHandlerData = NULL;
     1944
     1945
     1946      /* we've got to mark the handle as occupied here, since another device */
     1947                   /* could be created within the device handler -> deadlock */
     1948
     1949          /* write appropriate entry into the handle table if open succeeded */
     1950  TabWin32Handles[iIndexNew].hmHandleData.hHMHandle = iIndexNew;
     1951  TabWin32Handles[iIndexNew].pDeviceHandler         = pDeviceHandler;
     1952
     1953                                                  /* call the device handler */
     1954  rc = pDeviceHandler->OpenMutex(&TabWin32Handles[iIndexNew].hmHandleData,
     1955                                 fInherit,
     1956                                 lpName);
     1957  if (rc != NO_ERROR)     /* oops, creation failed within the device handler */
     1958  {
     1959    TabWin32Handles[iIndexNew].hmHandleData.hHMHandle = INVALID_HANDLE_VALUE;
     1960    SetLastError(rc);          /* Hehe, OS/2 and NT are pretty compatible :) */
     1961    return (INVALID_HANDLE_VALUE);                           /* signal error */
     1962  }
     1963
     1964  return iIndexNew;                                   /* return valid handle */
     1965}
     1966
     1967
     1968/*****************************************************************************
     1969 * Name      : HANDLE  HMCreateSemaphore
     1970 * Purpose   : Wrapper for the CreateSemaphore() API
     1971 * Parameters:
     1972 * Variables :
     1973 * Result    :
     1974 * Remark    :
     1975 * Status    :
     1976 *
     1977 * Author    : Patrick Haller [Wed, 1998/02/11 20:44]
     1978 *****************************************************************************/
     1979
     1980HANDLE HMCreateSemaphore(LPSECURITY_ATTRIBUTES lpsa,
     1981                         LONG                  lInitialCount,
     1982                         LONG                  lMaximumCount,
     1983                         LPCTSTR               lpName)
     1984{
     1985  int             iIndex;                     /* index into the handle table */
     1986  int             iIndexNew;                  /* index into the handle table */
     1987  HMDeviceHandler *pDeviceHandler;         /* device handler for this handle */
     1988  PHMHANDLEDATA   pHMHandleData;
     1989  DWORD           rc;                                     /* API return code */
     1990
     1991
     1992  pDeviceHandler = HMGlobals.pHMEvent;               /* device is predefined */
     1993
     1994  iIndexNew = _HMHandleGetFree();                         /* get free handle */
     1995  if (-1 == iIndexNew)                            /* oops, no free handles ! */
     1996  {
     1997    SetLastError(ERROR_NOT_ENOUGH_MEMORY);      /* use this as error message */
     1998    return (INVALID_HANDLE_VALUE);                           /* signal error */
     1999  }
     2000
     2001
     2002                           /* initialize the complete HMHANDLEDATA structure */
     2003  pHMHandleData = &TabWin32Handles[iIndexNew].hmHandleData;
     2004  pHMHandleData->dwType     = FILE_TYPE_UNKNOWN;      /* unknown handle type */
     2005  pHMHandleData->dwAccess   = 0;
     2006  pHMHandleData->dwShare    = 0;
     2007  pHMHandleData->dwCreation = 0;
     2008  pHMHandleData->dwFlags    = 0;
     2009  pHMHandleData->lpHandlerData = NULL;
     2010
     2011
     2012      /* we've got to mark the handle as occupied here, since another device */
     2013                   /* could be created within the device handler -> deadlock */
     2014
     2015          /* write appropriate entry into the handle table if open succeeded */
     2016  TabWin32Handles[iIndexNew].hmHandleData.hHMHandle = iIndexNew;
     2017  TabWin32Handles[iIndexNew].pDeviceHandler         = pDeviceHandler;
     2018
     2019                                                  /* call the device handler */
     2020  rc = pDeviceHandler->CreateSemaphore(&TabWin32Handles[iIndexNew].hmHandleData,
     2021                                       lpsa,
     2022                                       lInitialCount,
     2023                                       lMaximumCount,
     2024                                       lpName);
     2025  if (rc != NO_ERROR)     /* oops, creation failed within the device handler */
     2026  {
     2027    TabWin32Handles[iIndexNew].hmHandleData.hHMHandle = INVALID_HANDLE_VALUE;
     2028    SetLastError(rc);          /* Hehe, OS/2 and NT are pretty compatible :) */
     2029    return (INVALID_HANDLE_VALUE);                           /* signal error */
     2030  }
     2031
     2032  return iIndexNew;                                   /* return valid handle */
     2033}
     2034
     2035
     2036/*****************************************************************************
     2037 * Name      : HANDLE  HMOpenSemaphore
     2038 * Purpose   : Wrapper for the OpenSemaphore() API
     2039 * Parameters:
     2040 * Variables :
     2041 * Result    :
     2042 * Remark    :
     2043 * Status    :
     2044 *
     2045 * Author    : Patrick Haller [Wed, 1998/02/11 20:44]
     2046 *****************************************************************************/
     2047
     2048HANDLE HMOpenSemaphore(DWORD   fdwAccess,
     2049                       BOOL    fInherit,
     2050                       LPCTSTR lpName)
     2051{
     2052  int             iIndex;                     /* index into the handle table */
     2053  int             iIndexNew;                  /* index into the handle table */
     2054  HMDeviceHandler *pDeviceHandler;         /* device handler for this handle */
     2055  PHMHANDLEDATA   pHMHandleData;
     2056  DWORD           rc;                                     /* API return code */
     2057
     2058
     2059  pDeviceHandler = HMGlobals.pHMMutex;               /* device is predefined */
     2060
     2061  iIndexNew = _HMHandleGetFree();                         /* get free handle */
     2062  if (-1 == iIndexNew)                            /* oops, no free handles ! */
     2063  {
     2064    SetLastError(ERROR_NOT_ENOUGH_MEMORY);      /* use this as error message */
     2065    return (INVALID_HANDLE_VALUE);                           /* signal error */
     2066  }
     2067
     2068
     2069                           /* initialize the complete HMHANDLEDATA structure */
     2070  pHMHandleData = &TabWin32Handles[iIndexNew].hmHandleData;
     2071  pHMHandleData->dwType     = FILE_TYPE_UNKNOWN;      /* unknown handle type */
     2072  pHMHandleData->dwAccess   = fdwAccess;
     2073  pHMHandleData->dwShare    = 0;
     2074  pHMHandleData->dwCreation = 0;
     2075  pHMHandleData->dwFlags    = 0;
     2076  pHMHandleData->lpHandlerData = NULL;
     2077
     2078
     2079      /* we've got to mark the handle as occupied here, since another device */
     2080                   /* could be created within the device handler -> deadlock */
     2081
     2082          /* write appropriate entry into the handle table if open succeeded */
     2083  TabWin32Handles[iIndexNew].hmHandleData.hHMHandle = iIndexNew;
     2084  TabWin32Handles[iIndexNew].pDeviceHandler         = pDeviceHandler;
     2085
     2086                                                  /* call the device handler */
     2087  rc = pDeviceHandler->OpenSemaphore(&TabWin32Handles[iIndexNew].hmHandleData,
     2088                                     fInherit,
     2089                                     lpName);
     2090  if (rc != NO_ERROR)     /* oops, creation failed within the device handler */
     2091  {
     2092    TabWin32Handles[iIndexNew].hmHandleData.hHMHandle = INVALID_HANDLE_VALUE;
     2093    SetLastError(rc);          /* Hehe, OS/2 and NT are pretty compatible :) */
     2094    return (INVALID_HANDLE_VALUE);                           /* signal error */
     2095  }
     2096
     2097  return iIndexNew;                                   /* return valid handle */
     2098}
     2099
     2100
     2101/*****************************************************************************
     2102 * Name      : HMReleaseSemaphore
     2103 * Purpose   : router function for ReleaseSemaphore
     2104 * Parameters:
     2105 * Variables :
     2106 * Result    :
     2107 * Remark    :
     2108 * Status    :
     2109 *
     2110 * Author    : Patrick Haller [Wed, 1999/06/17 20:44]
     2111 *****************************************************************************/
     2112
     2113BOOL HMReleaseSemaphore(HANDLE hEvent,
     2114                        LONG   cReleaseCount,
     2115                        LPLONG lpPreviousCount)
     2116{
     2117  int       iIndex;                           /* index into the handle table */
     2118  DWORD     dwResult;                /* result from the device handler's API */
     2119  PHMHANDLE pHMHandle;       /* pointer to the handle structure in the table */
     2120
     2121                                                          /* validate handle */
     2122  iIndex = _HMHandleQuery(hEvent);                          /* get the index */
     2123  if (-1 == iIndex)                                               /* error ? */
     2124  {
     2125    SetLastError(ERROR_INVALID_HANDLE);       /* set win32 error information */
     2126    return (INVALID_HANDLE_ERROR);                         /* signal failure */
     2127  }
     2128
     2129  pHMHandle = &TabWin32Handles[iIndex];               /* call device handler */
     2130  dwResult = pHMHandle->pDeviceHandler->ReleaseSemaphore(&pHMHandle->hmHandleData,
     2131                                                         cReleaseCount,
     2132                                                         lpPreviousCount);
     2133
     2134  return (dwResult);                                  /* deliver return code */
     2135}
     2136
     2137
     2138/*****************************************************************************
     2139 * Name      : HMWaitForMultipleObjects
     2140 * Purpose   : router function for WaitForMultipleObjects
     2141 * Parameters:
     2142 * Variables :
     2143 * Result    :
     2144 * Remark    :
     2145 * Status    :
     2146 *
     2147 * Author    : Patrick Haller [Wed, 1999/06/17 20:44]
     2148 *****************************************************************************/
     2149
     2150DWORD HMWaitForMultipleObjects (DWORD   cObjects,
     2151                                PHANDLE lphObjects,
     2152                                BOOL    fWaitAll,
     2153                                DWORD   dwTimeout)
     2154{
     2155  ULONG   ulIndex;
     2156  PHANDLE pArrayOfHandles;
     2157  PHANDLE pLoop1 = lphObjects;
     2158  PHANDLE pLoop2;
     2159  DWORD   rc;
     2160
     2161  // allocate array for handle table
     2162  pArrayOfHandles = (PHANDLE)malloc(cObjects * sizeof(HANDLE));
     2163  if (pArrayOfHandles == NULL)
     2164  {
     2165    O32_SetLastError(ERROR_NOT_ENOUGH_MEMORY);
     2166    return WAIT_FAILED;
     2167  }
     2168  else
     2169    pLoop2 = pArrayOfHandles;
     2170
     2171  // convert array to odin handles
     2172  for (ulIndex = 0;
     2173
     2174       ulIndex < cObjects;
     2175
     2176       ulIndex++,
     2177       pLoop1++,
     2178       pLoop2++)
     2179  {
     2180    rc = HMHandleTranslateToOS2 (*pLoop1, // translate handle
     2181                                 pLoop2);
     2182
     2183    if (rc != NO_ERROR)
     2184    {
     2185      free (pArrayOfHandles);             // free memory
     2186      O32_SetLastError(ERROR_INVALID_HANDLE);
     2187      return (WAIT_FAILED);
     2188    }
     2189  }
     2190
     2191  // OK, now forward to Open32.
     2192  // @@@PH: Note this will fail on handles that do NOT belong to Open32
     2193  //        but to i.e. the console subsystem!
     2194  rc = O32_WaitForMultipleObjects(cObjects,
     2195                                  pArrayOfHandles,
     2196                                  fWaitAll,
     2197                                  dwTimeout);
     2198
     2199  free(pArrayOfHandles);                  // free memory
     2200  return (rc);                            // OK, done
     2201}
     2202
     2203
     2204/*****************************************************************************
     2205 * Name      : HMWaitForMultipleObjectsEx
     2206 * Purpose   : router function for WaitForMultipleObjectsEx
     2207 * Parameters:
     2208 * Variables :
     2209 * Result    :
     2210 * Remark    :
     2211 * Status    :
     2212 *
     2213 * Author    : Patrick Haller [Wed, 1999/06/17 20:44]
     2214 *****************************************************************************/
     2215
     2216DWORD HMWaitForMultipleObjectsEx (DWORD   cObjects,
     2217                                  PHANDLE lphObjects,
     2218                                  BOOL    fWaitAll,
     2219                                  DWORD   dwTimeout,
     2220                                  BOOL    fAlertable)
     2221{
     2222  // @@@PH: Note: fAlertable is ignored !
     2223  return (HMWaitForMultipleObjects(cObjects,
     2224                                   lphObjects,
     2225                                   fWaitAll,
     2226                                   dwTimeout));
     2227}
     2228
  • trunk/src/kernel32/console.cpp

    r120 r278  
    1 /* $Id: console.cpp,v 1.7 1999-06-19 10:54:40 sandervl Exp $ */
     1/* $Id: console.cpp,v 1.8 1999-07-06 15:48:45 phaller Exp $ */
    22
    33/*
     
    6262#define  INCL_VIO
    6363#define  INCL_AVIO
    64 #include <os2wrap.h>    //Odin32 OS/2 api wrappers
     64#include <os2wrap.h>         //Odin32 OS/2 api wrappers
    6565#include <builtin.h>
    6666#include <stdlib.h>
  • trunk/src/kernel32/hmdevice.cpp

    r111 r278  
    1 /* $Id: hmdevice.cpp,v 1.1 1999-06-17 18:21:43 phaller Exp $ */
     1/* $Id: hmdevice.cpp,v 1.2 1999-07-06 15:48:46 phaller Exp $ */
    22
    33/*
     
    536536                                        LPOVERLAPPED  lpOverlapped)
    537537{
    538 
    539538  dprintf(("KERNEL32: HandleManager::DeviceHandler::UnlockFileEx %s(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh)\n",
    540539           lpHMDeviceName,
     
    549548}
    550549
     550
     551
     552/*****************************************************************************
     553 * Name      : HMCreateSemaphore
     554 * Purpose   : router function for CreateSemaphore
     555 * Parameters:
     556 * Variables :
     557 * Result    :
     558 * Remark    :
     559 * Status    :
     560 *
     561 * Author    : Patrick Haller [Tue, 1999/07/06 20:44]
     562 *****************************************************************************/
     563
     564DWORD HMDeviceHandler::CreateSemaphore(PHMHANDLEDATA         pHMHandleData,
     565                                       LPSECURITY_ATTRIBUTES lpsa,
     566                                       LONG                  lInitialCount,
     567                                       LONG                  lMaximumCount,
     568                                       LPCTSTR               lpszSemaphoreName)
     569{
     570  dprintf(("KERNEL32: HandleManager::DeviceHandler::CreateSemaphore(%08xh,%08xh,%08xh,%08xh,%s)\n",
     571           pHMHandleData,
     572           lpsa,
     573           lInitialCount,
     574           lMaximumCount,
     575           lpszSemaphoreName));
     576
     577  return (ERROR_INVALID_FUNCTION);
     578}
     579
     580
     581/*****************************************************************************
     582 * Name      : HMOpenSemaphore
     583 * Purpose   : router function for OpenSemaphore
     584 * Parameters:
     585 * Variables :
     586 * Result    :
     587 * Remark    :
     588 * Status    :
     589 *
     590 * Author    : Patrick Haller [Tue, 1999/07/06 20:44]
     591 *****************************************************************************/
     592
     593DWORD HMDeviceHandler::OpenSemaphore(PHMHANDLEDATA         pHMHandleData,
     594                                     BOOL                  fInheritHandle,
     595                                     LPCTSTR               lpszSemaphoreName)
     596{
     597  dprintf(("KERNEL32: HandleManager::DeviceHandler::OpenSemaphore(%08xh,%08xh,%s)\n",
     598           pHMHandleData,
     599           fInheritHandle,
     600           lpszSemaphoreName));
     601
     602 return (ERROR_INVALID_FUNCTION);
     603}
     604
     605
     606/*****************************************************************************
     607 * Name      : HMReleaseSemaphore
     608 * Purpose   : router function for ReleaseSemaphore
     609 * Parameters:
     610 * Variables :
     611 * Result    :
     612 * Remark    :
     613 * Status    :
     614 *
     615 * Author    : Patrick Haller [Tue, 1999/07/06 20:44]
     616 *****************************************************************************/
     617
     618BOOL HMDeviceHandler::ReleaseSemaphore(PHMHANDLEDATA pHMHandleData,
     619                                       LONG          cReleaseCount,
     620                                       LPLONG        lpPreviousCount)
     621{
     622  dprintf(("KERNEL32: HandleManager::DeviceHandler::ReleaseSemaphore(%08xh,%08xh,%08xh)\n",
     623           pHMHandleData->hHMHandle,
     624           cReleaseCount,
     625           lpPreviousCount));
     626
     627  return (ERROR_INVALID_FUNCTION);
     628}
     629
     630
     631
     632/*****************************************************************************
     633 * Name      : HMCreateMutex
     634 * Purpose   : router function for CreateMutex
     635 * Parameters:
     636 * Variables :
     637 * Result    :
     638 * Remark    :
     639 * Status    :
     640 *
     641 * Author    : Patrick Haller [Tue, 1999/07/06 20:44]
     642 *****************************************************************************/
     643
     644DWORD HMDeviceHandler::CreateMutex(PHMHANDLEDATA         pHMHandleData,
     645                                   LPSECURITY_ATTRIBUTES lpsa,
     646                                   BOOL                  fInitialOwner,
     647                                   LPCTSTR               lpszMutexName)
     648{
     649  dprintf(("KERNEL32: HandleManager::DeviceHandler::CreateMutex(%08xh,%08xh,%08xh,%s)\n",
     650           pHMHandleData,
     651           lpsa,
     652           fInitialOwner,
     653           lpszMutexName));
     654
     655  return (ERROR_INVALID_FUNCTION);
     656}
     657
     658
     659/*****************************************************************************
     660 * Name      : HMOpenMutex
     661 * Purpose   : router function for OpenMutex
     662 * Parameters:
     663 * Variables :
     664 * Result    :
     665 * Remark    :
     666 * Status    :
     667 *
     668 * Author    : Patrick Haller [Tue, 1999/07/06 20:44]
     669 *****************************************************************************/
     670
     671DWORD HMDeviceHandler::OpenMutex(PHMHANDLEDATA         pHMHandleData,
     672                                 BOOL                  fInheritHandle,
     673                                 LPCTSTR               lpszMutexName)
     674{
     675  dprintf(("KERNEL32: HandleManager::DeviceHandler::OpenMutex(%08xh,%08xh,%s)\n",
     676           pHMHandleData,
     677           fInheritHandle,
     678           lpszMutexName));
     679
     680  return (ERROR_INVALID_FUNCTION);
     681}
     682
     683
     684/*****************************************************************************
     685 * Name      : HMReleaseMutex
     686 * Purpose   : router function for ReleaseMutex
     687 * Parameters:
     688 * Variables :
     689 * Result    :
     690 * Remark    :
     691 * Status    :
     692 *
     693 * Author    : Patrick Haller [Tue, 1999/07/06 20:44]
     694 *****************************************************************************/
     695
     696BOOL HMDeviceHandler::ReleaseMutex(PHMHANDLEDATA pHMHandleData)
     697{
     698  dprintf(("KERNEL32: HandleManager::DeviceHandler::ReleaseMutex(%08xh)\n",
     699           pHMHandleData->hHMHandle));
     700
     701  return (ERROR_INVALID_FUNCTION);
     702}
     703
     704
     705/*****************************************************************************
     706 * Name      : HMCreateEvent
     707 * Purpose   : router function for CreateEvent
     708 * Parameters:
     709 * Variables :
     710 * Result    :
     711 * Remark    :
     712 * Status    :
     713 *
     714 * Author    : Patrick Haller [Tue, 1999/07/06 20:44]
     715 *****************************************************************************/
     716
     717DWORD HMDeviceHandler::CreateEvent(PHMHANDLEDATA         pHMHandleData,
     718                                   LPSECURITY_ATTRIBUTES lpsa,
     719                                   BOOL                  fManualReset,
     720                                   BOOL                  fInitialState,
     721                                   LPCTSTR               lpszEventName)
     722{
     723  dprintf(("KERNEL32: HandleManager::DeviceHandler::CreateEvent(%08xh,%08xh,%08xh,%08xh,%s)\n",
     724           pHMHandleData,
     725           lpsa,
     726           fManualReset,
     727           fInitialState,
     728           lpszEventName));
     729
     730  return (ERROR_INVALID_FUNCTION);
     731}
     732
     733
     734/*****************************************************************************
     735 * Name      : HMOpenEvent
     736 * Purpose   : router function for OpenEvent
     737 * Parameters:
     738 * Variables :
     739 * Result    :
     740 * Remark    :
     741 * Status    :
     742 *
     743 * Author    : Patrick Haller [Tue, 1999/07/06 20:44]
     744 *****************************************************************************/
     745
     746DWORD HMDeviceHandler::OpenEvent(PHMHANDLEDATA         pHMHandleData,
     747                                 BOOL                  fInheritHandle,
     748                                 LPCTSTR               lpszEventName)
     749{
     750  dprintf(("KERNEL32: HandleManager::DeviceHandler::OpenEvent(%08xh,%08xh,%s)\n",
     751           pHMHandleData,
     752           fInheritHandle,
     753           lpszEventName));
     754
     755  return (ERROR_INVALID_FUNCTION);
     756}
     757
     758
     759/*****************************************************************************
     760 * Name      : HMSetEvent
     761 * Purpose   : router function for SetEvent
     762 * Parameters:
     763 * Variables :
     764 * Result    :
     765 * Remark    :
     766 * Status    :
     767 *
     768 * Author    : Patrick Haller [Tue, 1999/07/06 20:44]
     769 *****************************************************************************/
     770
     771BOOL HMDeviceHandler::SetEvent(PHMHANDLEDATA pHMHandleData)
     772{
     773  dprintf(("KERNEL32: HandleManager::DeviceHandler::SetEvent(%08xh)\n",
     774           pHMHandleData->hHMHandle));
     775
     776  return (ERROR_INVALID_FUNCTION);
     777}
     778
     779
     780/*****************************************************************************
     781 * Name      : HMPulseEvent
     782 * Purpose   : router function for PulseEvent
     783 * Parameters:
     784 * Variables :
     785 * Result    :
     786 * Remark    :
     787 * Status    :
     788 *
     789 * Author    : Patrick Haller [Tue, 1999/07/06 20:44]
     790 *****************************************************************************/
     791
     792BOOL HMDeviceHandler::PulseEvent(PHMHANDLEDATA pHMHandleData)
     793{
     794  dprintf(("KERNEL32: HandleManager::DeviceHandler::PulseEvent(%08xh)\n",
     795           pHMHandleData->hHMHandle));
     796
     797  return (ERROR_INVALID_FUNCTION);
     798}
     799
     800
     801/*****************************************************************************
     802 * Name      : HMResetEvent
     803 * Purpose   : router function for ResetEvent
     804 * Parameters:
     805 * Variables :
     806 * Result    :
     807 * Remark    :
     808 * Status    :
     809 *
     810 * Author    : Patrick Haller [Tue, 1999/07/06 20:44]
     811 *****************************************************************************/
     812
     813BOOL HMDeviceHandler::ResetEvent(PHMHANDLEDATA pHMHandleData)
     814{
     815  dprintf(("KERNEL32: HandleManager::DeviceHandler::ResetEvent(%08xh)\n",
     816           pHMHandleData->hHMHandle));
     817
     818  return (ERROR_INVALID_FUNCTION);
     819}
     820
     821
     822
     823/*****************************************************************************
     824 * Name      : DWORD HMDeviceHandler::WaitForSingleObject
     825 * Purpose   : object synchronization
     826 * Parameters: PHMHANDLEDATA pHMHandleData
     827 *             DWORD dwTimeout
     828 * Variables :
     829 * Result    : API returncode
     830 * Remark    :
     831 * Status    :
     832 *
     833 * Author    : Patrick Haller [Wed, 1999/06/17 20:44]
     834 *****************************************************************************/
     835
     836DWORD HMDeviceHandler::WaitForSingleObject(PHMHANDLEDATA pHMHandleData,
     837                                               DWORD         dwTimeout)
     838{
     839  dprintf(("KERNEL32: HandleManager::DeviceHandler::WaitForSingleObject(%08xh,%08h)\n",
     840           pHMHandleData->hHMHandle,
     841           dwTimeout));
     842
     843  return(ERROR_INVALID_FUNCTION);
     844}
     845
     846
     847/*****************************************************************************
     848 * Name      : DWORD HMDeviceHandler::WaitForSingleObjectEx
     849 * Purpose   : object synchronization
     850 * Parameters: PHMHANDLEDATA pHMHandleData
     851 *             DWORD dwTimeout
     852 *             BOOL  fAlertable
     853 * Variables :
     854 * Result    : API returncode
     855 * Remark    :
     856 * Status    :
     857 *
     858 * Author    : Patrick Haller [Wed, 1999/06/17 20:44]
     859 *****************************************************************************/
     860
     861DWORD HMDeviceHandler::WaitForSingleObjectEx(PHMHANDLEDATA pHMHandleData,
     862                                                 DWORD         dwTimeout,
     863                                                 BOOL          fAlertable)
     864{
     865  dprintf(("KERNEL32: HandleManager::DeviceHandler::WaitForSingleObjectEx(%08xh,%08h,%08xh) not implemented correctly.\n",
     866           pHMHandleData->hHMHandle,
     867           dwTimeout,
     868           fAlertable));
     869
     870  //@@@PH: WARNING mapped to WaitForSingleObject simply. fAlertable missing!
     871  return(ERROR_INVALID_FUNCTION);
     872}
     873
     874
     875/*****************************************************************************
     876 * Name      : DWORD HMDeviceHandler::FlushFileBuffers
     877 * Purpose   : flush the buffers of a file
     878 * Parameters: PHMHANDLEDATA pHMHandleData
     879 * Variables :
     880 * Result    : API returncode
     881 * Remark    :
     882 * Status    :
     883 *
     884 * Author    : Patrick Haller [Wed, 1999/06/17 20:44]
     885 *****************************************************************************/
     886
     887BOOL HMDeviceHandler::FlushFileBuffers(PHMHANDLEDATA pHMHandleData)
     888{
     889  dprintf(("KERNEL32: HandleManager::Open32:FlushFileBuffers(%08xh)\n",
     890           pHMHandleData->hHMHandle));
     891
     892  return(ERROR_INVALID_FUNCTION);
     893}
     894
     895
     896/*****************************************************************************
     897 * Name      : DWORD HMDeviceHandler::GetOverlappedResult
     898 * Purpose   : asynchronus I/O
     899 * Parameters: PHMHANDLEDATA pHMHandleData
     900 *             LPOVERLAPPED  arg2
     901 *             LPDWORD       arg3
     902 *             BOOL          arg4
     903 * Variables :
     904 * Result    : API returncode
     905 * Remark    :
     906 * Status    :
     907 *
     908 * Author    : Patrick Haller [Wed, 1999/06/17 20:44]
     909 *****************************************************************************/
     910
     911BOOL HMDeviceHandler::GetOverlappedResult(PHMHANDLEDATA pHMHandleData,
     912                                              LPOVERLAPPED  arg2,
     913                                              LPDWORD       arg3,
     914                                              BOOL          arg4)
     915{
     916  dprintf(("KERNEL32: HandleManager::DeviceHandler::GetOverlappedResult(%08xh,%08xh,%08xh,%08xh)\n",
     917           pHMHandleData->hHMHandle,
     918           arg2,
     919           arg3,
     920           arg4));
     921
     922  return(ERROR_INVALID_FUNCTION);
     923}
     924
  • trunk/src/kernel32/hmdevice.h

    r271 r278  
    1 /* $Id: hmdevice.h,v 1.2 1999-07-05 09:58:14 phaller Exp $ */
     1/* $Id: hmdevice.h,v 1.3 1999-07-06 15:48:46 phaller Exp $ */
    22
    33/*
     
    124124                               DWORD         dwMoveMethod);
    125125
     126                 /* this is a handler method for calls to FlushFileBuffers() */
     127  virtual BOOL FlushFileBuffers(PHMHANDLEDATA pHMHandleData);
     128
     129              /* this is a handler method for calls to GetOverlappedResult() */
     130  virtual BOOL GetOverlappedResult (PHMHANDLEDATA pHMHandleData,
     131                                    LPOVERLAPPED  lpOverlapped,
     132                                    LPDWORD       arg3,
     133                                    BOOL          arg4);
     134
    126135                         /* this is a handler method for calls to LockFile() */
    127136  virtual DWORD LockFile(PHMHANDLEDATA pHMHandleData,
     
    153162                             DWORD         nNumberOfBytesToLockHigh,
    154163                             LPOVERLAPPED  lpOverlapped);
     164
     165                /* this is a handler method for calls to WaitForSingleObject */
     166  virtual DWORD WaitForSingleObject  (PHMHANDLEDATA pHMHandleData,
     167                                      DWORD  dwTimeout);
     168
     169              /* this is a handler method for calls to WaitForSingleObjectEx */
     170  virtual DWORD WaitForSingleObjectEx(PHMHANDLEDATA pHMHandleData,
     171                                      DWORD  dwTimeout,
     172                                      BOOL   fAlertable);
     173
     174
     175  /***************************************************************************
     176   * Events                                                                  *
     177   ***************************************************************************/
     178
     179                     /* this is a handler method for calls to CreateEvent() */
     180  virtual DWORD CreateEvent (PHMHANDLEDATA         pHMHandleData,
     181                             LPSECURITY_ATTRIBUTES lpsa,
     182                             BOOL                  fManualReset,
     183                             BOOL                  fInitialState,
     184                             LPCSTR                lpszEventName);
     185
     186                       /* this is a handler method for calls to OpenEvent() */
     187  virtual DWORD OpenEvent   (PHMHANDLEDATA         pHMHandleData,
     188                             BOOL                  fInheritHandle,
     189                             LPCSTR                lpszEventName);
     190
     191                       /* this is a handle method for calls to ResetEvent() */
     192  virtual BOOL  ResetEvent  (PHMHANDLEDATA         pHMHandleData);
     193
     194                         /* this is a handle method for calls to SetEvent() */
     195  virtual BOOL  SetEvent    (PHMHANDLEDATA         pHMHandleData);
     196
     197                       /* this is a handle method for calls to PulseEvent() */
     198  virtual BOOL  PulseEvent  (PHMHANDLEDATA         pHMHandleData);
     199
     200
     201  /***************************************************************************
     202   * Mutex                                                                   *
     203   ***************************************************************************/
     204
     205                     /* this is a handler method for calls to CreateMutex() */
     206  virtual DWORD CreateMutex (PHMHANDLEDATA         pHMHandleData,
     207                             LPSECURITY_ATTRIBUTES lpsa,
     208                             BOOL                  fInitialOwner,
     209                             LPCSTR                lpszMutexName);
     210
     211                       /* this is a handler method for calls to OpenMutex() */
     212  virtual DWORD OpenMutex   (PHMHANDLEDATA         pHMHandleData,
     213                             BOOL                  fInheritHandle,
     214                             LPCSTR                lpszMutexName);
     215
     216                     /* this is a handle method for calls to ReleaseMutex() */
     217  virtual BOOL  ReleaseMutex(PHMHANDLEDATA         pHMHandleData);
     218
     219
     220  /***************************************************************************
     221   * Semaphores                                                              *
     222   ***************************************************************************/
     223
     224                     /* this is a handler method for calls to CreateSemaphore() */
     225  virtual DWORD CreateSemaphore (PHMHANDLEDATA         pHMHandleData,
     226                                 LPSECURITY_ATTRIBUTES lpsa,
     227                                 LONG                  lInitialCount,
     228                                 LONG                  lMaximumCount,
     229                                 LPCSTR                lpszSemaphoreName);
     230
     231                       /* this is a handler method for calls to OpenSemaphore() */
     232  virtual DWORD OpenSemaphore   (PHMHANDLEDATA         pHMHandleData,
     233                                 BOOL                  fInheritHandle,
     234                                 LPCSTR                lpszSemaphoreName);
     235
     236                     /* this is a handle method for calls to ReleaseSemaphore() */
     237  virtual BOOL  ReleaseSemaphore(PHMHANDLEDATA pHMHandleData,
     238                                 LONG          cReleaseCount,
     239                                 LPLONG        lpPreviousCount);
    155240};
    156241
  • trunk/src/kernel32/hmopen32.cpp

    r271 r278  
    1 /* $Id: hmopen32.cpp,v 1.7 1999-07-05 09:58:14 phaller Exp $ */
     1/* $Id: hmopen32.cpp,v 1.8 1999-07-06 15:48:47 phaller Exp $ */
    22
    33/*
     
    645645                   nNumberOfBytesToLockHigh));
    646646}
     647
     648
     649/*****************************************************************************
     650 * Name      : DWORD HMDeviceOpen32Class::WaitForSingleObject
     651 * Purpose   : object synchronization
     652 * Parameters: PHMHANDLEDATA pHMHandleData
     653 *             DWORD dwTimeout
     654 * Variables :
     655 * Result    : API returncode
     656 * Remark    :
     657 * Status    :
     658 *
     659 * Author    : Patrick Haller [Wed, 1999/06/17 20:44]
     660 *****************************************************************************/
     661
     662DWORD HMDeviceOpen32Class::WaitForSingleObject(PHMHANDLEDATA pHMHandleData,
     663                                               DWORD         dwTimeout)
     664{
     665  dprintfl(("KERNEL32: HandleManager::Open32::WaitForSingleObject(%08xh,%08h)\n",
     666            pHMHandleData->hHMHandle,
     667            dwTimeout));
     668
     669  return (O32_WaitForSingleObject(pHMHandleData->hHMHandle,
     670                                  dwTimeout));
     671}
     672
     673
     674/*****************************************************************************
     675 * Name      : DWORD HMDeviceOpen32Class::WaitForSingleObjectEx
     676 * Purpose   : object synchronization
     677 * Parameters: PHMHANDLEDATA pHMHandleData
     678 *             DWORD dwTimeout
     679 *             BOOL  fAlertable
     680 * Variables :
     681 * Result    : API returncode
     682 * Remark    :
     683 * Status    :
     684 *
     685 * Author    : Patrick Haller [Wed, 1999/06/17 20:44]
     686 *****************************************************************************/
     687
     688DWORD HMDeviceOpen32Class::WaitForSingleObjectEx(PHMHANDLEDATA pHMHandleData,
     689                                                 DWORD         dwTimeout,
     690                                                 BOOL          fAlertable)
     691{
     692  dprintfl(("KERNEL32: HandleManager::Open32::WaitForSingleObjectEx(%08xh,%08h,%08xh) not implemented correctly.\n",
     693            pHMHandleData->hHMHandle,
     694            dwTimeout,
     695            fAlertable));
     696
     697  //@@@PH: WARNING mapped to WaitForSingleObject simply. fAlertable missing!
     698  return (O32_WaitForSingleObject(pHMHandleData->hHMHandle,
     699                                  dwTimeout));
     700}
     701
     702
     703/*****************************************************************************
     704 * Name      : DWORD HMDeviceOpen32Class::FlushFileBuffers
     705 * Purpose   : flush the buffers of a file
     706 * Parameters: PHMHANDLEDATA pHMHandleData
     707 * Variables :
     708 * Result    : API returncode
     709 * Remark    :
     710 * Status    :
     711 *
     712 * Author    : Patrick Haller [Wed, 1999/06/17 20:44]
     713 *****************************************************************************/
     714
     715BOOL HMDeviceOpen32Class::FlushFileBuffers(PHMHANDLEDATA pHMHandleData)
     716{
     717  dprintfl(("KERNEL32: HandleManager::Open32:FlushFileBuffers(%08xh)\n",
     718            pHMHandleData->hHMHandle));
     719
     720  return(O32_FlushFileBuffers(pHMHandleData->hHMHandle));
     721}
     722
     723
     724/*****************************************************************************
     725 * Name      : DWORD HMDeviceOpen32Class::GetOverlappedResult
     726 * Purpose   : asynchronus I/O
     727 * Parameters: PHMHANDLEDATA pHMHandleData
     728 *             LPOVERLAPPED  arg2
     729 *             LPDWORD       arg3
     730 *             BOOL          arg4
     731 * Variables :
     732 * Result    : API returncode
     733 * Remark    :
     734 * Status    :
     735 *
     736 * Author    : Patrick Haller [Wed, 1999/06/17 20:44]
     737 *****************************************************************************/
     738
     739BOOL HMDeviceOpen32Class::GetOverlappedResult(PHMHANDLEDATA pHMHandleData,
     740                                              LPOVERLAPPED  arg2,
     741                                              LPDWORD       arg3,
     742                                              BOOL          arg4)
     743{
     744  dprintfl(("KERNEL32: HandleManager::Open32::GetOverlappedResult(%08xh,%08xh,%08xh,%08xh)\n",
     745            pHMHandleData->hHMHandle,
     746            arg2,
     747            arg3,
     748            arg4));
     749
     750  return(O32_GetOverlappedResult(pHMHandleData->hHMHandle,
     751                                 arg2,
     752                                 arg3,
     753                                 arg4));
     754}
     755
  • trunk/src/kernel32/hmopen32.h

    r111 r278  
    1 /* $Id: hmopen32.h,v 1.1 1999-06-17 18:21:43 phaller Exp $ */
     1/* $Id: hmopen32.h,v 1.2 1999-07-06 15:48:47 phaller Exp $ */
    22
    33/*
     
    126126                             DWORD         nNumberOfBytesToLockHigh,
    127127                             LPOVERLAPPED  lpOverlapped);
     128
     129                /* this is a handler method for calls to WaitForSingleObject */
     130  virtual DWORD WaitForSingleObject  (PHMHANDLEDATA pHMHandleData,
     131                                      DWORD  dwTimeout);
     132
     133              /* this is a handler method for calls to WaitForSingleObjectEx */
     134  virtual DWORD WaitForSingleObjectEx(PHMHANDLEDATA pHMHandleData,
     135                                      DWORD  dwTimeout,
     136                                      BOOL   fAlertable);
     137
     138                   /* this is a handler method for calls to FlushFileBuffers */
     139  virtual BOOL FlushFileBuffers(PHMHANDLEDATA pHMHandleData);
     140
     141                /* this is a handler method for calls to GetOverlappedResult */
     142  virtual BOOL GetOverlappedResult(PHMHANDLEDATA pHMHandleData,
     143                                   LPOVERLAPPED  arg2,
     144                                   LPDWORD       arg3,
     145                                   BOOL          arg4);
    128146};
    129147
  • trunk/src/kernel32/kobjects.cpp

    r114 r278  
    1 /* $Id: kobjects.cpp,v 1.1 1999-06-17 21:52:01 phaller Exp $ */
     1/* $Id: kobjects.cpp,v 1.2 1999-07-06 15:48:48 phaller Exp $ */
    22
    33/*
     
    1515 *****************************************************************************/
    1616#include <os2win.h>
    17 //#include <winnt.h>
    18 //#include <winnls.h>
    19 //#include <stdlib.h>
    20 //#include <string.h>
    2117#include "misc.h"
    2218#include "handlemanager.h"
     
    2521
    2622// REMARK: THIS IS IN PREPARATION FOR HANDLEMANAGER SUPPORT (PH) !!
    27 #define HMCreateEvent              O32_CreateEvent
    28 #define HMCreateMutex              O32_CreateMutex
    29 #define HMCreateSemaphore          O32_CreateSemaphore
    30 #define HMSetEvent                 O32_SetEvent
    31 #define HMReleaseMutex             O32_ReleaseMutex
    32 #define HMWaitForSingleObject      O32_WaitForSingleObject
    33 #define HMWaitForSingleObjectEx    O32_WaitForSingleObjectEx
    34 #define HMGetOverlappedResult      O32_GetOverlappedResult
    35 #define HMOpenEvent                O32_OpenEvent
    36 #define HMOpenMutex                O32_OpenMutex
    37 #define HMOpenSemaphore            O32_OpenSemaphore
    38 #define HMPulseEvent               O32_PulseEvent
    39 #define HMReleaseSemaphore         O32_ReleaseSemaphore
    40 #define HMResetEvent               O32_ResetEvent
    41 #define HMWaitForMultipleObjects   O32_WaitForMultipleObjects
    42 #define HMWaitForMultipleObjectsEx O32_WaitForMultipleObjectsEx
    43 #define HMFlushFileBuffers         O32_FlushFileBuffers
     23//#define HMCreateEvent              O32_CreateEvent
     24//#define HMCreateMutex              O32_CreateMutex
     25//#define HMCreateSemaphore          O32_CreateSemaphore
     26//#define HMSetEvent                 O32_SetEvent
     27//#define HMReleaseMutex             O32_ReleaseMutex
     28//#define HMWaitForSingleObject      O32_WaitForSingleObject
     29//#define HMWaitForSingleObjectEx    O32_WaitForSingleObjectEx
     30//#define HMGetOverlappedResult      O32_GetOverlappedResult
     31//#define HMOpenEvent                O32_OpenEvent
     32//#define HMOpenMutex                O32_OpenMutex
     33//#define HMOpenSemaphore            O32_OpenSemaphore
     34//#define HMPulseEvent               O32_PulseEvent
     35//#define HMReleaseSemaphore         O32_ReleaseSemaphore
     36//#define HMResetEvent               O32_ResetEvent
     37//#define HMWaitForMultipleObjects   O32_WaitForMultipleObjects
     38//#define HMWaitForMultipleObjectsEx O32_WaitForMultipleObjectsEx
     39//#define HMFlushFileBuffers         O32_FlushFileBuffers
    4440#define HMSetHandleCount           O32_SetHandleCount
    4541#define HMGetHandleCount           O32_GetHandleCount
     
    281277           fAlertable));
    282278
    283   return(HMWaitForSingleObject(hObject,
    284                                dwTimeout));
     279  return(HMWaitForSingleObjectEx(hObject,
     280                                 dwTimeout,
     281                                 fAlertable));
    285282}
    286283
     
    743740
    744741  return HMWaitForMultipleObjects(arg1,
    745                                   arg2,
     742                                  (PHANDLE)arg2,
    746743                                  arg3,
    747744                                  arg4);
     
    784781           fAlertable));
    785782
    786   return(HMWaitForMultipleObjects(cObjects,
    787                                   lphObjects,
    788                                   fWaitAll,
    789                                   dwTimeout));
     783  return(HMWaitForMultipleObjectsEx(cObjects,
     784                                    (PHANDLE)lphObjects,
     785                                    fWaitAll,
     786                                    dwTimeout,
     787                                    fAlertable));
    790788}
    791789
  • trunk/src/kernel32/makefile

    r262 r278  
    1 # $Id: makefile,v 1.10 1999-07-04 09:41:33 sandervl Exp $
     1# $Id: makefile,v 1.11 1999-07-06 15:48:48 phaller Exp $
    22
    33#
     
    5757       hmdevice.obj \
    5858       hmopen32.obj \
     59       hmobjects.obj \
     60       hmevent.obj \
     61       hmmutex.obj \
     62       hmsemaphore.obj \
    5963       wprocess.OBJ \
    6064       conprop.OBJ \
     
    297301        $(PDWIN32_INCLUDE)\handlemanager.h
    298302
     303hmobjects.obj: \
     304        .\hmobjects.cpp \
     305        .\hmobjects.h \
     306        $(PDWIN32_INCLUDE)\handlemanager.h
     307
     308hmevent.obj: \
     309        .\hmevent.cpp \
     310        .\hmevent.h \
     311        .\hmdevice.h \
     312        .\hmopen32.h
     313
     314hmmutex.obj: \
     315        .\hmmutex.cpp \
     316        .\hmmutex.h \
     317        .\hmdevice.h \
     318        .\hmopen32.h
     319
     320hmsemaphore.obj: \
     321        .\hmsemaphore.cpp \
     322        .\hmsemaphore.h \
     323        .\hmdevice.h \
     324        .\hmopen32.h
    299325
    300326conprop.OBJ: \
  • trunk/src/shell32/she.cpp

    r273 r278  
    1 /* $Id: she.cpp,v 1.3 1999-07-05 13:49:23 phaller Exp $ */
     1/* $Id: she.cpp,v 1.4 1999-07-06 15:48:48 phaller Exp $ */
    22
    33/*
     
    4949  dprintf(("SHELL32: SheSetCurDrive(%08xh) not implemented.\n",
    5050           x1));
     51
     52  return 0;
    5153}
Note: See TracChangeset for help on using the changeset viewer.