This function lists print queues on the local workstation or on a remote server, optionally supplying additional information.
#define INCL_SPL /* Or use INCL_PM, */ #include <os2.h> PSZ pszComputerName; /* Name of computer where queues are to be listed. */ ULONG ulLevel; /* Level of detail. */ PVOID pBuf; /* Buffer. */ ULONG cbBuf; /* Size, in bytes, of Buffer. */ PULONG pcReturned; /* Number of entries returned. */ PULONG pcTotal; /* Total number of entries available. */ PULONG pcbNeeded; /* Size in bytes of available information. */ PVOID pReserved; /* Reserved value, must be NULL. */ SPLERR rc; /* Return code. */ rc = SplEnumQueue(pszComputerName, ulLevel, pBuf, cbBuf, pcReturned, pcTotal, pcbNeeded, pReserved);