Hello!
I have a strange problem here : Converted a turbo pascal program to fpc in Win32. It uses the printer unit and writes data to the printer with write(lst,... ( a hp 5L laserprinter ).
All works fine, but at a certain moment it is printing a logo. When it is about half printed, I get a runtime error 101 (???) ( Printing stops, but when I send a chr(12) to the printer in order to eject the page, I see that it was about half printed ) In dos, this error is usually caused by the fact that the program cannot write due to a 'disk full' or so, but in Win32 ??? In this case, it is writing to lst...
What could possibly be the reason here ?
Patrick
Mailing lists / fpc-devel / 2001-01
runtime error 101
4 messages · 2 people · –
- PPatrick Mergan 2
- PPeter Vreman 2
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Show quoted text 11 lines
I have a strange problem here : Converted a turbo pascal program to fpc
in Win32. It uses the printer unit and writes data to the printer
with write(lst,... ( a hp 5L laserprinter ).
All works fine, but at a certain moment it is printing a logo. When it
is about half printed, I get a runtime error 101 (???)
( Printing stops, but when I send a chr(12) to the printer in order to
eject the page, I see that it was about half printed )
In dos, this error is usually caused by the fact that the program cannot
write due to a 'disk full' or so, but in Win32 ???
In this case, it is writing to lst...
What could possibly be the reason here ?
Does the program work correct for the go32v2 target as that works more like the dos program
Peter
This error occurs only with Win32. When compiling with go32v2, it works.
( remark : I'm using the official version 1.0.2 . I downloaded version 1.0.4 , but the error is still there )
Patrick
This error occurs only with Win32. When compiling with go32v2, it works. ( remark : I'm using the official version 1.0.2 . I downloaded version 1.0.4 , but the error is still there )
Then the win32 printer unit isn't correct and should be fixed. Currently it uses the normal filewrite routines that seem not be able to handle printers correctly.
Has anybody experience with sending data to a printer under win32?
