Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results


Before Posting...

Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging

The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.

Check out The OSR Learning Library at:

What is the "right" way to do this???

OSR_Community_UserOSR_Community_User Member Posts: 110,217
I am trying to determine the "correct" way to accomplish my needs within the
Win 2000 and/or WDM framework.

I need to write a driver that can directly control (and receive interrupts
from) a standard serial port. I know that I/O is no problem since the OS
doesn't do anything to stop my driver from reading and writing any I/O
ports. The problem is that SERIAL.SYS normally controls all the standard
serial ports in a system. For several reasons, I must field the interrupt
from the serial port directly. I have 2 scenarios I'm considering:

1) Have my driver open the COM port through SERIAL.SYS - this will cleanly
let the rest of the system know that the port is in use. The problem with
this approach is that I can't find a way to register with the serial driver
that I want it to use MY interrupt handler code - in fact I'm pretty sure
there's no way to ask SERIAL.SYS to in any way, shape or form let another
driver handle the interrupt for the device.

2) Create a driver that claims itself as the driver for (as an example)
COM2. This seems more practical, but then how do I tell the system that I
want COM2 for my driver only, and I don't want SERIAL.SYS to do anything
with COM2? Is there a way to install my driver such that the system assigns
the resources for COM2 to my driver, and somehow doesn't pass the resources
for COM2 to SERIAL.SYS for initialization??

Does anyone know of a simple "legacy" WDM driver example where the driver is
designed to handle non-PnP hardware (i.e. a COM port) and use explicitly
declared resources?

Patrick Klos
Network Software Engineer
NuMega Lab / Compuware Corporation
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Kernel Debugging 13-17 May 2024 Live, Online
Developing Minifilters 1-5 Apr 2024 Live, Online
Internals & Software Drivers 11-15 Mar 2024 Live, Online
Writing WDF Drivers 26 Feb - 1 Mar 2024 Live, Online