DosPrintQEnum

The DosPrintQEnum API retrieves a list of all printer queues on a local workstation or a remote server, optionally supplying additional information.

Levels 0, 1, and 2 return queue names only if the number of bytes in the queue name is less than or equal to QNLEN, as defined in PMSPL.H. At levels 0, 1, and 2, the values of pcReturned and pcTotal are set to the count of queues with short names. At levels 3, 4, and 5, all queue names are returned, and the values pcReturned and pcTotal represent the count of all queues.