Re: Printer status

"Irwan" <[email protected]>
Newsgroups gmane.comp.lang.delphi.programming
Message-ID <[email protected]>
from SwissDelphiCenter, too bad that it only works in Win 9x. for NT/XP i
don't know. :

*****
function TestPrinterStatus(LPTPort: word): byte;
var
  Status: byte;
  CheckLPT: word;
begin
  Status := 0;
  if (LPTPort >= 1) and (LPTPort <= 3) then
    begin
      CheckLPT := LPTPort -1;
      asm
        mov dx, CheckLPT;
        mov al, 0;
        mov ah, 2;
        int 17h;
        mov &Status, ah;
      end;
    end;
  Result := Status;
end;

{
Pass in the LPT port number you want to check & get the following back:
01h - Timeout
08h - I/O Error
10h - Printer selected
20h - Out of paper
40h - Printer acknowledgement
80h - Printer not busy (0 if busy)

Note:
This function doesn't work under NT, it gives an access violation
from the DOS interrupt call.
}



-----Original Message-----
From: frank_fgy <[email protected]>
To: [email protected] <[email protected]>
Date: Wednesday, July 16, 2003 1:36 AM
Subject: [Delphi] Printer status


>Hi there,
>
>does anybody knows how to get the status information
>of a printer (like: online/offline/out off paper,...)
>with  Delphi 6? It has to work with W98 and also W2K.
>
>Another question is how to catch the windows system
>message that appears always if windows establishes a
>problem while printing.
>
>Thanks for any tips
>Frank.
>
>
>
>
>CodeCoffer - new Delphi code protection Tool!
>http://www.delphicollection.com/public/CodeCoffer.htm
>---------------------------------------------------------------
>Unsubscribe:[email protected]
>List owner:[email protected]
>---------------------------------------------------------------
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Free shipping on all inkjet cartridge & refill kit orders to US & Canada. Low prices up to 80% off. We have your brand: HP, Epson, Lexmark & more.
http://www.c1tracking.com/l.asp?cid=5510
http://us.click.yahoo.com/GHXcIA/n.WGAA/ySSFAA/i7folB/TM
---------------------------------------------------------------------~->

CodeCoffer - new Delphi code protection Tool!
http://www.delphicollection.com/public/CodeCoffer.htm
---------------------------------------------------------------
Unsubscribe:[email protected]
List owner:[email protected]
--------------------------------------------------------------- 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.