DosCallNmPipe: Difference between revisions
Appearance
No edit summary |
mNo edit summary |
||
(One intermediate revision by the same user 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. | ||
Line 19: | Line 15: | ||
==Return Code== | ==Return Code== | ||
;rc (USHORT) - return:Return code descriptions are: | |||
Return code descriptions are: | * 0 NO_ERROR | ||
* 0 | * 2 ERROR_FILE_NOT_FOUND | ||
* 2 | * 11 ERROR_BAD_FORMAT | ||
* 11 | * 230 ERROR_BAD_PIPE | ||
* 230 | * 231 ERROR_PIPE_BUSY | ||
* 231 | * 233 ERROR_PIPE_NOT_CONNECTED | ||
* 233 | * 234 ERROR_MORE_DATA | ||
* 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 42: | 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 69: | 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