DosCallNmPipe: Difference between revisions
Appearance
Created page with "==Description== This call performs a "procedure call" transaction using a message pipe. ==Syntax== <PRE> DosCallNmPipe (FileName, InBuffer, InBufferLen, OutBuffer, Out..." |
mNo edit summary |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
This call performs a "procedure call" transaction using a message pipe. | |||
This call performs a "procedure call" transaction using a message pipe. | |||
==Syntax== | ==Syntax== | ||
DosCallNmPipe (FileName, InBuffer, InBufferLen, | |||
DosCallNmPipe | OutBuffer, OutBufferLen, BytesOut, TimeOut) | ||
==Parameters== | ==Parameters== | ||
; FileName (PSZ) - input : Address of the ASCIIZ name of the pipe to be opened. Pipes are named \PIPE\FileName. | ;FileName (PSZ) - input : Address of the ASCIIZ name of the pipe to be opened. Pipes are named \PIPE\FileName. | ||
;InBuffer (PBYTE) - input : Address of the buffer to write to the pipe. | |||
; InBuffer (PBYTE) - input : Address of the buffer to write to the pipe. | ;InBufferLen (USHORT) - input : Number of bytes to be written. | ||
;OutBuffer (PBYTE) - input/output : Address of the buffer for returned data. | |||
; InBufferLen (USHORT) - input : Number of bytes to be written. | ;OutBufferLen (USHORT) - input : Maximum size (number of bytes) of returned data. | ||
;BytesOut (PUSHORT) - output : Address of the variable where the system returns the number of bytes actually read (returned). | |||
; OutBuffer (PBYTE) - input/output : Address of the buffer for returned data. | ;TimeOut (ULONG) - input : Maximum time to wait for pipe availability. | ||
; OutBufferLen (USHORT) - input : Maximum size (number of bytes) of returned data. | |||
; BytesOut (PUSHORT) - output : Address of the variable where the system returns the number of bytes actually read (returned). | |||
; TimeOut (ULONG) - input : Maximum time to wait for pipe availability. | |||
==Return Code== | ==Return Code== | ||
;rc (USHORT) - return:Return code descriptions are: | |||
* 0 NO_ERROR | |||
Return code descriptions are: | * 2 ERROR_FILE_NOT_FOUND | ||
* 11 ERROR_BAD_FORMAT | |||
* 0 | * 230 ERROR_BAD_PIPE | ||
* 2 | * 231 ERROR_PIPE_BUSY | ||
* 11 | * 233 ERROR_PIPE_NOT_CONNECTED | ||
* 230 | * 234 ERROR_MORE_DATA | ||
* 231 | |||
* 233 | |||
* 234 | |||
==Remarks== | ==Remarks== | ||
This call is intended for use only on duplex message pipes. If this call is issued for a pipe that is not a duplex message pipe, ERROR_BAD_FORMAT is returned. | This call is intended for use only on duplex message pipes. If this call is issued for a pipe that is not a duplex message pipe, ERROR_BAD_FORMAT is returned. | ||
This call has the combined effect on a named pipe of DosOpen, DosTransactNmPipe, and DosClose. It provides an efficient means of implementing local and remote procedure-call (RPC) interfaces between processes. | This call has the combined effect on a named pipe of DosOpen, [[DosTransactNmPipe]], and DosClose. It provides an efficient means of implementing local and remote procedure-call (RPC) interfaces between processes. | ||
== | ==Bindings== | ||
===C | ===C=== | ||
<PRE> | <PRE> | ||
#define INCL_DOSNMPIPES | #define INCL_DOSNMPIPES | ||
Line 50: | Line 37: | ||
OutBufferLen, BytesOut, TimeOut); | OutBufferLen, BytesOut, TimeOut); | ||
PSZ | PSZ FileName; /* Pipe name */ | ||
PBYTE | PBYTE InBuffer; /* Write buffer address */ | ||
USHORT | USHORT InBufferLen; /* Write buffer length */ | ||
PBYTE | PBYTE OutBuffer; /* Read buffer address */ | ||
USHORT | USHORT OutBufferLen; /* Read buffer length * | ||
PUSHORT | PUSHORT BytesOut; /* Bytes read (returned) */ | ||
ULONG | ULONG TimeOut; /* Maximum wait time */ | ||
USHORT | USHORT rc; /* return code */ | ||
</PRE> | </PRE> | ||
===MASM | ===MASM=== | ||
<PRE> | <PRE> | ||
EXTRN DosCallNmPipe:FAR | EXTRN DosCallNmPipe:FAR | ||
Line 77: | Line 64: | ||
Returns WORD | Returns WORD | ||
</PRE> | </PRE> | ||
[[Category: | [[Category:Dos16]] |
Latest revision as of 02:44, 26 January 2020
This call performs a "procedure call" transaction using a message pipe.
Syntax
DosCallNmPipe (FileName, InBuffer, InBufferLen, OutBuffer, OutBufferLen, BytesOut, TimeOut)
Parameters
- FileName (PSZ) - input
- Address of the ASCIIZ name of the pipe to be opened. Pipes are named \PIPE\FileName.
- InBuffer (PBYTE) - input
- Address of the buffer to write to the pipe.
- InBufferLen (USHORT) - input
- Number of bytes to be written.
- OutBuffer (PBYTE) - input/output
- Address of the buffer for returned data.
- OutBufferLen (USHORT) - input
- Maximum size (number of bytes) of returned data.
- BytesOut (PUSHORT) - output
- Address of the variable where the system returns the number of bytes actually read (returned).
- TimeOut (ULONG) - input
- Maximum time to wait for pipe availability.
Return Code
- rc (USHORT) - return
- Return code descriptions are:
- 0 NO_ERROR
- 2 ERROR_FILE_NOT_FOUND
- 11 ERROR_BAD_FORMAT
- 230 ERROR_BAD_PIPE
- 231 ERROR_PIPE_BUSY
- 233 ERROR_PIPE_NOT_CONNECTED
- 234 ERROR_MORE_DATA
Remarks
This call is intended for use only on duplex message pipes. If this call is issued for a pipe that is not a duplex message pipe, ERROR_BAD_FORMAT is returned.
This call has the combined effect on a named pipe of DosOpen, DosTransactNmPipe, and DosClose. It provides an efficient means of implementing local and remote procedure-call (RPC) interfaces between processes.
Bindings
C
#define INCL_DOSNMPIPES USHORT rc = DosCallNmPipe(FileName, InBuffer, InBufferLen, OutBuffer, OutBufferLen, BytesOut, TimeOut); PSZ FileName; /* Pipe name */ PBYTE InBuffer; /* Write buffer address */ USHORT InBufferLen; /* Write buffer length */ PBYTE OutBuffer; /* Read buffer address */ USHORT OutBufferLen; /* Read buffer length * PUSHORT BytesOut; /* Bytes read (returned) */ ULONG TimeOut; /* Maximum wait time */ USHORT rc; /* return code */
MASM
EXTRN DosCallNmPipe:FAR INCL_DOSNMPIPES EQU 1 PUSH@ ASCIIZ FileName ;Pipe name PUSH@ OTHER InBuffer ;Write buffer PUSH WORD InBufferLen ;Write buffer length PUSH@ OTHER OutBuffer ;Read buffer PUSH WORD OutBufferLen ;Read buffer length PUSH@ WORD BytesOut ;Bytes read (returned) PUSH DWORD TimeOut ;Maximum wait time CALL DosCallNmPipe Returns WORD