Ignore:
Timestamp:
Nov 26, 2001, 3:54:03 PM (24 years ago)
Author:
sandervl
Message:

preliminary work on overlapped serial comm IO

File:
1 edited

Legend:

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

    r7443 r7457  
    1 /* $Id: HandleManager.cpp,v 1.75 2001-11-23 18:58:24 phaller Exp $ */
     1/* $Id: HandleManager.cpp,v 1.76 2001-11-26 14:53:57 sandervl Exp $ */
    22
    33/*
     
    10491049         sizeof(HMHANDLEDATA));
    10501050
    1051   rc = pDeviceHandler->CreateFile(lpFileName,     /* call the device handler */
     1051  rc = pDeviceHandler->CreateFile((HANDLE)iIndexNew, lpFileName,     /* call the device handler */
    10521052                                  &HMHandleTemp,
    10531053                                  lpSecurityAttributes,
     
    12011201  TabWin32Handles[iIndexNew].pDeviceHandler         = pDeviceHandler;
    12021202
    1203   rc = pDeviceHandler->OpenFile  (lpFileName,     /* call the device handler */
     1203  rc = pDeviceHandler->OpenFile  ((HANDLE)iIndexNew,  lpFileName,     /* call the device handler */
    12041204                                  &TabWin32Handles[iIndexNew].hmHandleData,
    12051205                                  pOFStruct,
     
    32033203  return (fResult);                                   /* deliver return code */
    32043204}
    3205 
    3206 
    3207 
     3205/*****************************************************************************
     3206 * Name      : HMCancelIo
     3207 * Purpose   : router function for CancelIo
     3208 * Parameters:
     3209 * Variables :
     3210 * Result    :
     3211 * Remark    :
     3212 * Status    :
     3213 *
     3214 * Author    : Sander van Leeuwen
     3215 *****************************************************************************/
     3216BOOL  HMCancelIo(HANDLE hDevice)
     3217{
     3218  int       iIndex;                           /* index into the handle table */
     3219  BOOL      fResult;       /* result from the device handler's CloseHandle() */
     3220  PHMHANDLE pHMHandle;       /* pointer to the handle structure in the table */
     3221
     3222                                                          /* validate handle */
     3223  iIndex = _HMHandleQuery(hDevice);                           /* get the index */
     3224  if (-1 == iIndex)                                               /* error ? */
     3225  {
     3226    SetLastError(ERROR_INVALID_HANDLE);       /* set win32 error information */
     3227    return (FALSE);                                        /* signal failure */
     3228  }
     3229
     3230  pHMHandle = &TabWin32Handles[iIndex];               /* call device handler */
     3231  fResult = pHMHandle->pDeviceHandler->CancelIo(&pHMHandle->hmHandleData);
     3232
     3233  return (fResult);                                   /* deliver return code */
     3234}
    32083235/*****************************************************************************
    32093236 * Name      : HMCOMGetCommState
Note: See TracChangeset for help on using the changeset viewer.