pcampb@rhea.trl.oz.au (Peter Campbell) (07/20/90)
This is a repost - we have been having problems with the news machine here - apologies to those who may have already received this. Hello, all. Here at the Research Labs we are having a problem with MS-DOS printer timeouts, and I was wondering if anyone out there could help us. We are using MS-DOS 3.3 and have a program written in Turbo-C V2.0 that needs to know whether a printer is connected to a computer - either directly attached or redirected through a network. We are using the BIOS calls provided in Turbo-C/DOS-BIOS to check whether the printer is connected. This works perfectly when a printer is connected, but not when this isn't the case. When there aren't any printers connected to the machine it will wait for a BIOS timeout. However, we have found that this isn't a fixed time - we are getting timeouts anywhere between 5 seconds and 55, with a few machines hanging rather than timing out. We would like to somehow use the DOS calls to test the printer, so a different version is not needed when different DOS BIOSs are used. We would also like to be able to set the timeout time to a fixed amount. The Technical Reference manual makes reference to a specific byte that is used for the BIOS printer timeout time, and the DOS call also uses a byte somewhere, but the manual doesn't say whether these are the same bytes - and knowing DOS, they probably aren't. Hence, would anyone know of a DOS call/routine that: (1) Works on all DOS Versions (or at least V3.x+) (2) Checks for redirected printers (e.g. across networks) (3) Allows a fixed printer timeout to be set. Please E-mail responses - a code example would be nice if anyone has one. If there is enough interest I'll summarise and send it out to the newsgroups. Thanks in advance. ---------------------------------------------------------------------- Peter K. Campbell | Phone : 2/M6 | Aust. : 03 541 6751 Telecom Research Laboratories | Int. : + 613 541 6751 P.O. Box 249 | Fax : + 613 543 6026 Clayton 3168 | Email : p.campbell@trl.OZ.AU Victoria, Australia | ----------------------------------------------------------------------