Jump to content

SplGetPortFromQ: Difference between revisions

From EDM2
 
Line 15: Line 15:
;pcbNeeded (ULONG) - output:Receives length, in bytes, of buffer needed to return all port data.
;pcbNeeded (ULONG) - output:Receives length, in bytes, of buffer needed to return all port data.


==Returns==
;rc (ULONG) - returns : Return codes.
;rc (ULONG) - returns : Return codes.
::0 Success
::0 Success

Latest revision as of 21:35, 10 December 2023

This function gets a list of ports connected to the print queue for the print object or applications. This function is used by the print object to determine if some menu items can be enabled based on the type of printer port connected to a print queue.

Syntax

SplGetPortFromQ(pszComputerName, pszQueueName, ulLevel, pBuf, cbBuf, pcbNeeded)

Parameters

pszComputerName (PSZ) - input
Name of the computer on which pszQueueName exists.
This value is NULL if the queue is local or if the queue references a network print queue.
pszQueueName (PSZ) - input
Name of print queue.
This is the print queue name on pszComputerName or a local print queue name that may reference a network print queue.
ulLevel (ULONG) - input
Level of information to return.
Only level 1 is supported, which returns the GETPORTFROMQ data structure. See GETPORTFROMQ in Data Types for details on this data structure.
pBuf (PVOID) - output
Receives the GETPORTFROMQ data structure.
cbBuf (ULONG) - input
Length of buffer pointed to by pBuf, in bytes.
pcbNeeded (ULONG) - output
Receives length, in bytes, of buffer needed to return all port data.

Returns

rc (ULONG) - returns
Return codes.
0 Success
ERROR_NOT_SUPPORTED(50) Command not supported on pszComputerName.
ERROR_BAD_NETPATH(53) The computer name specified is not available or is invalid.
ERROR_BAD_NET_NAME(67) The computer name cannot be found.
ERROR_INVALID_PARAMETER(87) An invalid parameter was specified; most likely an invalid pBuf value.
ERROR_INVALID_LEVEL(124) ulLevel is not 1.
ERROR_MORE_DATA(234) Not all data could fit in pBuf.
NERR_BufTooSmall(2123) No data could fit in pBuf.
NERR_QNotFound(2150) The queue name does not exist.