Click to See Complete Forum and Search --> : how to query printer status thru code?


Jeevan Sunkersett
April 16th, 1999, 04:04 AM
Hi,

Can someone tell me how to query the status of a printer, attached/ connected to one's desktop, thru code.?
I need to find out if the printer my application is trying to print to, is valid/ offline/ ... before attempting to print, to save on parsing log files, to find out why the print job did not print.

Parsing Log files, may look a small job, but for my application they are huge - 16Kb and higher.

Any clues, in VB/ VC/Win SDK will be appreciated, as I dont know MFC and Java.

regards

Jeevan

Lothar Haensler
April 16th, 1999, 07:10 AM
the printer status can be obtained from the PRINTER_INFO_2 structure (field "Status") using the GetPrinter API function (sorry, don't have a VB solution).