Ignore:
Timestamp:
Feb 15, 2002, 8:14:52 PM (24 years ago)
Author:
sandervl
Message:

pipe updates

File:
1 edited

Legend:

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

    r7865 r7927  
    1 /* $Id: oslibdos.cpp,v 1.95 2002-02-11 13:46:36 sandervl Exp $ */
     1/* $Id: oslibdos.cpp,v 1.96 2002-02-15 19:14:52 sandervl Exp $ */
    22/*
    33 * Wrappers for OS/2 Dos* API
     
    17281728
    17291729  if(rc == NO_ERROR) {
    1730       dprintf(("Opening of existing named pipe succeeded"));
    1731       return hPipe;
     1730#if 0
     1731      //TODO:
     1732      if(dwOpenMode & FILE_FLAG_FIRST_PIPE_INSTANCE_W) {
     1733          DosClose(hPipe);
     1734          SetLastError(ERROR_ALREADY_EXISTS_W);
     1735          return -1;
     1736      }
     1737      else {
     1738#endif
     1739          dprintf(("Opening of existing named pipe succeeded"));
     1740          SetLastError(ERROR_SUCCESS_W);
     1741          return hPipe;
     1742//      }
    17321743  }
    17331744
     
    17461757    return -1; // INVALID_HANDLE_VALUE
    17471758  }
     1759  SetLastError(ERROR_SUCCESS_W);
    17481760  return hPipe;
    17491761}
     
    17691781    return FALSE;
    17701782  }
     1783  SetLastError(ERROR_SUCCESS_W);
    17711784  return TRUE;
    17721785}
     
    18591872  if(rc == NO_ERROR) {
    18601873      dprintf(("Opening of existing named pipe succeeded"));
     1874      SetLastError(ERROR_SUCCESS_W);
    18611875      return hPipe;
    18621876  }
     
    18761890  dprintf(("DosConnectNPipe rc=%d",rc));
    18771891
    1878   if (!rc) return (TRUE);
     1892  if(rc == NO_ERROR) {
     1893      SetLastError(ERROR_SUCCESS_W);
     1894      return (TRUE);
     1895  }
    18791896  SetLastError(error2WinError(rc,ERROR_PIPE_NOT_CONNECTED_W));
    1880 
    18811897  return (FALSE);
    18821898}
     
    19141930
    19151931
    1916   if (!rc) return (TRUE);
     1932  if(rc == NO_ERROR) {
     1933      SetLastError(ERROR_SUCCESS_W);
     1934      return (TRUE);
     1935  }
    19171936  SetLastError(error2WinError(rc,ERROR_PIPE_NOT_CONNECTED_W));
    1918 
    19191937  return (FALSE);
    19201938}
     
    19401958
    19411959  dprintf(("DosTransactNPipe returned rc=%d");)
    1942   if (!rc) return (TRUE);
     1960  if(rc == NO_ERROR) {
     1961      SetLastError(ERROR_SUCCESS_W);
     1962      return (TRUE);
     1963  }
    19431964  SetLastError(error2WinError(rc,ERROR_PIPE_NOT_CONNECTED_W));
    1944 
    19451965  return (FALSE);
    19461966}
     
    19671987    *lpcbAvail   = availData.cbpipe;
    19681988    *lpcbMessage = availData.cbmessage;
     1989    SetLastError(ERROR_SUCCESS_W);
    19691990    return (TRUE);
    19701991  }
    19711992  SetLastError(error2WinError(rc,ERROR_PIPE_NOT_CONNECTED_W));
    1972 
    19731993  return (FALSE);
    19741994}
     
    19832003  dprintf(("DosDisConnectNPipe returned rc=%d",rc));
    19842004
    1985   if (!rc) return TRUE;
     2005  if(rc == NO_ERROR) {
     2006      SetLastError(ERROR_SUCCESS_W);
     2007      return (TRUE);
     2008  }
    19862009  SetLastError(error2WinError(rc,ERROR_PIPE_NOT_CONNECTED_W));
    1987 
    19882010  return (FALSE);
    19892011}
     
    20102032  dprintf(("DosWaitNPipe returned rc=%d",rc));
    20112033
    2012   if (!rc) return TRUE;
     2034  if(rc == NO_ERROR) {
     2035      SetLastError(ERROR_SUCCESS_W);
     2036      return (TRUE);
     2037  }
    20132038  SetLastError(error2WinError(rc,ERROR_PIPE_NOT_CONNECTED_W));
    20142039
Note: See TracChangeset for help on using the changeset viewer.