Ignore:
Timestamp:
Jan 3, 2000, 10:36:11 PM (26 years ago)
Author:
sandervl
Message:

THDB hab & hmq values set + named pipe updates

File:
1 edited

Legend:

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

    r2301 r2311  
    1 /* $Id: npipe.cpp,v 1.4 2000-01-02 22:51:58 sandervl Exp $ */
     1/* $Id: npipe.cpp,v 1.5 2000-01-03 21:36:10 sandervl Exp $ */
    22/*
    33 * Win32 Named pipes API
     
    2222//******************************************************************************
    2323//******************************************************************************
    24 BOOL WIN32API PeekNamedPipe(HANDLE hPipe, LPVOID lpvBuffer, DWORD cbBuffer,
    25                             LPDWORD lpcbRead, LPDWORD lpcbAvail, LPDWORD lpcbMessage)
    26 {
    27   dprintf(("PeekNamedPipe Not Implemented! - yet\n"));
    28   return(FALSE);
     24ODINFUNCTION6(BOOL,PeekNamedPipe,HANDLE ,hPipe,
     25                                 LPVOID ,lpvBuffer,
     26                                 DWORD  ,cbBuffer,
     27                                 LPDWORD,lpcbRead,
     28                                 LPDWORD,lpcbAvail,
     29                                 LPDWORD,lpcbMessage)
     30{
     31  return(OSLibDosPeekNamedPipe(hPipe,lpvBuffer,cbBuffer,lpcbRead,lpcbAvail,lpcbMessage));
    2932}
    3033//******************************************************************************
     
    3841//******************************************************************************
    3942//******************************************************************************
    40 //HANDLE WIN32API
    41 //                    DWORD nMaxInstances, DWORD nOutBufferSize,
    42 //                    DWORD nInBufferSize, DWORD nDefaultTimeOut,
    43 //                    void *lpSecurityAttributes)
    4443ODINFUNCTION8(HANDLE,CreateNamedPipeA,LPCTSTR,lpName, DWORD,dwOpenMode, DWORD,dwPipeMode,
    4544                                     DWORD, nMaxInstances, DWORD, nOutBufferSize,
     
    106105 * Status    : NOT FULLY TESTED
    107106 *
    108  * Author    : Przemyslaw Dobrowolski [Thu, 2000/01/02 12:48]
     107 * Author    : Przemyslaw Dobrowolski [Sun, 2000/01/02 12:48]
    109108 *****************************************************************************/
    110109
     
    143142 *
    144143 *             CallNamedPipe fails if the pipe is a byte-type pipe.
    145  * Status    : UNTESTED STUB
    146  *
    147  * Author    : Markus Montkowski [Thu, 1998/05/19 11:46]
    148  *****************************************************************************/
    149 
    150 BOOL WIN32API CallNamedPipeA( LPCSTR lpNamedPipeName,
    151                                   LPVOID lpInBuffer, DWORD nInBufferSize,
    152                                   LPVOID lpOutBuffer, DWORD nOutBufferSize,
    153                                   LPDWORD lpBytesRead, DWORD nTimeOut)
    154 {
    155 
    156   dprintf(("KERNEL32:  CallNamedPipeA(%08x,%08x,%08x,%08x,%08x,%08x) not implemented\n",
    157            lpNamedPipeName, lpInBuffer, nInBufferSize,
    158            lpOutBuffer, nOutBufferSize, lpBytesRead,  nTimeOut
    159           ));
    160 
    161   return (FALSE);
    162 }
    163 
    164 /*****************************************************************************
    165  * Name      : BOOL WIN32AOI CallNamedPipeA
     144 * Status    : NOT FULLY TESTED
     145 *
     146 * Author    : Przemyslaw Dobrowolski [Mon, 2000/01/03 13:32]
     147 *****************************************************************************/
     148
     149ODINFUNCTION7(BOOL,CallNamedPipeA,LPCSTR , lpNamedPipeName,
     150                                  LPVOID , lpInBuffer,
     151                                  DWORD  , nInBufferSize,
     152                                  LPVOID , lpOutBuffer,
     153                                  DWORD  , nOutBufferSize,
     154                                  LPDWORD, lpBytesRead,
     155                                  DWORD  , nTimeOut)
     156{
     157  return(OSLibDosCallNamedPipe(lpNamedPipeName,
     158                           lpInBuffer,
     159                           nInBufferSize,
     160                           lpOutBuffer,
     161                           nOutBufferSize,
     162                           lpBytesRead,
     163                           nTimeOut ));
     164}
     165
     166/*****************************************************************************
     167 * Name      : BOOL WIN32AOI CallNamedPipeW
    166168 * Purpose   : The CallNamedPipe function connects to a message-type pipe
    167169 *             (and waits if an instance of the pipe is not available),
     
    191193 *
    192194 *             CallNamedPipe fails if the pipe is a byte-type pipe.
    193  * Status    : UNTESTED STUB
    194  *
    195  * Author    : Markus Montkowski [Thu, 1998/05/19 11:46]
    196  *****************************************************************************/
    197 
    198 BOOL WIN32API CallNamedPipeW( LPCWSTR lpNamedPipeName,
    199                                   LPVOID lpInBuffer, DWORD nInBufferSize,
    200                                   LPVOID lpOutBuffer, DWORD nOutBufferSize,
    201                                   LPDWORD lpBytesRead, DWORD nTimeOut)
    202 {
    203 
    204   dprintf(("KERNEL32:  CallNamedPipeA(%08x,%08x,%08x,%08x,%08x,%08x) not implemented\n",
    205            lpNamedPipeName, lpInBuffer, nInBufferSize,
    206            lpOutBuffer, nOutBufferSize, lpBytesRead,  nTimeOut
    207           ));
    208 
    209   return (FALSE);
     195 * Status    : NOT FULLY TESTED
     196 *
     197 * Author    : Przemyslaw Dobrowolski [Mon, 2000/01/03 13:33]
     198 *****************************************************************************/
     199ODINFUNCTION7(BOOL,CallNamedPipeW,LPCWSTR , lpNamedPipeName,
     200                                  LPVOID , lpInBuffer,
     201                                  DWORD  , nInBufferSize,
     202                                  LPVOID , lpOutBuffer,
     203                                  DWORD  , nOutBufferSize,
     204                                  LPDWORD, lpBytesRead,
     205                                  DWORD  , nTimeOut)
     206{
     207  char *asciiname;
     208  BOOL rc;
     209
     210  asciiname  = UnicodeToAsciiString((LPWSTR)lpNamedPipeName);
     211
     212  rc=OSLibDosCallNamedPipe(asciiname,
     213                           lpInBuffer,
     214                           nInBufferSize,
     215                           lpOutBuffer,
     216                           nOutBufferSize,
     217                           lpBytesRead,
     218                           nTimeOut );
     219
     220  FreeAsciiString(asciiname);
     221
     222  return(rc);
    210223}
    211224/*****************************************************************************
     
    218231 *             If the function fails, the return value is zero
    219232 * Remark    :
    220  * Status    : UNTESTED STUB
    221  *
    222  * Author    : Markus Montkowski [Tha, 1998/05/21 17:46]
    223  *****************************************************************************/
    224 
    225 BOOL WIN32API DisconnectNamedPipe(HANDLE hNamedPipe)
    226 {
    227 
    228   dprintf(("KERNEL32: DisconnectNamedPipe(%08x) not implemented\n",
    229            hNamedPipe
    230           ));
    231 
    232   return (FALSE);
     233 * Status    : NOT FULLY TESTED
     234 *
     235 * Author    : Przemyslaw Dobrowolski [Mon, 2000/01/03 13:34]
     236 *****************************************************************************/
     237
     238ODINFUNCTION1(BOOL,DisconnectNamedPipe,HANDLE,hNamedPipe)
     239{
     240  return (OSLibDosDisconnectNamedPipe(hNamedPipe));
    233241}
    234242
     
    261269                                          DWORD   nMaxUserNameSize)
    262270{
    263   dprintf(("KERNEL32: GetNamedPipeHandleStateA(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented\n",
     271  dprintf(("KERNEL32: GetNamedPipeHandleStateA(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented (yet)\n",
    264272           hNamedPipe,
    265273           lpState,
     
    367375
    368376BOOL WIN32API SetNamedPipeHandleState(HANDLE  hNamedPipe,
    369                                          LPDWORD lpdwMode,
    370                                          LPDWORD lpcbMaxCollect,
    371                                          LPDWORD lpdwCollectDataTimeout)
     377                                      LPDWORD lpdwMode,
     378                                      LPDWORD lpcbMaxCollect,
     379                                      LPDWORD lpdwCollectDataTimeout)
    372380{
    373381  dprintf(("KERNEL32: SetNamedPipeHandleState(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
     
    395403 * Result    : TRUE / FALSE
    396404 * Remark    :
    397  * Status    : UNTESTED STUB
    398  *
    399  * Author    : Patrick Haller [Mon, 1998/06/15 08:00]
    400  *****************************************************************************/
    401 
    402 DWORD WIN32API TransactNamedPipe(HANDLE       hNamedPipe,
    403                                     LPVOID       lpvWriteBuf,
    404                                     DWORD        cbWriteBuf,
    405                                     LPVOID       lpvReadBuf,
    406                                     DWORD        cbReadBuf,
    407                                     LPDWORD      lpcbRead,
    408                                     LPOVERLAPPED lpo)
    409 {
    410   dprintf(("KERNEL32: TransactNamedPipe(%08x,%08x,%08x,%08x,%08x,%08x,%08x) not implemented.\n",
    411            hNamedPipe,
    412            lpvWriteBuf,
    413            cbWriteBuf,
    414            lpvReadBuf,
    415            cbReadBuf,
    416            lpcbRead,
    417            lpo));
    418 
    419   return (FALSE);
     405 * Status    : NOT FULLY TESTED (YET!)
     406 *
     407 * Author    : Przemysˆaw Dobrowolski [Mon, 2000/01/03 08:48]
     408 *****************************************************************************/
     409
     410ODINFUNCTION7(DWORD,TransactNamedPipe,HANDLE,hNamedPipe,
     411                                      LPVOID,lpvWriteBuf,
     412                                      DWORD,cbWriteBuf,
     413                                      LPVOID,lpvReadBuf,
     414                                      DWORD,cbReadBuf,
     415                                      LPDWORD,lpcbRead,
     416                                      LPOVERLAPPED,lpo)
     417{
     418  return(OSLibDosTransactNamedPipe( hNamedPipe,
     419                                    lpvWriteBuf,
     420                                    cbWriteBuf,
     421                                    lpvReadBuf,
     422                                    cbReadBuf,
     423                                    lpcbRead,
     424                                    lpo));
     425
    420426}
    421427
     
    431437 * Result    : TRUE / FALSE
    432438 * Remark    :
    433  * Status    : UNTESTED STUB
    434  *
    435  * Author    : Patrick Haller [Mon, 1998/06/15 08:00]
    436  *****************************************************************************/
    437 
    438 BOOL WIN32API WaitNamedPipeA(LPCTSTR lpszNamedPipeName,
    439                                 DWORD   dwTimeout)
    440 {
    441   dprintf(("KERNEL32: WaitNamedPipeA(%s, %u) not implemented.\n",
    442            lpszNamedPipeName,
    443            dwTimeout));
    444 
    445   return (FALSE);
     439 * Status    : UNTESTED (YET)
     440 *
     441 * Author    : Przemyslaw Dobrowolski [Mon, 2000/01/03 13:52]
     442 *****************************************************************************/
     443
     444ODINFUNCTION2(BOOL,WaitNamedPipeA,LPCSTR,lpszNamedPipeName, DWORD, dwTimeout)
     445{
     446  return(OSLibDosWaitNamedPipe(lpszNamedPipeName, dwTimeout));
    446447}
    447448
     
    458459 * Result    : TRUE / FALSE
    459460 * Remark    :
    460  * Status    : UNTESTED STUB
    461  *
    462  * Author    : Patrick Haller [Mon, 1998/06/15 08:00]
    463  *****************************************************************************/
    464 
    465 BOOL WIN32API WaitNamedPipeW(LPCWSTR lpszNamedPipeName,
    466                                 DWORD   dwTimeout)
    467 {
    468   dprintf(("KERNEL32: WaitNamedPipeW(%s, %u) not implemented.\n",
    469            lpszNamedPipeName,
    470            dwTimeout));
    471 
    472   return (FALSE);
    473 }
     461 * Status    : UNTESTED (YET)
     462 *
     463 * Author    : Przemyslaw Dobrowolski [Mon, 2000/01/03 13:44]
     464 *****************************************************************************/
     465
     466ODINFUNCTION2(BOOL,WaitNamedPipeW,LPCWSTR,lpszNamedPipeName, DWORD, dwTimeout)
     467{
     468  char  *asciiname;
     469  DWORD rc;
     470
     471  asciiname  = UnicodeToAsciiString((LPWSTR)lpszNamedPipeName);
     472
     473  rc=OSLibDosWaitNamedPipe(asciiname, dwTimeout);
     474
     475  FreeAsciiString(asciiname);
     476
     477  return(rc);
     478}
Note: See TracChangeset for help on using the changeset viewer.