Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site rruxo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!gamma!pyuxww!pyuxv!rruxa!rruxo!vch From: vch@rruxo.UUCP (V. Hatem) Newsgroups: net.micro.pc Subject: Re: how do you detect redirection Message-ID: <237@rruxo.UUCP> Date: Sun, 14-Jul-85 11:47:07 EDT Article-I.D.: rruxo.237 Posted: Sun Jul 14 11:47:07 1985 Date-Received: Wed, 17-Jul-85 04:31:28 EDT References: <5156@elsie.UUCP> Lines: 14 I've been able to detect the redirection of output to lpt1 by using the DOS Organization: Bell Communications Research, Piscataway N.J. Lines: 12 function 44h. Set al=0 to get device info, (ah to 44h, of course), interrupt, (don't forget to set the bx to the file handle (I have the Computer Innovations C86 Compiler and the handle for stdout is always 1)), and when you get back, volia - (dx & 1) gives you a nice yes-or-no answer. I get the impression that you tried this already and you're thinking I TRIED THAT! I don't know, it works for me! (DOS 2.10). good luck, Vince Hatem