| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | DosCopy LPT1 |
Mario,
Thanks for the help, but I am still unable to make this work on machines
that have OS/2 2.1 and the old Communications Manager installed.
I forgot to mention that there is a new Lan Server version installed
on the machines on which it works. Maybe this is the reason ??
Some Rexx return-codes changed with this new version I believe.
I am no Rexx-specialist, but I believe returncode 255 becomes 0 now...
MS> DosCopy is an OS/2 API, so it has nothing to do with CSET++.
That's why I think it has to do with the difference between OS/2 2.1 and 2.11.
But because I only have the problem with copying to a network printer-port,
not with a destination-file on disk, maybe Lan Server is the culprit ??
MS> #define ERROR_INVALID_HANDLE 6 /* MSG%INVALID_HANDLE */
OK, but what handle ? DosCopy has no handles as parameter.
I use DosCopy(pszFileToPrint, "LPT1", DCPY_EXISTING);
Strange enough, this works on some machines, but not on others.
Does anyone know another possibility to print an ASCII file to a printer ?
I used the following methods, but they aren't very good, because they don't
give you enough error-control, which is very important in this case:
* Open the file for READ and WRITE each char to the printerport.
You can't control any errors, because when the network-alias for the
printer is not there, you write the file to your local LPT-port, and even
if there is no device attached, the DosCopy call still has returncode RC_OK.
* Use the 'copy' command (DosExecProgram call) to copy the file.
There is no way to get the return-code, so no control over errors.
Anyone suggestions ?
Greetings,
//Peter.
--- Terminate 1.50
* Origin: Terminate point system (2:291/702.33)SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 410 413 SEEN-BY: 711/430 807 808 809 934 942 949 712/353 623 713/888 800/1 @PATH: 291/702 713 292/850 285/1 280/0 801 24/24 396/1 3615/50 @PATH: 229/2 12/2442 711/409 54/54 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.