Date: Sat, 31 Mar 2001 18:08:47 +0200 Newsgroups: borland.public.delphi.winapi Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Newsreader: Virtual Access by Atlantic Coast PLC, http://www.atlantic-coast.com/va Organization: TeamB Message-ID: Subject: Re: Detect Printer From: "Peter Below (TeamB)" <100113.1101@compuXXserve.com> Reply-To: 100113.1101@compuXXserve.com References: <3ac32f7d_1@dnews> NNTP-Posting-Host: 62.226.203.206 X-Trace: 31 Mar 2001 08:06:38 -0800, 62.226.203.206 Lines: 20 Path: dnews!62.226.203.206 Xref: dnews borland.public.delphi.winapi:128427 In article <3ac32f7d_1@dnews>, Paul Boey wrote: > > How to detect whether the printer is on or not? > There is no standard method for this open to a Win32 program. Such a program is supposed to leave the print spooler to worry about printer errors. So what you can do is send off a print request through the spooler (Any printing through API functions will do that) and then check on its fate using EnumJobs or GetJob (WinSpool unit, win32.hlp). This allows you to detect when the job ran into trouble but as far as i know there is really no reliable way to figure out probable problem spots up front, at least nothing that is generic (will work on all platforms and for all kinds of printers). Peter Below (TeamB) 100113.1101@compuserve.com) No e-mail responses, please, unless explicitly requested! Note: I'm unable to visit the newsgroups every day at the moment, so be patient if you don't get a reply immediately.