Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Windows NT, FPW 2.6, and by-passing windows print system
Message
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00174433
Message ID:
00174444
Views:
24
>I am running into a problem with a distributed accounting application we have written when I run it on NT. In a few places in our code, we send things directly to a printer without using the windows print system. The code is fairly old, and works well under 3.1, 95, 98, but crashes on NT. Here is the code involved:
>
>SET RESOURCE ON
>SET RESOURCE TO \BPA\FOXUSER
>SET PDSETUP TO "Generic"
>SET CONSOLE ON && View report while it prints
>SET PRINT ON
>SET PRINT TO C:\LPT1
>

NT wouldn't like that line; if you're trying to send to LPT1, try

SET PRINT TO LPT1

instead. If you're trying to send print to a file, use a name that doesn't correspond to a port device (ie COMn, LPTn, STDIN, STDOUT, etc.)

>
>When the code reaches the SET PRINT TO C:\LPT1 line, Windows NT gives me a resource error and closes the application. If we don't use the PDSETUP, the code doesn't seem to actually get anything out to the printer, even using ???. Does anyone have a suggestion or solution?
>
>Thanks,
>Paul R. Moon
>
>PS. I tried searching the UT, but the search engine won't accept 'NT' because it is too few characters and I couldn't get the search narrowed without it.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform