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/hmnul.cpp

    r7476 r7549  
    1 /* $Id: hmnul.cpp,v 1.1 2001-11-29 00:20:48 phaller Exp $ */
     1/* $Id: hmnul.cpp,v 1.2 2001-12-05 14:16:02 sandervl Exp $ */
    22
    33/*
     
    6060}
    6161
    62 DWORD HMDeviceNulClass::CreateFile(HANDLE        hHandle,
    63                                        LPCSTR lpFileName,
    64                                        PHMHANDLEDATA pHMHandleData,
    65                                        PVOID lpSecurityAttributes,
    66                                        PHMHANDLEDATA pHMHandleDataTemplate)
     62DWORD HMDeviceNulClass::CreateFile(LPCSTR lpFileName,
     63                                   PHMHANDLEDATA pHMHandleData,
     64                                   PVOID lpSecurityAttributes,
     65                                   PHMHANDLEDATA pHMHandleDataTemplate)
    6766{
    6867  dprintf(("HMDeviceNulClass::CreateFile(%s,%08xh,%08xh,%08xh)\n",
     
    107106
    108107BOOL HMDeviceNulClass::WriteFile(PHMHANDLEDATA pHMHandleData,
    109                                      LPCVOID       lpBuffer,
    110                                      DWORD         nNumberOfBytesToWrite,
    111                                      LPDWORD       lpNumberOfBytesWritten,
    112                                      LPOVERLAPPED  lpOverlapped)
     108                                 LPCVOID       lpBuffer,
     109                                 DWORD         nNumberOfBytesToWrite,
     110                                 LPDWORD       lpNumberOfBytesWritten,
     111                                 LPOVERLAPPED  lpOverlapped,
     112                                 LPOVERLAPPED_COMPLETION_ROUTINE  lpCompletionRoutine)
    113113{
    114114  dprintf(("KERNEL32:HMDeviceNulClass::WriteFile %s(%08x,%08x,%08x,%08x,%08x)",
     
    146146}
    147147
    148 /*****************************************************************************
    149  * Name      : BOOL WriteFileEx
    150  * Purpose   : The WriteFileEx function writes data to a file. It is designed
    151  *             solely for asynchronous operation, unlike WriteFile, which is
    152  *             designed for both synchronous and asynchronous operation.
    153  *             WriteFileEx reports its completion status asynchronously,
    154  *             calling a specified completion routine when writing is completed
    155  *             and the calling thread is in an alertable wait state.
    156  * Parameters: HANDLE       hFile                handle of file to write
    157  *             LPVOID       lpBuffer             address of buffer
    158  *             DWORD        nNumberOfBytesToRead number of bytes to write
    159  *             LPOVERLAPPED lpOverlapped         address of offset
    160  *             LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine address of completion routine
    161  * Variables :
    162  * Result    : TRUE / FALSE
    163  * Remark    :
    164  * Status    : UNTESTED STUB
    165  *
    166  * Author    : Patrick Haller [Mon, 1998/06/15 08:00]
    167  *****************************************************************************/
    168 
    169 BOOL HMDeviceNulClass::WriteFileEx(PHMHANDLEDATA pHMHandleData,
    170                                        LPVOID       lpBuffer,
    171                                        DWORD        nNumberOfBytesToWrite,
    172                                        LPOVERLAPPED lpOverlapped,
    173                                        LPOVERLAPPED_COMPLETION_ROUTINE  lpCompletionRoutine)
    174 {
    175   dprintf(("ERROR: WriteFileEx %s (%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
    176            lpHMDeviceName,
    177            pHMHandleData->hHMHandle,
    178            lpBuffer,
    179            nNumberOfBytesToWrite,
    180            lpOverlapped,
    181            lpCompletionRoutine));
    182 
    183   SetLastError(ERROR_INVALID_FUNCTION);
    184   return FALSE;
    185 }
    186148
    187149/*****************************************************************************
     
    202164
    203165BOOL HMDeviceNulClass::ReadFile(PHMHANDLEDATA pHMHandleData,
    204                                     LPCVOID       lpBuffer,
    205                                     DWORD         nNumberOfBytesToRead,
    206                                     LPDWORD       lpNumberOfBytesRead,
    207                                     LPOVERLAPPED  lpOverlapped)
     166                                LPCVOID       lpBuffer,
     167                                DWORD         nNumberOfBytesToRead,
     168                                LPDWORD       lpNumberOfBytesRead,
     169                                LPOVERLAPPED  lpOverlapped,
     170                                LPOVERLAPPED_COMPLETION_ROUTINE  lpCompletionRoutine)
    208171{
    209172  dprintf(("KERNEL32:HMDeviceNulClass::ReadFile %s(%08x,%08x,%08x,%08x,%08x)",
     
    238201  }
    239202  return ret;
    240 }
    241 
    242 /*****************************************************************************
    243  * Name      : BOOL ReadFileEx
    244  * Purpose   : The ReadFileEx function reads data from a file asynchronously.
    245  *             It is designed solely for asynchronous operation, unlike the
    246  *             ReadFile function, which is designed for both synchronous and
    247  *             asynchronous operation. ReadFileEx lets an application perform
    248  *             other processing during a file read operation.
    249  *             The ReadFileEx function reports its completion status asynchronously,
    250  *             calling a specified completion routine when reading is completed
    251  *             and the calling thread is in an alertable wait state.
    252  * Parameters: HANDLE       hFile                handle of file to read
    253  *             LPVOID       lpBuffer             address of buffer
    254  *             DWORD        nNumberOfBytesToRead number of bytes to read
    255  *             LPOVERLAPPED lpOverlapped         address of offset
    256  *             LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine address of completion routine
    257  * Variables :
    258  * Result    : TRUE / FALSE
    259  * Remark    :
    260  * Status    : UNTESTED STUB
    261  *
    262  * Author    : Patrick Haller [Mon, 1998/06/15 08:00]
    263  *****************************************************************************/
    264 BOOL HMDeviceNulClass::ReadFileEx(PHMHANDLEDATA pHMHandleData,
    265                            LPVOID       lpBuffer,
    266                            DWORD        nNumberOfBytesToRead,
    267                            LPOVERLAPPED lpOverlapped,
    268                            LPOVERLAPPED_COMPLETION_ROUTINE  lpCompletionRoutine)
    269 {
    270   dprintf(("ERROR: ReadFileEx %s (%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
    271            lpHMDeviceName,
    272            pHMHandleData->hHMHandle,
    273            lpBuffer,
    274            nNumberOfBytesToRead,
    275            lpOverlapped,
    276            lpCompletionRoutine));
    277 
    278   SetLastError(ERROR_INVALID_FUNCTION);
    279   return FALSE;
    280203}
    281204
Note: See TracChangeset for help on using the changeset viewer.