Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!mit-eddie!mintaka!olivea!samsung!usc!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!haven!adm!cmcl2!uupsi!sunic!news.funet.fi!uwasa.fi!ts From: ts@uwasa.fi (Timo Salmi) Newsgroups: comp.os.msdos.programmer Subject: Re: Detecting a printer Message-ID: <1990Nov10.072651.22847@uwasa.fi> Date: 10 Nov 90 07:26:51 GMT References: <5493@lanl.gov> Organization: University of Vaasa Lines: 19 In article <5493@lanl.gov> ctl8588@star.tamu.edu writes: >I am upgrading/maintaining a program written in TurboC that uses >the BIOSPRINT function to print to a printer. However, if a printer >is not attached it takes several seconds (10-30) before the program >gets an error code back. What is a *quick* way to detect if a >printer is out there? Below is a sample of the code used in the One direction to go is to change the printer retry default times (20) into a smaller value such as 3. This solution is not, however, specific to C. But if you want such a facility anyway, it is available as setprt.exe in /pc/ts/tsutld18.arc package by anonymous ftp or mail server from uwasa.fi or Simtel20. But this solution probably won't satisfy you (although it solves the problem of the printer response delay) since it won't give you a C code. ................................................................... 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