Hi,
I need to write driver, which will dinamically generate multiple virtual smartcard readers. When I using the driver for one device, it is working perfect. When I adding more readers, the only first one is working, others are not. I found, that all other readers does not get PnP messages and does not pass proper initialization.
How can I implement the driver? Do I need to create the bus/controller device or I can simply forward IRPs to devices?
When you say you add more readers, how are you adding them? By just calling IoCreateDevice in the driver? Or installing new devices in user mode? Who decides to create new readers? The driver or a service/application? If the creation policy resides in user mode, your life can be a bit easier, but before we get to that, please answer how you are adding them now…
d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@intel.com
Sent: Tuesday, March 04, 2008 1:33 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Multiple virtual smartcard readers
Hi,
I need to write driver, which will dinamically generate multiple virtual smartcard readers. When I using the driver for one device, it is working perfect. When I adding more readers, the only first one is working, others are not. I found, that all other readers does not get PnP messages and does not pass proper initialization.
How can I implement the driver? Do I need to create the bus/controller device or I can simply forward IRPs to devices?
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
In my case driver should decide to add new devices. How to add device - this is a question. Currently I’m trying to call IoCreateDevice, but it does not work, looks like that Attach to steck is necessary; In my case I have the only stack of the first device and do not know where to attach others…
This is why do I think about controller/bus device.
Yes, IoCreateDevice in and of itself is not enough. If the policy resides in the driver you need to have a bus driver which enumerates each required reader. You should look at the dynambus KMDF bus driver under the toaster directory. Dynambus in this case is more appropriate than statbus b/c you are going to be changing the child list at runtime vs having a static list at init time. You then load your smart card driver on top of your bus PDOs. Even if your smart card driver is not KMDF, the bus driver should be. Writing a wdm bus driver is a PIA and not worth the pain, there are way to many details to get right…
Now if the policy can at all be moved into user mode I would do that. Why? b/c you have one less driver and less complexity. The um application/service can just create and install new root enumerated smart card devices as needed, no need for a bus driver at all.
d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@intel.com
Sent: Tuesday, March 04, 2008 10:47 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Multiple virtual smartcard readers
In my case driver should decide to add new devices. How to add device - this is a question. Currently I’m trying to call IoCreateDevice, but it does not work, looks like that Attach to steck is necessary; In my case I have the only stack of the first device and do not know where to attach others…
This is why do I think about controller/bus device.
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
Thanks,
I will evaluate the possibility to move the logic into User mode.