SplQueryPort: Difference between revisions
Appearance
Created page with "This function queries information about a printer port. == Syntax == SplQueryPort(pszComputerName, pszPortName, ulLevel, pBuf, cbBuf, pcbNeeded); == Parameters == ;..." |
mNo edit summary |
||
Line 1: | Line 1: | ||
This function queries information about a printer port. | This function queries information about a printer port. | ||
== Syntax == | == Syntax == | ||
SplQueryPort(pszComputerName, pszPortName, | SplQueryPort(pszComputerName, pszPortName, | ||
ulLevel, pBuf, cbBuf, pcbNeeded) | ulLevel, pBuf, cbBuf, pcbNeeded) | ||
== Parameters == | == Parameters == | ||
; pszComputerName (PSZ) - input | ;pszComputerName (PSZ) - input:Name of the computer connected to the port. | ||
:Name of the computer connected to the port. | :This value can be NULL for a local machine. | ||
;pszPortName (PSZ) - input:Name of the port to query. | |||
:This value can be NULL for a local machine. | ;ulLevel (ULONG) - input:Level of information to return. | ||
:This must be 2. | |||
;pszPortName (PSZ) - input | ;pBuf (PVOID) - output:Receives the PRPORTINFO2 data structure. | ||
:Name of the port to query. | :See [[PRPORTINFO2]] in Data Types for details on this data structure. | ||
;cbBuf (ULONG) - input:Length of buffer pointed to by pBuf, in bytes. | |||
;ulLevel (ULONG) - input | ;pcbNeeded (PULONG) - output:Receives length, in bytes, of buffer needed to return all the port data. | ||
:Level of information to return. | |||
:This must be 2. | |||
;pBuf (PVOID) - output | |||
:Receives the PRPORTINFO2 data structure. | |||
:See PRPORTINFO2 in Data Types | |||
;cbBuf (ULONG) - input | |||
:Length of buffer pointed to by pBuf, in bytes. | |||
;pcbNeeded (PULONG) - output | |||
:Receives length, in bytes, of buffer needed to return all the port data. | |||
== Returns == | == Returns == | ||
; rc (ULONG) - returns : Return codes. | ; rc (ULONG) - returns : Return codes. | ||
*0 Success | |||
*0 Success | *50 ERROR_NOT_SUPPORTED - Command not supported on pszComputerName. | ||
*87 ERROR_INVALID_PARAMETER - An invalid parameter was specified; most likely an invalid pBuf value. | |||
* | *124 ERROR_INVALID_LEVEL - ulLevel is not 2. | ||
*234 ERROR_MORE_DATA - Not all data could fit in pBuf. | |||
*2123 NERR_BufTooSmall - No data could fit in pBuf. | |||
*ERROR_INVALID_PARAMETER | *2152 NERR_DestNotFound - The port name does not exist. | ||
*ERROR_MORE_DATA | |||
*NERR_BufTooSmall | |||
*NERR_DestNotFound | |||
[[Category:Spl]] | [[Category:Spl]] |
Latest revision as of 15:49, 30 May 2021
This function queries information about a printer port.
Syntax
SplQueryPort(pszComputerName, pszPortName, ulLevel, pBuf, cbBuf, pcbNeeded)
Parameters
- pszComputerName (PSZ) - input
- Name of the computer connected to the port.
- This value can be NULL for a local machine.
- pszPortName (PSZ) - input
- Name of the port to query.
- ulLevel (ULONG) - input
- Level of information to return.
- This must be 2.
- pBuf (PVOID) - output
- Receives the PRPORTINFO2 data structure.
- See PRPORTINFO2 in Data Types for details on this data structure.
- cbBuf (ULONG) - input
- Length of buffer pointed to by pBuf, in bytes.
- pcbNeeded (PULONG) - output
- Receives length, in bytes, of buffer needed to return all the port data.
Returns
- rc (ULONG) - returns
- Return codes.
- 0 Success
- 50 ERROR_NOT_SUPPORTED - Command not supported on pszComputerName.
- 87 ERROR_INVALID_PARAMETER - An invalid parameter was specified; most likely an invalid pBuf value.
- 124 ERROR_INVALID_LEVEL - ulLevel is not 2.
- 234 ERROR_MORE_DATA - Not all data could fit in pBuf.
- 2123 NERR_BufTooSmall - No data could fit in pBuf.
- 2152 NERR_DestNotFound - The port name does not exist.