DosPrintJobEnum

The DosPrintJobEnum API retrieves a list of all print jobs on a specified printer queue, optionally supplying status information about each job.