Hello geniuses of driver development,
I’ve just now subscribed to this list because I’ve looked everywhere on the
web but I’m still hopelessly lost on where to start building a virtual
serial port driver for WinXP/2000! I’ve been reading the DDK documentation
on msdn.microsoft.com/library for days and I’ve got the WinXP DDK downloaded
and have looked at the serial and serenum source code but I’m totally lost
because there’s so *much* information. To be specific, I want to create a
driver (I’m not sure if it should be a bus driver, filter driver,
minidriver, with or without serial.sys and serenum.sys, etc) that forwards
characters from one COM port to another. For example, I want the driver to
create two COM ports, say COM5 and COM6, and if you connect a Hyper-Terminal
window to COM5 and another window to COM6 then characters typed in one
window will show up in the other. Seems pretty simple, doesn’t it? In my
searching I found a product available that does exactly what I’m trying to
accomplish (http://www.mks.zp.ua/vspdxp.php) but it doesn’t come with source
code and I’ve never written a driver before and I’d really like to know how
to accomplish such a task. This should be simple shouldn’t it? I’m good at
C and C++ and Win32 SDK development but I’ve never done anything with driver
or kernel-mode development before. Can someone please point me in the right
direction for the following questions? I’m sure even simple answers would
greatly shed some light on the maze of DDK information!
To write a driver that creates two ‘virtual’ COM ports (say COM5 and COM6,
or any other combination of two COMx port names) and forwards all characters
sent to COM5 to COM6 and visa-versa (via Hyperterminal or any other Win32
app that uses COMx ports; i.e. no physical devices are involved at all),
-
Do I need to write a bus driver, function driver, filter driver,
mini-driver, etc? I would like to leverage as much existing support as
possible, but I don’t know if mini-drivers are available for serial/serenum. -
Does Serial.sys and Serenum.sys play a part in this, or do I need
to write everything from scratch? I can pre-define the COMx port names if I
have to. -
Do I need to consider WDM? There’s a lot of WDM information out
there but I know serial ports are pretty old so I don’t know if I should be
thinking of writing a ‘legacy’ driver or not. -
Do I need to consider Plug-and-Play? I don’t want to have to
reboot to add or remove the ‘virtual’ COM ports. -
Do I need to handle all of the RS-232 IO requests such as flow
control and signaling in order to simply pass the characters from one COM
port to the other? I would like to simply use a named pipe to pass bytes
back and forth and ignore any flow control or baud rate issues all together.
Thank you all for any response I may receive. As I said, the product (VSPD
http: ) does exactly what I’m trying to do, so I
don’t have an immediate business need for any of this, but I’m very curious
and intrigued about the mysterious world of driver development and this
seems like it should be a very simple driver to create. Help!
-Kael
xxxxx@kael.cc</http:>