[comp.sys.ibm.pc.misc] Printer Timeouts/BIOS/MS-DOS 3.3

pcampb@rhea.trl.oz.au (Peter Campbell) (07/25/90)

< This is a repost of an article sent to comp.sys.ibm.pc and	>
< comp.sys.ibm.pc.programmer - seeing as I have had no reply	>
< I have sent it to the newsgroups split from these.  Apologies	>
< to those who have already seen 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                    |
---------------------------------------------------------------------- 

ts@uwasa.fi (Timo Salmi LASK) (07/26/90)

In article <1945@trlluna.trl.oz> p.campbell@trl.oz.au (Peter Campbell) writes:
>
>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.
... rest deleted for brevity ...

The term timeout is somewhat misleading here, since, as far as I
understand, it is rather retry attempts than a fixed timeout.  The
default number of retrys before giving up trying to print is 20. 
This default is a feature of the PC, not the printer.  It can be
changed by memory address programming, and personally I have scaled
the retrys down to 3 times only.  If you want the utility to do this
it is called SETPRT.EXE and it is contained in /pc/ts/tsutld17.arc
package (but no source code available).  The package can be obtained
by anonymous ftp from chyde.uwasa.fi, Vaasa, Finland. 

...................................................................
Prof. Timo Salmi        (Moderating at anon. ftp site 128.214.12.3)
School of Business Studies, University of Vaasa, SF-65101, Finland
Internet: ts@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun