Re: virtual com port driver
- From: Walter Oney <waltoney@xxxxxxxxxxxx>
- Date: Mon, 26 Nov 2007 09:01:37 -0400
subhash wrote:
I am creating a virtual com port driver which is doesnt have any
device attached to it. The purpose of this module is message passing
to user space. But the applications should see this as a com
port(actuall multiple com ports).So I dont want any bus driver to be
attached to it. I am confused, under which class i should install this
device.How i will make my device object.Is it a root enumerated
device.
First of all, your design goal (multiple COM ports) is not possible
without a virtual bus device to enumerate the multiple ports or multiple
(user-driven) installs of a root-enumerated device.
Second, "Ports" is the right class for a single port. "Multiport Serial
Adapters" is the right class for a virtual bus that has "Ports" for
children. You need a separate INF file for the port and for the
multiport device. I usually have the multiport parent specify an
instance id of fhe form "Port%2.2d", where the %2.2d gets replaced by
the port number on the multiport board, in response to IRP_MN_QUERY_ID.
The corresponding device and hardware ids are of the form
"MYBOARD\Port01", where "MYBOARD" is also the name of the driver I
build. The port INF file lists all possible hardware ids in the model
section with separate description strings. That's the simplest way I
know to have the descriptions that appear in device manager correlate
with the port numbers that will be apparent to the end user.
Third, being unloaded after AddDevice returns STATUS_SUCCESS means you
aren't getting any IRP_MJ_PNP requests. Check to be sure you cleared the
DO_DEVICE_INITIALIZING flag in your DEVICE_OBJECT and that you specified
a dispatch routine for the PNP requests.
--
Walter Oney, Consulting and Training
http://www.oneysoft.com
.
- Follow-Ups:
- Re: virtual com port driver
- From: subhash
- Re: virtual com port driver
- References:
- virtual com port driver
- From: subhash
- virtual com port driver
- Prev by Date: Re: virtual com port driver
- Next by Date: Re: Getting IPv6 address for local interface
- Previous by thread: Re: virtual com port driver
- Next by thread: Re: virtual com port driver
- Index(es):
Relevant Pages
|