Ignore:
Timestamp:
Jun 1, 2000, 1:28:48 PM (25 years ago)
Author:
sandervl
Message:

Rewrote file io apis

File:
1 edited

Legend:

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

    r3588 r3642  
    1 /* $Id: hmdevice.cpp,v 1.19 2000-05-22 19:07:54 sandervl Exp $ */
     1/* $Id: hmdevice.cpp,v 1.20 2000-06-01 11:28:45 sandervl Exp $ */
    22
    33/*
     
    126126           srcprocess, pHMSrcHandle, destprocess, desthandle));
    127127
    128   return(ERROR_INVALID_FUNCTION);
     128  return FALSE;
    129129}
    130130
     
    208208  dprintf(("KERNEL32:HandleManager::ReadFile %s(%08x,%08x,%08x,%08x,%08x) - stub?\n",
    209209           lpHMDeviceName,
    210            pHMHandleData,
     210           pHMHandleData->hHMHandle,
    211211           lpBuffer,
    212212           nNumberOfBytesToRead,
     
    218218}
    219219
     220/*****************************************************************************
     221 * Name      : BOOL ReadFileEx
     222 * Purpose   : The ReadFileEx function reads data from a file asynchronously.
     223 *             It is designed solely for asynchronous operation, unlike the
     224 *             ReadFile function, which is designed for both synchronous and
     225 *             asynchronous operation. ReadFileEx lets an application perform
     226 *             other processing during a file read operation.
     227 *             The ReadFileEx function reports its completion status asynchronously,
     228 *             calling a specified completion routine when reading is completed
     229 *             and the calling thread is in an alertable wait state.
     230 * Parameters: HANDLE       hFile                handle of file to read
     231 *             LPVOID       lpBuffer             address of buffer
     232 *             DWORD        nNumberOfBytesToRead number of bytes to read
     233 *             LPOVERLAPPED lpOverlapped         address of offset
     234 *             LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine address of completion routine
     235 * Variables :
     236 * Result    : TRUE / FALSE
     237 * Remark    :
     238 * Status    : UNTESTED STUB
     239 *
     240 * Author    : Patrick Haller [Mon, 1998/06/15 08:00]
     241 *****************************************************************************/
     242BOOL HMDeviceHandler::ReadFileEx(PHMHANDLEDATA pHMHandleData,
     243                           LPVOID       lpBuffer,
     244                           DWORD        nNumberOfBytesToRead,
     245                           LPOVERLAPPED lpOverlapped,
     246                           LPOVERLAPPED_COMPLETION_ROUTINE  lpCompletionRoutine)
     247{
     248  dprintf(("ERROR: ReadFileEx %s (%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
     249           lpHMDeviceName,
     250           pHMHandleData->hHMHandle,
     251           lpBuffer,
     252           nNumberOfBytesToRead,
     253           lpOverlapped,
     254           lpCompletionRoutine));
     255
     256  SetLastError(ERROR_INVALID_FUNCTION);
     257  return FALSE;
     258}
    220259
    221260/*****************************************************************************
     
    243282  dprintf(("KERNEL32:HandleManager::WriteFile %s(%08x,%08x,%08x,%08x,%08x) - stub?\n",
    244283           lpHMDeviceName,
    245            pHMHandleData,
     284           pHMHandleData->hHMHandle,
    246285           lpBuffer,
    247286           nNumberOfBytesToWrite,
     
    253292}
    254293
     294
     295/*****************************************************************************
     296 * Name      : BOOL WriteFileEx
     297 * Purpose   : The WriteFileEx function writes data to a file. It is designed
     298 *             solely for asynchronous operation, unlike WriteFile, which is
     299 *             designed for both synchronous and asynchronous operation.
     300 *             WriteFileEx reports its completion status asynchronously,
     301 *             calling a specified completion routine when writing is completed
     302 *             and the calling thread is in an alertable wait state.
     303 * Parameters: HANDLE       hFile                handle of file to write
     304 *             LPVOID       lpBuffer             address of buffer
     305 *             DWORD        nNumberOfBytesToRead number of bytes to write
     306 *             LPOVERLAPPED lpOverlapped         address of offset
     307 *             LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine address of completion routine
     308 * Variables :
     309 * Result    : TRUE / FALSE
     310 * Remark    :
     311 * Status    : UNTESTED STUB
     312 *
     313 * Author    : Patrick Haller [Mon, 1998/06/15 08:00]
     314 *****************************************************************************/
     315
     316BOOL HMDeviceHandler::WriteFileEx(PHMHANDLEDATA pHMHandleData,
     317                           LPVOID       lpBuffer,
     318                           DWORD        nNumberOfBytesToWrite,
     319                           LPOVERLAPPED lpOverlapped,
     320                           LPOVERLAPPED_COMPLETION_ROUTINE  lpCompletionRoutine)
     321{
     322  dprintf(("ERROR: WriteFileEx %s (%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
     323           lpHMDeviceName,
     324           pHMHandleData->hHMHandle,
     325           lpBuffer,
     326           nNumberOfBytesToWrite,
     327           lpOverlapped,
     328           lpCompletionRoutine));
     329
     330  SetLastError(ERROR_INVALID_FUNCTION);
     331  return FALSE;
     332}
    255333
    256334/*****************************************************************************
     
    579657 * Purpose   : file locking
    580658 * Parameters: PHMHANDLEDATA pHMHandleData
    581  *             DWORD dwFlags
    582659 *             DWORD dwReserved
    583660 *             DWORD nNumberOfBytesToLockLow
     
    593670
    594671DWORD HMDeviceHandler::UnlockFileEx(PHMHANDLEDATA pHMHandleData,
    595                                         DWORD         dwFlags,
    596672                                        DWORD         dwReserved,
    597673                                        DWORD         nNumberOfBytesToLockLow,
     
    599675                                        LPOVERLAPPED  lpOverlapped)
    600676{
    601   dprintf(("KERNEL32: HandleManager::DeviceHandler::UnlockFileEx %s(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh)\n",
    602            lpHMDeviceName,
    603            pHMHandleData,
    604            dwFlags,
     677  dprintf(("KERNEL32: HandleManager::DeviceHandler::UnlockFileEx %s,%08xh,%08xh,%08xh,%08xh,%08xh)\n",
     678           lpHMDeviceName,
     679           pHMHandleData,
    605680           dwReserved,
    606681           nNumberOfBytesToLockLow,
Note: See TracChangeset for help on using the changeset viewer.