You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
NB: The following comment does <U>not</U> apply to PB/DOS programs:
Per the PB/CC code above, you will find that "LPT1:" is not actually the correct name for a device in Win32, so for improved reliability I would suggest using the plain "LPT1" device name instead.
FUNCTION PBMAIN&
'This is instantaneous in PB/CC and PDS 7.1 with XP Pro
'to a laser printer.
'Checked the registry and timeout is 15
'Not using printing direct option either
filehandle& = FREEFILE
OPEN "LPT1:" FOR OUTPUT AS #FileHandle&
lin$ = CHR$(12)
PRINT #FileHandle&, Lin$
CLOSE #FileHandle&
END FUNCTION
'My XP Pro machine doesn't have a local key
'HKLM\CurrentControlSet\Control\Printers
------------------
[This message has been edited by Mike Doty (edited August 12, 2003).]
Another thing you might try is Control Panel|Printers. Right Click
on the printer and select Properties|Advanced|Print directly to the printer.
That by-passes the spooler all together.
I've found a solution to slow printing of DOS programs in XP.
It will take the 30 second delay and reduce it to 2 seconds.
1. click Start ->Run ->then type REGEDT32
2. bring up HKEY_LOCAL_MACHINE
3. expand to ->System ->CurrentControlSet ->Control ->WOW
4. now in the right pane there should be a key "LPT_Timeout".
Double click this key
5. change the 15 to 1
6. close and reset machine
<http://www.resortdata.com/Customers/Knowledge/KB-DOS/K000036.htm>
The above site describes the problem and the soulution.
I had the same delay from a PBdos program on my XP laptop. I made the
changes as described above and saw a dramatic increase in the printout
starting time.
The site shows how to decrease the time delay from 15 seconds to 3 seconds.
Importantly, XP virtualizes the hardware so both PB and QB executables still have to work within that layer, so there will likely be some slowdown .
For example, instead of using OPEN "LPT1:" (which uses the PB/DOS parallel port driver to directly control the port), try using OPEN "LPT1" (which sends the data via the BIOS instead).
Yet another way is to write the data to a disk file, then use SHELL "COPY /B file.prn LPT1 > NUL"
And yet, tey another way might be to use DOSPRINT from www.print.com
Even if there are no print drivers installed, xp still has the
print spooler. It's setup to receive a minimum number of
characters or wait for a particular amunt of time before it
starts printing.
Play with the print spooler setting in control panel and see if
you can disable or shorten the pause time. You may have to
install a generic printer driver to do this but...
------------------
[This message has been edited by Mel Bishop (edited July 23, 2003).]
I have a application that has been working for 15 years now.
We just switched over our code to PB3.5 from QB. There have
been no issues with printing to date running under DOS or Win98.
We have upgraded a few of our users to WinXP and there now is a
printing issue.
When printing anything from the application there is about a 20
second delay before the printer starts to print. This delay was
not in DOS or Win98. I've tried it on 3 different XP machines
all with the same results. The application uses your basic
Open "LPT1:" for output as #1. There are no printer drivers
installed in any of the machines DOS/Win98/XP. The printer
is a basic Dot Matrix type.
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Leave a comment: