How to get a list of NT printer queues and job status 
Author Message
 How to get a list of NT printer queues and job status

Can anyone tell me if you can get a list of printer queues on an NT server
and then query a queue for a list of print jobs and job status from VB 5.0 ?

Thanks

Dave




Sun, 20 May 2001 03:00:00 GMT  
 How to get a list of NT printer queues and job status
Dave,

To list all queues on a server: EnumPrinters
To list all jobs in a queueu: OpenPrinter > EnumJobs > ClosePrinter
To get printer details: OpenPrinter > GetPrinter > ClosePrinter

Declare Function EnumPrinters Lib "winspool.drv" Alias "EnumPrintersA"
(ByVal Flags As Long, ByVal Name As String, ByVal Level As Long,
pPrinterEnum As Any, ByVal cdBuf As Long, pcbNeeded As Long, pcReturned As
Long) As Long
Declare Function OpenPrinter Lib "winspool.drv" Alias "OpenPrinterA" (ByVal
pPrinterName As String, phPrinter As Long, pDefault As PRINTER_DEFAULTS) As
Long
Declare Function EnumJobs Lib "winspool.drv" Alias "EnumJobsA" (ByVal
hPrinter As Long, ByVal FirstJob As Long, ByVal NoJobs As Long, ByVal Level
As Long, pJob As Any, ByVal cdBuf As Long, pcbNeeded As Long, pcReturned As
Long) As Long
Declare Function ClosePrinter Lib "winspool.drv" (ByVal hPrinter As Long) As
Long
Declare Function GetPrinter Lib "winspool.drv" Alias "GetPrinterA" (ByVal
hPrinter As Long, ByVal Level As Long, pPrinter As Any, ByVal cbBuf As Long,
pcbNeeded As Long) As Boolean

bye,

Richard

--------------------------------------

Quote:

>Can anyone tell me if you can get a list of printer queues on an NT server
>and then query a queue for a list of print jobs and job status from VB 5.0
?

>Thanks

>Dave





Sun, 03 Jun 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Name of printer jobs in queue

2. HELP: Jobs count in printer queue

3. Change print job name in printer queue

4. Status of a printer queue in Win3.11

5. Getting Printer and Printer Job Handle

6. Printing Queue: How many jobs and job names???

7. How to get printer information about its status and jobs

8. Getting Printing queues of a NT

9. Q: Forcing Printer Paper bins / Getting List Per Printer

10. getting printer status

11. Getting Printer Status

12. GETTING PRINTER STATUS

 

 
Powered by phpBB® Forum Software