DosPrintDestEnum

The DosPrintDestEnum API retrieves a list of all print destinations on a server, optionally supplying status information about each.

At levels 0 and 1, DosPrintDestEnum returns print destination names only if they are associated with printer queues. At levels 2 and 3, DosPrintDestEnum returns all print destinations.