DosQNmPipeInfo: Difference between revisions
Appearance
m Ak120 moved page OS2 API:CPI:LEGACY:DosQNmPipeInfo to DosQNmPipeInfo |
mNo edit summary |
||
Line 1: | Line 1: | ||
This call returns information for a named pipe. | This call returns information for a named pipe. | ||
==Syntax== | ==Syntax== | ||
DosQNmPipeInfo (Handle, InfoLevel, InfoBuf, InfoBufSize) | |||
DosQNmPipeInfo | |||
==Parameters== | ==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. | |||
; 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. | ||
Line 34: | Line 28: | ||
Return code descriptions are: | Return code descriptions are: | ||
* 0 NO_ERROR | |||
* 0 | * 111 ERROR_BUFFER_OVERFLOW | ||
* 111 | * 124 ERROR_INVALID_LEVEL | ||
* 124 | * 230 ERROR_BAD_PIPE | ||
* 230 | |||
==Remarks== | ==Remarks== | ||
Line 45: | Line 37: | ||
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. | ||
==Example Code== | ==Example Code== | ||
Line 88: | Line 79: | ||
* | * | ||
[[Category:Dos]] | |||
[[Category: |
Revision as of 01:01, 27 February 2017
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.
Example Code
C Binding
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 Binding
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