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

    r7476 r7549  
    1 /* $Id: conout.cpp,v 1.12 2001-11-29 00:20:46 phaller Exp $ */
     1/* $Id: conout.cpp,v 1.13 2001-12-05 14:15:58 sandervl Exp $ */
    22
    33/*
     
    9494 *****************************************************************************/
    9595
    96 DWORD HMDeviceConsoleOutClass::CreateFile (HANDLE        hHandle,
    97                                            LPCSTR        lpFileName,
     96DWORD HMDeviceConsoleOutClass::CreateFile (LPCSTR        lpFileName,
    9897                                           PHMHANDLEDATA pHMHandleData,
    9998                                           PVOID         lpSecurityAttributes,
     
    103102  HANDLE hConsole;
    104103
    105 #ifdef DEBUG_LOCAL2
    106   WriteLog("KERNEL32/CONSOLE:HMDeviceConsoleOutClass %s(%s,%08x,%08x,%08x)\n",
     104  dprintf(("KERNEL32/CONSOLE:HMDeviceConsoleOutClass %s(%s,%08x,%08x,%08x)\n",
    107105           lpHMDeviceName,
    108106           lpFileName,
    109107           pHMHandleData->hHMHandle,
    110108           lpSecurityAttributes,
    111            pHMHandleDataTemplate);
    112 #endif
    113 
    114   pHMHandleData->dwType = FILE_TYPE_CHAR;        /* we're a character device */
    115 
    116 
    117                  /* if no default buffer is available, then do default setup */
     109           pHMHandleDataTemplate));
     110
     111
     112  /* if no default buffer is available, then do default setup */
    118113  if (pConsoleGlobals->hConsoleBuffer == INVALID_HANDLE_VALUE)
    119114  {
     
    126121    if (hConsole == INVALID_HANDLE_VALUE)
    127122    {
    128 #ifdef DEBUG_LOCAL
    129       WriteLog("KERNEL32/CONSOLE:OS2CreateConsoleScreenBuffer = %u.\n",
    130                GetLastError());
    131 #endif
     123      dprintf(("KERNEL32/CONSOLE:OS2CreateConsoleScreenBuffer = %u.\n",
     124               GetLastError()));
    132125      return INVALID_HANDLE_VALUE;   /* abort further processing immediately */
    133126    }
     
    145138    if (fResult == FALSE)
    146139    {
    147 #ifdef DEBUG_LOCAL
    148       WriteLog("KERNEL32/CONSOLE:OS2SetConsoleScreenBufferSize=%u.\n",
    149                GetLastError());
    150 #endif
     140      dprintf(("KERNEL32/CONSOLE:OS2SetConsoleScreenBufferSize=%u.\n",
     141               GetLastError()));
    151142      HMCloseHandle(hConsole);                          /* free handle again */
    152143      return (INVALID_HANDLE_VALUE);            /* abort further processing */
     
    156147    if (fResult == FALSE)
    157148    {
    158 #ifdef DEBUG_LOCAL
    159       WriteLog("KERNEL32/CONSOLE:OS2SetConsoleActiveScreenBuffer=%u.\n",
    160                GetLastError());
    161 #endif
     149      dprintf(("KERNEL32/CONSOLE:OS2SetConsoleActiveScreenBuffer=%u.\n",
     150               GetLastError()));
    162151      HMCloseHandle(hConsole);                          /* free handle again */
    163152      return (INVALID_HANDLE_VALUE);            /* abort further processing */
     
    173162}
    174163
     164/*****************************************************************************
     165 * Name      : DWORD HMDeviceConsoleOutClass::GetFileType
     166 * Purpose   : determine the handle type
     167 * Parameters: PHMHANDLEDATA pHMHandleData
     168 * Variables :
     169 * Result    : API returncode
     170 * Remark    :
     171 * Status    :
     172 *
     173 * Author    : Patrick Haller [Wed, 1998/02/11 20:44]
     174 *****************************************************************************/
     175
     176DWORD HMDeviceConsoleOutClass::GetFileType(PHMHANDLEDATA pHMHandleData)
     177{
     178  dprintf(("KERNEL32: HMDeviceConsoleOutClass::GetFileType %s(%08x)\n",
     179           lpHMDeviceName,
     180           pHMHandleData));
     181
     182  return FILE_TYPE_CHAR;
     183}
    175184
    176185/*****************************************************************************
     
    190199                                       DWORD         nNumberOfBytesToRead,
    191200                                       LPDWORD       lpNumberOfBytesRead,
    192                                        LPOVERLAPPED  lpOverlapped)
     201                                       LPOVERLAPPED  lpOverlapped,
     202                                       LPOVERLAPPED_COMPLETION_ROUTINE  lpCompletionRoutine)
    193203{
    194204
     
    224234                                         DWORD         nNumberOfBytesToWrite,
    225235                                         LPDWORD       lpNumberOfBytesWritten,
    226                                          LPOVERLAPPED  lpOverlapped)
     236                                         LPOVERLAPPED  lpOverlapped,
     237                                         LPOVERLAPPED_COMPLETION_ROUTINE  lpCompletionRoutine)
    227238{
    228239  BOOL dwResult;                        /* result from subsequent WriteFile */
     
    246257                           nNumberOfBytesToWrite,
    247258                           lpNumberOfBytesWritten,
    248                            lpOverlapped);
     259                           lpOverlapped, lpCompletionRoutine);
    249260
    250261    return (dwResult);                                 /* return result code */
     
    300311
    301312
    302 DWORD HMDeviceConsoleOutClass::GetFileType (PHMHANDLEDATA pHMHandleData)
    303 {
    304    return FILE_TYPE_CHAR;
    305 }
Note: See TracChangeset for help on using the changeset viewer.