Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing to lpt4 or higher under NT4 or W2000

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hello,

i have the problem, that my clipper program can´t print to LPT4 or higher under NT4 oder W2000.
Under W95 or W98 my program print to lpt1 to lpt9.

Does anybody has an idea, want to do?
 
If the printers are network printers, try NET USE in a batch file to set up the printer, then call your Clipper program. For example:

REM example.bat
net use lpt4: \\servername\printername
yourprogram.exe
net use lpt4: /delete


[sig][/sig]
 
It´s not my problem to use LPT4 with "net use".
the problem is, that my clipper-app can´t print to it. I can use the copy-Command in my Dos-box to copy a file to LPT4, but clipper can´t. the clipper-app fails with an error that it can´t make a file named "LPT4.PRN".
It looks like clipper "is asking" the operating System wether "LPT4" is a port or not, gets the answer that it is not a valid port and so try to make a File named "LPT4.PRN",
but this failes too (you can't make a file named LPT4.PRN).

I hope you understand now my Problem.
 
I have much the same problem. A large Clipper app uses 5 printers on a Novell 3.12 network. Through Novlib I could easily copy printfiles directly into the queus. Now my client has been sold but they still need the program which now is supposed to run under NT4. I have problems, I can only reach LPT1, 2 and 3. Copy <printfile> LPT4 does not work but in a Dos box &quot;Dir > lpt4&quot; works fine!
I am desparately seeking for a way to handle more than 3 printers from Clipper in an NT4 environment. Pleae help.
 
Hold your printers and queues in a table, then when the user select an option to print - bring up a pop up box to confirm the printer. the reset the port ( any port ) to the one you want, then print. This way, you could get away with just using LPT1 all the time.

e-mail me for further info pck@tokleyhiggs.freeserve.co.uk
 
if you have your printer shared, need connect to each pc with adress lpt4:, in printer configuration.

later on your program use:

......
set device to print
set printer to &quot;lpt4&quot;
----
? &quot;this to lpt4&quot;
....
set
set printer to
set devide to screen
.......

i wait this help you.

ramonzea@hotmail.com
 
Hi, There are several ways to resolve this problem. The best way is, of course, to use Novlib which allow redirection of LPTn to any printer queue.

If you are using Blinker as your linker you can also use the SWPRUNCMD() function. I have used this in a few cases where an NT server is being used.

All you need to do is send the DOS command to the function - example:

SWPRUNCMD(&quot;NET USE LPT1 \\server\printqueue&quot;,0,&quot;&quot;,&quot;&quot;)

If you have the Server Name and Print Queue in a variable ( cPrQ) then you would use:

SWPRUNCMD(&quot;NET USE LPT1 &quot;+cPrQ,0,&quot;&quot;,&quot;&quot;)

I would also recommend adding '> NUL' to the end of the command so that you don't get that &quot;The command has etc....&quot; popping up on the bottom line.

Thus:

SWPRUNCMD(&quot;NET USE LPT1 &quot;+cPrQ+&quot; > NUL&quot;,0,&quot;&quot;,&quot;&quot;)

This will work every time.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top