Changeset 7293 for trunk/src


Ignore:
Timestamp:
Nov 7, 2001, 4:35:37 PM (24 years ago)
Author:
sandervl
Message:

CreateFile for named pipes fix

Location:
trunk/src/kernel32
Files:
3 edited

Legend:

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

    r5791 r7293  
    1 /* $Id: hmfile.cpp,v 1.28 2001-05-24 08:19:18 sandervl Exp $ */
     1/* $Id: hmfile.cpp,v 1.29 2001-11-07 15:35:36 sandervl Exp $ */
    22
    33/*
     
    7676             4) == 0)
    7777  {
    78         // check the named pipes
    79         if (strnicmp("\\\\.\\PIPE",lpFileName,8)==0)
    80             lpFileName+=3;
    81         else
    82             lpFileName+=4;
     78        lpFileName+=4;
    8379  }
    8480  else {
  • trunk/src/kernel32/hmnpipe.cpp

    r5587 r7293  
    1 /* $Id: hmnpipe.cpp,v 1.2 2001-04-26 13:22:46 sandervl Exp $ */
     1/* $Id: hmnpipe.cpp,v 1.3 2001-11-07 15:35:37 sandervl Exp $ */
    22/*
    33 * Project Odin Software License can be found in LICENSE.TXT
     
    3434#endif
    3535
     36/*****************************************************************************
     37 Register PIPE device class
     38 *****************************************************************************/
     39HMDeviceNamedPipeClass::HMDeviceNamedPipeClass(LPCSTR lpDeviceName) : HMDeviceFileClass(lpDeviceName)
     40{
     41    HMDeviceRegisterEx("\\\\.\\PIPE", this, NULL);
     42}
     43/*****************************************************************************
     44 * Name      : HMDeviceNamedPipeClass::FindDevice
     45 * Purpose   : Checks if lpDeviceName belongs to this device class
     46 * Parameters: LPCSTR lpClassDevName
     47 *             LPCSTR lpDeviceName
     48 *             int namelength
     49 * Variables :
     50 * Result    :
     51 * Remark    :
     52 * Status    :
     53 *
     54 * Author    : SvL
     55 *****************************************************************************/
     56BOOL HMDeviceNamedPipeClass::FindDevice(LPCSTR lpClassDevName, LPCSTR lpDeviceName, int namelength)
     57{
     58    if(lstrncmpiA("\\\\.\\PIPE\\", lpDeviceName, 9) == 0) {
     59        return TRUE;
     60    }
     61    return FALSE;
     62}
    3663//******************************************************************************
    3764//******************************************************************************
  • trunk/src/kernel32/hmnpipe.h

    r5587 r7293  
    1 /* $Id: hmnpipe.h,v 1.2 2001-04-26 13:22:46 sandervl Exp $ */
     1/* $Id: hmnpipe.h,v 1.3 2001-11-07 15:35:37 sandervl Exp $ */
    22/*
    33 * Project Odin Software License can be found in LICENSE.TXT
     
    1515{
    1616  public:
    17   HMDeviceNamedPipeClass(LPCSTR lpDeviceName) : HMDeviceFileClass(lpDeviceName) {}
    18  
     17  HMDeviceNamedPipeClass(LPCSTR lpDeviceName);
     18
     19  virtual BOOL  FindDevice(LPCSTR lpClassDevName, LPCSTR lpDeviceName, int namelength) ;
     20
    1921  virtual BOOL  PeekNamedPipe(PHMHANDLEDATA pHMHandleData,
    2022                              LPVOID lpvBuffer,
Note: See TracChangeset for help on using the changeset viewer.