Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2001-01

runtime error 101

4 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Patrick Mergan

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

Reply by email

Peter Vreman
to Patrick Mergan
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

Reply by email

Patrick Mergan

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

Reply by email

Peter Vreman
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?

Reply by email