John G Duffy
October 14th, 2001, 11:04 AM
Anyone know if its possible to determine if a printer is physically available (Remote as well as local printers)
Thanks in advance,
John G
Thanks in advance,
John G
|
Click to See Complete Forum and Search --> : Printer availability John G Duffy October 14th, 2001, 11:04 AM Anyone know if its possible to determine if a printer is physically available (Remote as well as local printers) Thanks in advance, John G Clearcode October 15th, 2001, 04:20 AM It *seems to be* the case that you can only get the status of the printer when it has one or more jobs queued. This can be done by using the GetPrinter() API call and filling the PRINTER_INFO_1 data structure. However, GetPrinter can return more bytes than the data structure PRINTER_INFO_1 so you need to allocate a buffer beforehand... It is a fairly difficult thing to do, so I have written an article on it at http://www.MerrionComputing.com/Programming/PrintStatus.htm and also incorporated it into the EventVB dll that is downloadable from the same site. HTH, Duncan ------------------------------------------------- Ex. Datis: Duncan Jones Merrion Computing Ltd http://www.merrioncomputing.com Check out the new downloads - ImageMap.ocx is the VB control that emulates an HTML image map, EventVB.OCX for adding new events to your VB form and adding System Tray support simply, MCL Hotkey for implemenmting system-wide hotkeys in your application...all with source code included. John G Duffy October 15th, 2001, 10:49 AM Duncan, Thanks for the reply. Not the answer I was hoping for but I can't have everything I guess. John G codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |