Dear Viktor,
  ----- Original Message ----- 
  From: Viktor Szakáts 
  To: Harbour Project Main Developer List. 
  Sent: Thursday, March 25, 2010 11:49 AM
  Subject: Re: [Harbour] Printer Status Functions


  Hi,

  On 2010 Mar 25, at 08:28, Robert Skowronek(o2) wrote:

  > In my application I want to check whether LPT printer is available or not 
before I send document to it.
  >  
  > In DOS application I used to use PrintReady() function successfully with 
numerical input  1 or 2 for LPT1 and LPT2 respectively but in Harbour that 
function always return “False” even if the printer is available.
  >  
  > PrintReady(1) => always false
  > PrintReady(2) => always false

  PRINTREADY() is only implemented for MS-DOS platform 
  in Harbour yet. I'll rewrite it, but I cannot test it.

  > I also did some test for IsPrinter() and HB_IsPrinter() and both get 
strange output for LPT1 only (by the way what is a difference between them?).

  ISPRINTER() doesn't accept a parameter, like in Clipper it
  always checks "LPT1". HB_ISPRINTER() does accept a parameter.

  > IsPrinter(“LPT1”)         => always return “True” also when printer not 
connected to that port
  > HB_IsPrinter(“LPT1”)  => always return “True” also when printer not 
connected to that port
  >  
  > IsPrinter(“LPT2”)         => output correct corresponds with the port status

  Are you sure in this result? This contradicts the first two tests, 
  since this one tests for LPT1.

  > HB_IsPrinter(“LPT2”)  => output correct corresponds with the port status

  Brgds,
  Viktor

Yes, you are right. I checked it again and I see I did mistake in my previous 
email. Because IsPrinter() serves only LPT1, naturally it always returns true 
in my tests.


But my question is still open. Why LPT1 status is not recognized properly by 
either, IsPrinter() or HB_IsPrinter('LPT1')? Always true, whatever port status 
was.

Kindly advice.

Best regards
Robert Skowornek
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to