From - Thu Sep 25 07:42:39 1997 Path: news.mitre.org!blanket.mitre.org!bone.think.com!newsswitch.lcs.mit.edu!netnews.com!howland.erols.net!news-peer.sprintlink.net!news-pull.sprintlink.net!news-in-east.sprintlink.net!news.sprintlink.net!Sprint!207.0.56.30!news.eli.net!news.transport.com!not-for-mail From: "Kerry Krieske" Newsgroups: comp.os.ms-windows.programmer.nt.kernel-mode Subject: Re: Serial Programming on NT Date: Wed, 24 Sep 1997 11:56:00 -0700 Organization: Transport Logic - www.transport.com Lines: 24 Message-ID: <60bnqd$hv9$1@news.transport.com> References: <874661782.26958@dejanews.com> <01bcc513$4cfada10$917f10ac@orland> NNTP-Posting-Host: 204.245.246.91 X-Newsreader: Microsoft Outlook Express 4.71.1008.3 X-MimeOle: Produced By Microsoft MimeOLE Engine V4.71.1008.3 >If you are asking about interfacing to the SERIAL.SYS driver in NT using >the layered (is there any other way) approach, I have the same question. I >looked into using the ZwXxxx functions to open a handle to the serial >device and do I/O but had to abandon this approach because I'm not always >at PASSIVE_LEVEL nor am I always running in the same context. I typically >run at DISPATCH_LEVEL in a DPC. > >Anyone have any suggestions for me as to how to use SERIAL.SYS from a DPC >context? I think I can piece it together eventually but I've never done it >before so any help would be appreciated. > >-Michael You should open the port with IoGetDeviceObjectPointer and from then on you can invoke IoCallDriver with the returned device object and irp's you create (read/write/ioctl). Isn't it amazing how much more complicated the source for serial.sys is from the source for serial.vxd? Fortunately, it is not that complicated for a vxd or sys driver to use each of these serial drivers (serial.vxd via vcomm) in either OS.