DosQNmPipeInfo: Difference between revisions
Appearance
No edit summary |
mNo edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
This call returns information for a named pipe. | This call returns information for a named pipe. | ||
Line 9: | Line 5: | ||
==Parameters== | ==Parameters== | ||
;Handle (HPIPE) - input : Handle of the named pipe that is returned by DosMakeNmPipe or DosOpen. | ;Handle (HPIPE) - input : Handle of the named pipe that is returned by [[DosMakeNmPipe]] or [[DosOpen]]. | ||
;InfoLevel (USHORT) - input : Level of the required pipe information. Only level 1 file information is supported. | ;InfoLevel (USHORT) - input : Level of the required pipe information. Only level 1 file information is supported. | ||
;InfoBuf (PBYTE) - output : Address of the storage area that returns the requested level of named pipe information. For InfoLevel = 1, file information is returned in the following format: | ;InfoBuf (PBYTE) - output : Address of the storage area that returns the requested level of named pipe information. For InfoLevel = 1, file information is returned in the following format: | ||
::outbufsize (USHORT): Actual size of buffer for outgoing I/O. | |||
outbufsize (USHORT): Actual size of buffer for outgoing I/O. | ::inbufsize (USHORT) : Actual size of buffer for ingoing I/O. | ||
::maxnuminstances (UCHAR) : Maximum allowed number of pipe instances. | |||
inbufsize (USHORT) : Actual size of buffer for ingoing I/O. | ::numinstances (UCHAR) : Current number of pipe instances. | ||
::namelength (UCHAR) : Length of pipe name. | |||
maxnuminstances (UCHAR) : Maximum allowed number of pipe instances. | ::pipename (CHAR) : Name of pipe (including \\ComputerName, if remote). | ||
;InfoBufSize (USHORT) - input : Length of InfoBuf. | |||
numinstances (UCHAR) : Current number of pipe instances. | |||
namelength (UCHAR) : Length of pipe name. | |||
pipename (CHAR) : Name of pipe (including \\ComputerName, if remote). | |||
; InfoBufSize (USHORT) - input : Length of InfoBuf. | |||
==Return Code== | ==Return Code== | ||
;rc (USHORT) - return:Return code descriptions are: | |||
*0 NO_ERROR | |||
Return code descriptions are: | *111 ERROR_BUFFER_OVERFLOW | ||
* 0 | *124 ERROR_INVALID_LEVEL | ||
* 111 ERROR_BUFFER_OVERFLOW | *230 ERROR_BAD_PIPE | ||
* 124 ERROR_INVALID_LEVEL | |||
* 230 ERROR_BAD_PIPE | |||
==Remarks== | ==Remarks== | ||
Line 42: | Line 28: | ||
For level 1 information, if the length of the name of the pipe is greater than 255 bytes, then a length of zero is returned in the length field. The full ASCIIZ name will still be returned in this case. | For level 1 information, if the length of the name of the pipe is greater than 255 bytes, then a length of zero is returned in the length field. The full ASCIIZ name will still be returned in this case. | ||
== | ==Bindings== | ||
===C | ===C=== | ||
<PRE> | <PRE> | ||
typedef struct npi_data1 { | typedef struct npi_data1 { /* PipeInfo data block (returned, level 1) */ | ||
USHORT npi_obuflen; /* length of outgoing I/O buffer */ | |||
USHORT npi_obuflen; | USHORT npi_ibuflen; /* length of incoming I/O buffer */ | ||
USHORT npi_ibuflen; | UCHAR npi_maxicnt; /* maximum number of instances */ | ||
UCHAR npi_maxicnt; | UCHAR npi_curicnt; /* current number of instances */ | ||
UCHAR npi_curicnt; | UCHAR npi_namlen; /* length of pipe name */ | ||
UCHAR npi_namlen; | CHAR npi_name[1]; /* start of name */ | ||
CHAR npi_name[1]; | |||
}; /* npi_data1 */ | }; /* npi_data1 */ | ||
Line 59: | Line 44: | ||
USHORT rc = DosQNmPipeInfo(Handle, InfoLevel, InfoBuf, InfoBufSize); | USHORT rc = DosQNmPipeInfo(Handle, InfoLevel, InfoBuf, InfoBufSize); | ||
HPIPE | HPIPE Handle; /* Pipe handle */ | ||
USHORT | USHORT InfoLevel; /* Pipe data required */ | ||
PBYTE | PBYTE InfoBuf; /* Pipe data buffer */ | ||
USHORT | USHORT InfoBufSize; /* Pipe data buffer size */ | ||
USHORT | USHORT rc; /* return code */ | ||
</PRE> | </PRE> | ||
===MASM | ===MASM=== | ||
<PRE> | <PRE> | ||
EXTRN DosQNmPipeInfo:FAR | EXTRN DosQNmPipeInfo:FAR | ||
Line 80: | Line 65: | ||
Returns WORD | Returns WORD | ||
</PRE> | </PRE> | ||
[[Category: | [[Category:Dos16]] |
Latest revision as of 06:19, 26 January 2020
This call returns information for a named pipe.
Syntax
DosQNmPipeInfo (Handle, InfoLevel, InfoBuf, InfoBufSize)
Parameters
- Handle (HPIPE) - input
- Handle of the named pipe that is returned by DosMakeNmPipe or DosOpen.
- InfoLevel (USHORT) - input
- Level of the required pipe information. Only level 1 file information is supported.
- InfoBuf (PBYTE) - output
- Address of the storage area that returns the requested level of named pipe information. For InfoLevel = 1, file information is returned in the following format:
- outbufsize (USHORT): Actual size of buffer for outgoing I/O.
- inbufsize (USHORT) : Actual size of buffer for ingoing I/O.
- maxnuminstances (UCHAR) : Maximum allowed number of pipe instances.
- numinstances (UCHAR) : Current number of pipe instances.
- namelength (UCHAR) : Length of pipe name.
- pipename (CHAR) : Name of pipe (including \\ComputerName, if remote).
- InfoBufSize (USHORT) - input
- Length of InfoBuf.
Return Code
- rc (USHORT) - return
- Return code descriptions are:
- 0 NO_ERROR
- 111 ERROR_BUFFER_OVERFLOW
- 124 ERROR_INVALID_LEVEL
- 230 ERROR_BAD_PIPE
Remarks
DosQNmPipeInfo returns all the information that fits in InfoBuf.
For level 1 information, if the length of the name of the pipe is greater than 255 bytes, then a length of zero is returned in the length field. The full ASCIIZ name will still be returned in this case.
Bindings
C
typedef struct npi_data1 { /* PipeInfo data block (returned, level 1) */ USHORT npi_obuflen; /* length of outgoing I/O buffer */ USHORT npi_ibuflen; /* length of incoming I/O buffer */ UCHAR npi_maxicnt; /* maximum number of instances */ UCHAR npi_curicnt; /* current number of instances */ UCHAR npi_namlen; /* length of pipe name */ CHAR npi_name[1]; /* start of name */ }; /* npi_data1 */ #define INCL_DOSNMPIPES USHORT rc = DosQNmPipeInfo(Handle, InfoLevel, InfoBuf, InfoBufSize); HPIPE Handle; /* Pipe handle */ USHORT InfoLevel; /* Pipe data required */ PBYTE InfoBuf; /* Pipe data buffer */ USHORT InfoBufSize; /* Pipe data buffer size */ USHORT rc; /* return code */
MASM
EXTRN DosQNmPipeInfo:FAR INCL_DOSNMPIPES EQU 1 PUSH WORD Handle ;Pipe handle PUSH WORD InfoLevel ;Pipe data required PUSH@ OTHER InfoBuf ;Pipe data buffer PUSH WORD InfoBufSize ;Pipe data buffer size CALL DosQNmPipeInfo Returns WORD