If you are working with a networked printer, or a "virtual" port like LPT4 or above (under Windows), then there are other solutions such as editing entries in SYSTEM.INI.
Code:
sub SetPrinterTimeout(byval Port?, SaveTries%, NewTries%) local public local RetryAddr% ' default for SaveTries% = 20 as set by DOS if Port? < 1 or Port? > 3 then exit sub RetryAddr% = &H477 + Port? ' LPTNo = 1 for LPT1, 2 for LPT2, etc def seg = 0 ' For the peeks and pokes that follow SaveTries% = peek(RetryAddr%) ' Save the current setting poke RetryAddr%, NewTries% ' Set to 1-255 retries, 0 = infinite def seg end sub
------------------
Lance
PowerBASIC Support
mailto:[email protected][email protected]</A>
Leave a comment: