TDOSPrn( ) Printing ONLY to LPT1 Problem

Post Reply
dpaterso
Posts: 142
Joined: Tue Jan 24, 2006 9:45 am
Location: South Africa
Contact:

TDOSPrn( ) Printing ONLY to LPT1 Problem

Post by dpaterso »

Hello,

I have been having a strange problem at a customer and I thought I had sorted out the problem but apparantely not.

The problem is that no matter what printer port I pass to TDOSPrn( ) as a parameter ( cPort ) (LPT1 or LPT2) it will only print to LPT1 (which I gather from the code is the default).

Does TDOSPrn( ) detect or require the existence of the physical printer ports on the workstation?

The reason that I ask is that in my case I have printer ports LPT1 and LPT2 rerouted to Novell Print Queues using the Novell Client for Windows 2000/XP.

Under DOS, from any workstation, I can print to either network queue (printer port) (tested by doing a DIR>LPT1 and DIR>LPT2) and there is no problem with printing to the correct printer and relevant print queue.

But in my app I am only able to print to LPT1 no matter what 'cPort' parameter I send to TDosPrn( ).

On all of the workstations at the customer there is only a physical LPT1 present i.e. no LPT2.

The (very) old version(s) of TDOSPrn( ) used to work (until I started keeping up to date with the very latest versions of FWH and xHB.

I have checked whether or not I am passing the correct parameter and type to TDOSPrn( ) using MsgInfo( cPort ) entered into TDOSPrn( ) and apparantely I AM passing the correct parameter and type.

Something else (just by the way) - with the Novell Client I am able to capture LPT1 thru LPT9 - will TDOSPRn( ) be able to handle ports LPT3 thru LPT9? If not what modifications are necessary?

Regards,

Dale.
dpaterso
Posts: 142
Joined: Tue Jan 24, 2006 9:45 am
Location: South Africa
Contact:

Post by dpaterso »

OK - well - just a follow up so that I don't wast anybody elses time!

I have just tried printing from LPT2 thru LPT7 using TDOSPrn( ) and no problem at all - works perfectly on my Novell Network (which is the same version and configuration as the customers).

I will have to dig deeper to see what the problem is at the customer.

For now though - no problem with TDOSPrn( ).

Regards,

Dale.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Dale,

Thanks for the feedback :)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply