Ignore:
Timestamp:
Dec 5, 2001, 3:16:38 PM (24 years ago)
Author:
sandervl
Message:

preliminary changes for new overlapped io framework

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/hmdevice.cpp

    r7532 r7549  
    1 /* $Id: hmdevice.cpp,v 1.30 2001-12-03 12:13:08 sandervl Exp $ */
     1/* $Id: hmdevice.cpp,v 1.31 2001-12-05 14:15:59 sandervl Exp $ */
    22
    33/*
     
    169169 *****************************************************************************/
    170170
    171 DWORD HMDeviceHandler::CreateFile (HANDLE        hHandle,
    172                                    LPCSTR        lpFileName,
     171DWORD HMDeviceHandler::CreateFile (LPCSTR        lpFileName,
    173172                                   PHMHANDLEDATA pHMHandleData,
    174173                                   PVOID         lpSecurityAttributes,
     
    217216 *             LPDWORD       lpNumberOfBytesRead,
    218217 *             LPOVERLAPPED  lpOverlapped
     218 *             LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine address of completion routine
    219219 * Variables :
    220220 * Result    : Boolean
     
    229229                               DWORD         nNumberOfBytesToRead,
    230230                               LPDWORD       lpNumberOfBytesRead,
    231                                LPOVERLAPPED  lpOverlapped)
    232 {
    233   dprintf(("KERNEL32:HandleManager::ReadFile %s(%08x,%08x,%08x,%08x,%08x) - stub?\n",
     231                               LPOVERLAPPED  lpOverlapped,
     232                               LPOVERLAPPED_COMPLETION_ROUTINE  lpCompletionRoutine)
     233{
     234  dprintf(("KERNEL32:HandleManager::ReadFile %s(%08x,%08x,%08x,%08x,%08x %08x) - stub?\n",
    234235           lpHMDeviceName,
    235236           pHMHandleData->hHMHandle,
     
    237238           nNumberOfBytesToRead,
    238239           lpNumberOfBytesRead,
    239            lpOverlapped));
     240           lpOverlapped, lpCompletionRoutine));
    240241
    241242  SetLastError(ERROR_INVALID_FUNCTION);
     
    243244}
    244245
    245 /*****************************************************************************
    246  * Name      : BOOL ReadFileEx
    247  * Purpose   : The ReadFileEx function reads data from a file asynchronously.
    248  *             It is designed solely for asynchronous operation, unlike the
    249  *             ReadFile function, which is designed for both synchronous and
    250  *             asynchronous operation. ReadFileEx lets an application perform
    251  *             other processing during a file read operation.
    252  *             The ReadFileEx function reports its completion status asynchronously,
    253  *             calling a specified completion routine when reading is completed
    254  *             and the calling thread is in an alertable wait state.
    255  * Parameters: HANDLE       hFile                handle of file to read
    256  *             LPVOID       lpBuffer             address of buffer
    257  *             DWORD        nNumberOfBytesToRead number of bytes to read
    258  *             LPOVERLAPPED lpOverlapped         address of offset
    259  *             LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine address of completion routine
    260  * Variables :
    261  * Result    : TRUE / FALSE
    262  * Remark    :
    263  * Status    : UNTESTED STUB
    264  *
    265  * Author    : Patrick Haller [Mon, 1998/06/15 08:00]
    266  *****************************************************************************/
    267 BOOL HMDeviceHandler::ReadFileEx(PHMHANDLEDATA pHMHandleData,
    268                            LPVOID       lpBuffer,
    269                            DWORD        nNumberOfBytesToRead,
    270                            LPOVERLAPPED lpOverlapped,
    271                            LPOVERLAPPED_COMPLETION_ROUTINE  lpCompletionRoutine)
    272 {
    273   dprintf(("ERROR: ReadFileEx %s (%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
    274            lpHMDeviceName,
    275            pHMHandleData->hHMHandle,
    276            lpBuffer,
    277            nNumberOfBytesToRead,
    278            lpOverlapped,
    279            lpCompletionRoutine));
    280 
    281   SetLastError(ERROR_INVALID_FUNCTION);
    282   return FALSE;
    283 }
    284246
    285247/*****************************************************************************
     
    291253 *             LPDWORD       lpNumberOfBytesWritten,
    292254 *             LPOVERLAPPED  lpOverlapped
     255 *             LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine address of completion routine
    293256 * Variables :
    294257 * Result    : Boolean
     
    303266                                DWORD         nNumberOfBytesToWrite,
    304267                                LPDWORD       lpNumberOfBytesWritten,
    305                                 LPOVERLAPPED  lpOverlapped)
    306 {
    307   dprintf(("KERNEL32:HandleManager::WriteFile %s(%08x,%08x,%08x,%08x,%08x) - stub?\n",
     268                                LPOVERLAPPED  lpOverlapped,
     269                                LPOVERLAPPED_COMPLETION_ROUTINE  lpCompletionRoutine)
     270{
     271  dprintf(("KERNEL32:HandleManager::WriteFile %s(%08x,%08x,%08x,%08x,%08x,%08x) - stub?\n",
    308272           lpHMDeviceName,
    309273           pHMHandleData->hHMHandle,
     
    311275           nNumberOfBytesToWrite,
    312276           lpNumberOfBytesWritten,
    313            lpOverlapped));
    314 
    315   SetLastError(ERROR_INVALID_FUNCTION);
    316   return FALSE;
    317 }
    318 
    319 
    320 /*****************************************************************************
    321  * Name      : BOOL WriteFileEx
    322  * Purpose   : The WriteFileEx function writes data to a file. It is designed
    323  *             solely for asynchronous operation, unlike WriteFile, which is
    324  *             designed for both synchronous and asynchronous operation.
    325  *             WriteFileEx reports its completion status asynchronously,
    326  *             calling a specified completion routine when writing is completed
    327  *             and the calling thread is in an alertable wait state.
    328  * Parameters: HANDLE       hFile                handle of file to write
    329  *             LPVOID       lpBuffer             address of buffer
    330  *             DWORD        nNumberOfBytesToRead number of bytes to write
    331  *             LPOVERLAPPED lpOverlapped         address of offset
    332  *             LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine address of completion routine
    333  * Variables :
    334  * Result    : TRUE / FALSE
    335  * Remark    :
    336  * Status    : UNTESTED STUB
    337  *
    338  * Author    : Patrick Haller [Mon, 1998/06/15 08:00]
    339  *****************************************************************************/
    340 
    341 BOOL HMDeviceHandler::WriteFileEx(PHMHANDLEDATA pHMHandleData,
    342                            LPVOID       lpBuffer,
    343                            DWORD        nNumberOfBytesToWrite,
    344                            LPOVERLAPPED lpOverlapped,
    345                            LPOVERLAPPED_COMPLETION_ROUTINE  lpCompletionRoutine)
    346 {
    347   dprintf(("ERROR: WriteFileEx %s (%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
    348            lpHMDeviceName,
    349            pHMHandleData->hHMHandle,
    350            lpBuffer,
    351            nNumberOfBytesToWrite,
    352            lpOverlapped,
    353            lpCompletionRoutine));
     277           lpOverlapped, lpCompletionRoutine));
    354278
    355279  SetLastError(ERROR_INVALID_FUNCTION);
     
    375299           pHMHandleData));
    376300
    377   return pHMHandleData->dwType;
     301  return FILE_TYPE_UNKNOWN;
    378302}
    379303
     
    627551 *****************************************************************************/
    628552
    629 DWORD HMDeviceHandler::OpenFile (HANDLE        hHandle,
    630                                  LPCSTR        lpFileName,
     553DWORD HMDeviceHandler::OpenFile (LPCSTR        lpFileName,
    631554                                 PHMHANDLEDATA pHMHandleData,
    632555                                 OFSTRUCT      *pOFStruct,
Note: See TracChangeset for help on using the changeset viewer.