To detect the LPT2 & LPT3 printer 
Author Message
 To detect the LPT2 & LPT3 printer

Hello,

Does anybody have a experience to detect the LPT2 or LPT3 printer is
ready or not ?



Sat, 21 Nov 1998 03:00:00 GMT  
 To detect the LPT2 & LPT3 printer


Quote:

>Hello,

>Does anybody have a experience to detect the LPT2 or LPT3 printer is
>ready or not ?

Sure.

Get isprinte.zip from

http://www.iag.net/~philb

Terry



Sat, 21 Nov 1998 03:00:00 GMT  
 To detect the LPT2 & LPT3 printer

Quote:
>Does anybody have a experience to detect the LPT2 or LPT3 printer is
>ready or not ?

Get the NanForum Toolkit.  It has FT_IsPrinter(), which lets you check any
port.

-- Clayton --

   Clayton Neff                           SAVID International
   Member of the "Gang of Four" liason group to CA.
   Member of the Technicon Steering Committee 1993-1994



Sat, 21 Nov 1998 03:00:00 GMT  
 To detect the LPT2 & LPT3 printer


Quote:

>Hello,

>Does anybody have a experience to detect the LPT2 or LPT3 printer is
>ready or not ?

Terry Carmen put a routine on my www site called ISPRINT.ZIP.

--

                       WWW  http://www.iag.net/~philb/
                  FTP Site  ftp://ftp.iag.net/pub/clipper
                      FIDO  1:363/299



Sat, 21 Nov 1998 03:00:00 GMT  
 To detect the LPT2 & LPT3 printer

By chance I tried to use ISPRINTE.OBJ yesterday. I couldn't make it
work. When I gave it bad parameters it correctly returned false, but
it happily said I had 4 printers ready and waiting - LPT1 to LPT4.
Which I dont, nor a network. I looked at the ASM which seemed fine
so I'm not sure what I may be doing wrong.

Alex Strickland

Quote:


> >Hello,

> >Does anybody have a experience to detect the LPT2 or LPT3 printer is
> >ready or not ?

> Terry Carmen put a routine on my www site called ISPRINT.ZIP.

> --

>                        WWW  http://www.iag.net/~philb/
>                   FTP Site  ftp://ftp.iag.net/pub/clipper
>                       FIDO  1:363/299



Sun, 22 Nov 1998 03:00:00 GMT  
 To detect the LPT2 & LPT3 printer


says...

Quote:


>>Hello,

>>Does anybody have a experience to detect the LPT2 or LPT3 printer is
>>ready or not ?

>Sure.

>Get isprinte.zip from

>http://www.iag.net/~philb

>Terry

Thanks.
and  I downloaded the isprinte.zip and have a try, but it always returns TRUE  
even if  i turned off the printer .Does i have a something wrongs for it . my
small program is

? isprinter(1)
? isprinter(2)
? isprinter(3)
? isprinter(4)



Sun, 22 Nov 1998 03:00:00 GMT  
 To detect the LPT2 & LPT3 printer

+-
| Does anybody have a experience to detect the LPT2 or LPT3 printer is
| ready or not ?
+-[CY=>All]

The easiest way is to change the EXAMPLEA.ASM file supplied with Clipper to
allow detection of LPT 1 2 or 3.

Simply change:

        ; begin code
        CLcode
                MOV     AH, 02H                 ; printer status function
                MOV     DX, 0                   ; which printer to check
                INT     17H                     ; read printer status

                MOV     BX, FALSE
                CMP     AH, 90H                 ; 90H means not busy
                JNE     ISPRINTER_RET           ; return false if AH != 90H
                MOV     BX, TRUE

to:

        ; begin code
        CLcode
                MOV     ax, 1                   ; Check parameter 1
                PUSH    ax
                CALL    __parinfo
                ADD     sp, 2

                CMP     ax, 2                   ; Is it numeric?
                JZ      NumericParameter        ; Yes, so get it

                SUB     dx, dx                  ; Default to LPT1
                JMP     SHORT GetStatus

        NumericParameter:
                MOV     ax, 1                   ; Parameter 1
                PUSH    ax
                CALL    __parni
                ADD     sp, 2

                MOV     dx, ax                  ; switch to DX
                DEC     dx                      ; LPTs are 0 based

        GetStatus:
                MOV     AH, 02H                 ; printer status function
                INT     17H                     ; read printer status

                MOV     BX, FALSE
                CMP     AH, 90H                 ; 90H means not busy
                JNE     ISPRINTER_RET           ; return false if AH != 90H
                MOV     BX, TRUE

Assemble this and then link this module in with your application.
ISPRINTER() should now take an optional numeric parameter which should be
either 1, 2 or 3.

(This is on the fly so I've not tested it, but it looks good to me.)

DrDebug

 . DBMR v1.00 . MrDebug kills the bugs CLD leaves behind

+----------------------------------+--------------------------------------+

|    The Dark Knight Returns BBS   | MrDebug product support:             |

|      and MrDebug for Windows     | Fax&BBS:          +44 (0)1480 471465 |
|(MrDebug: THE CA-Clipper de{*filter*})|     Tel:          +44 (0)1480 403104 |
+----------------------------------+--------------------------------------+



Sun, 22 Nov 1998 03:00:00 GMT  
 To detect the LPT2 & LPT3 printer


Quote:

>By chance I tried to use ISPRINTE.OBJ yesterday. I couldn't make it
>work. When I gave it bad parameters it correctly returned false, but
>it happily said I had 4 printers ready and waiting - LPT1 to LPT4.
>Which I dont, nor a network. I looked at the ASM which seemed fine
>so I'm not sure what I may be doing wrong.

I just checked it with a de{*filter*} under Win 95 and NT, with Clipper
5.2e.

For some reason, the int 17h BIOS call is returning incorrect results.

I haven't used the code in quite some time, so I'm not sure if the problem
is Windows, Clipper or Blinker.

You might want to try the one in the Nanforum toolkit. It uses a different
method of determining printer status.

Terry



Mon, 23 Nov 1998 03:00:00 GMT  
 To detect the LPT2 & LPT3 printer

Quote:


>>By chance I tried to use ISPRINTE.OBJ yesterday. I couldn't make it
>>work. When I gave it bad parameters it correctly returned false, but

>You might want to try the one in the Nanforum toolkit. It uses a different
>method of determining printer status.

I tried the one from Nanforum but it bombed out running in blinkers extended
mode.


Tue, 24 Nov 1998 03:00:00 GMT  
 To detect the LPT2 & LPT3 printer


Quote:


Carme


>>>By chance I tried to use ISPRINTE.OBJ yesterday. I couldn't make it
>>>work. When I gave it bad parameters it correctly returned false, but

>>You might want to try the one in the Nanforum toolkit. It uses a different
>>method of determining printer status.

>I tried the one from Nanforum but it bombed out running in blinkers extended
>mode.

Hmmm.

It should be compatible. Did you link in CPMI?

Terry



Wed, 25 Nov 1998 03:00:00 GMT  
 
 [ 10 post ] 

 Relevant Pages 

1. isprinter() for lpt2 & lpt3

2. Capturing of LPT2 in Windows-NT after set printer to LPT2 in Clipper5.2

3. How to print to Lpt2: lpt3: etc..

4. Checking existance of LPT2, LPT3...

5. printing to lpt2,lpt3,etc

6. Printing to lpt2, lpt3, etc using Mf Cobol on win95/98

7. printing to lpt2 and lpt3

8. Checking printer LPT2

9. s87 and set printer to lpt2

10. Check the printer on LPT2

11. LPT1 & LPT2

12. Detecting whether a printer is ready

 

 
Powered by phpBB® Forum Software