DosWaitNmPipe: Difference between revisions
Appearance
Created page with "==Description== This call waits for the availability of a named pipe instance. ==Syntax== <PRE> DosWaitNmPipe (FileName, TimeOut) </PRE> ==Parameters== ; FileName (PSZ..." |
mNo edit summary |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
This call waits for the availability of a named pipe instance. | This call waits for the availability of a named pipe instance. | ||
==Syntax== | ==Syntax== | ||
DosWaitNmPipe (FileName, TimeOut) | |||
DosWaitNmPipe | |||
==Parameters== | ==Parameters== | ||
; | ;FileName (PSZ) - input : Address of the ASCIIZ name of the pipe to be opened. Pipes are name \PIPE\FileName. | ||
; TimeOut (ULONG) - input : Maximum time in milliseconds to wait for the named pipe to become available. When a zero value is used, the [[DosMakeNmPipe]] specified default value is used. When a minus one value is used, an indefinite wait is entered. | |||
; TimeOut (ULONG) - input : Maximum time in milliseconds to wait for the named pipe to become available. When a zero value is used, the DosMakeNmPipe specified default value is used. When a minus one value is used, an indefinite wait is entered. | |||
==Return Code== | ==Return Code== | ||
;rc (USHORT) - return:Return code descriptions are: | |||
*0 NO_ERROR | |||
Return code descriptions are: | *2 ERROR_FILE_NOT_FOUND | ||
*95 ERROR_INTERRUPT | |||
* 0 | *231 ERROR_PIPE_BUSY | ||
* 2 | |||
* 95 | |||
* 231 | |||
==Remarks== | ==Remarks== | ||
Line 30: | Line 20: | ||
DosWaitNmPipe allows an application to wait for a server on a named pipe for which all instances are currently busy. The call waits up to TimeOut milliseconds (or a default time if TimeOut is zero). | DosWaitNmPipe allows an application to wait for a server on a named pipe for which all instances are currently busy. The call waits up to TimeOut milliseconds (or a default time if TimeOut is zero). | ||
When a pipe instance becomes available, it is given to the process whose thread has the highest priority. The priority of a thread may be changed with DosSetPrty. | When a pipe instance becomes available, it is given to the process whose thread has the highest priority. The priority of a thread may be changed with [[DosSetPrty]]. | ||
== | ==Bindings== | ||
===C | ===C=== | ||
<PRE> | <PRE> | ||
#define INCL_DOSNMPIPES | #define INCL_DOSNMPIPES | ||
Line 39: | Line 29: | ||
USHORT rc = DosWaitNmPipe(FileName, TimeOut); | USHORT rc = DosWaitNmPipe(FileName, TimeOut); | ||
PSZ | PSZ FileName; /* Pipe name */ | ||
ULONG | ULONG TimeOut; /* Maximum wait time */ | ||
USHORT | USHORT rc; /* return code */ | ||
</PRE> | </PRE> | ||
===MASM | ===MASM=== | ||
<PRE> | <PRE> | ||
EXTRN DosWaitNmPipe:FAR | EXTRN DosWaitNmPipe:FAR | ||
Line 56: | Line 46: | ||
Returns WORD | Returns WORD | ||
</PRE> | </PRE> | ||
[[Category: | [[Category:Dos16]] |
Latest revision as of 08:15, 26 January 2020
This call waits for the availability of a named pipe instance.
Syntax
DosWaitNmPipe (FileName, TimeOut)
Parameters
- FileName (PSZ) - input
- Address of the ASCIIZ name of the pipe to be opened. Pipes are name \PIPE\FileName.
- TimeOut (ULONG) - input
- Maximum time in milliseconds to wait for the named pipe to become available. When a zero value is used, the DosMakeNmPipe specified default value is used. When a minus one value is used, an indefinite wait is entered.
Return Code
- rc (USHORT) - return
- Return code descriptions are:
- 0 NO_ERROR
- 2 ERROR_FILE_NOT_FOUND
- 95 ERROR_INTERRUPT
- 231 ERROR_PIPE_BUSY
Remarks
This call should be used only when ERROR_PIPE_BUSY is returned from a DosOpen call.
DosWaitNmPipe allows an application to wait for a server on a named pipe for which all instances are currently busy. The call waits up to TimeOut milliseconds (or a default time if TimeOut is zero).
When a pipe instance becomes available, it is given to the process whose thread has the highest priority. The priority of a thread may be changed with DosSetPrty.
Bindings
C
#define INCL_DOSNMPIPES USHORT rc = DosWaitNmPipe(FileName, TimeOut); PSZ FileName; /* Pipe name */ ULONG TimeOut; /* Maximum wait time */ USHORT rc; /* return code */
MASM
EXTRN DosWaitNmPipe:FAR INCL_DOSNMPIPES EQU 1 PUSH@ ASCIIZ FileName ;Pipe name PUSH DWORD TimeOut ;Maximum wait time CALL DosWaitNmPipe Returns WORD