[comp.os.msdos.programmer] Device Drivers

dewinter@watserv1.waterloo.edu (Jack a.k.a. Wildside) (11/22/90)

Hi, I know that I can do this, but for the life of me I can't figure out
how.  

How do I identify a give filename as a name used by a device driver.
i.e. lpt1, com1 and the sorts?

Inquiring minds and that stuff,
-- 
Jack a.k.a. Wildside   ... 2nd regeneration of a Time Lord
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	"But that's not decent"
	"I am a pirate, I don't do decency!" - Don Carnage

ekalenda@cup.portal.com (Edward John Kalenda) (11/22/90)

> Hi, I know that I can do this, but for the life of me I can't figure out
> how.  
> 
> How do I identify a give filename as a name used by a device driver.
> i.e. lpt1, com1 and the sorts?
> 
> Inquiring minds and that stuff,
> -- 
> Jack a.k.a. Wildside   ... 2nd regeneration of a Time Lord

Open the file using DOS function 0x3d then use function 0x44 subfunction
0x00. The return will tell you if it's a file or a device. If a device,
there's some more bits to tell you if it's stdin, stdout, etc.

Ed
ekalenda@cup.portal.com