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:
00175082
Views:
38
Actually, Windows NT doesn't care if I say C:\LPT1 or LPT1. If I remove the line SET PDSETUP TO "GENERIC", then the code works, but sends a form feed when I close the printer (using SET PRINT TO or SET PRINT OFF). Typically I am sending data a 40 Collumn receipt printer, however in some cases I am sending data to a display pole daisy chained with some other printer, and I can't have my printers form feeding every time I update the data on the display pole.

Please, does anyone know how to reliably send data straight out the lpt port in NT without having these problems?


>>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.
Paul R. Moon
Business Software Solutions
paul@businessoftware.com
Previous
Reply
Map
View

Click here to load this message in the networking platform