I want to build a non pnp smartcard driver.

I just tried to followed the suggestions in the thread:
http://www.techtalkz.com/microsoft-device-drivers/296063-virtual-smartcard-reader-not-listed-scardlistreaders.html

That included starting with the pnp smartcard driver sample from the WinDDK
6001 and remove the pnp stuff. So I tried to uses the initialization
routines from the nonpnp kmdf driver sample (same DDK).

I stuck calling the essential function:
WdfDeviceCreateDeviceInterface(Device,&SmartCardReaderGuid,NULL)
which returns 0xC0000010, STATUS_INVALID_DEVICE_REQUEST.

Unfortunately I cannot find out why this happens cause the WDFLOG command
"!D:\WinDDK\6001.18000\bin\x86\wdfkd.wdflogdump TSBTCS"
returns: "Could not find TSBTCS in wdfldr client list"

From a newsthread I read something about non pnp drivers not allowed to call
WdfDeviceCreateDeviceInterface.
Is that true and can anybody give me a clue to come around this?

Bye the way the function SmartcardInitialize returns Success, but that
doesn't seam to help me at all.


regards,
Thomas Kluge
T-Systems

Re: Virtual Smartcard Driver (kmdf) -> WdfDeviceCreateDeviceInterface? by Maxim

Maxim
Wed Mar 19 11:06:03 CDT 2008

> I want to build a non pnp smartcard driver.

Why not go PnP? any hardware drivers should be PnP since w2k, non-PnP drivers
touching the hardware are limited in support and can, for instance, disable all
power management on the machine.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com


Re: Virtual Smartcard Driver (kmdf) -> WdfDeviceCreateDeviceInterface? by Doron

Doron
Wed Mar 19 12:52:39 CDT 2008

yes, non pnp drivers cannot use device interfaces. if you just want to
write a virtual smart card, install your driver as a root enumerated smart
card. this will give you a pnp presence, but does not require your device
to be detected by any bus. you can use the devcon tool (devcon install
[...]) to create and install your driver on a root enumerated device.

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"Thomas Kluge" <T.Kluge@t-systems.com> wrote in message
news:uT52gYdiIHA.4712@TK2MSFTNGP04.phx.gbl...
>I want to build a non pnp smartcard driver.
>
> I just tried to followed the suggestions in the thread:
> http://www.techtalkz.com/microsoft-device-drivers/296063-virtual-smartcard-reader-not-listed-scardlistreaders.html
>
> That included starting with the pnp smartcard driver sample from the
> WinDDK 6001 and remove the pnp stuff. So I tried to uses the
> initialization routines from the nonpnp kmdf driver sample (same DDK).
>
> I stuck calling the essential function:
> WdfDeviceCreateDeviceInterface(Device,&SmartCardReaderGuid,NULL)
> which returns 0xC0000010, STATUS_INVALID_DEVICE_REQUEST.
>
> Unfortunately I cannot find out why this happens cause the WDFLOG command
> "!D:\WinDDK\6001.18000\bin\x86\wdfkd.wdflogdump TSBTCS"
> returns: "Could not find TSBTCS in wdfldr client list"
>
> From a newsthread I read something about non pnp drivers not allowed to
> call WdfDeviceCreateDeviceInterface.
> Is that true and can anybody give me a clue to come around this?
>
> Bye the way the function SmartcardInitialize returns Success, but that
> doesn't seam to help me at all.
>
>
> regards,
> Thomas Kluge
> T-Systems
>


Re: Virtual Smartcard Driver (kmdf) -> WdfDeviceCreateDeviceInterface? by Thomas

Thomas
Wed Mar 19 16:45:31 CDT 2008

>..as a root enumerated smart card. this will give you a pnp presence, =
but does not require your device=20
> to be detected by any bus. =20

Great, this is new to me, I thought: no ressource -> no pnp.=20

Thanks for that clarification to you and Maxim.

Thomas


Re: Virtual Smartcard Driver (kmdf) -> WdfDeviceCreateDeviceInterface? by Thomas

Thomas
Mon Mar 31 05:52:42 CDT 2008


I just wonna state that this attempt works. I mixed some code of the
fakemodem DDK-sample with the smartcard sample. The driver is loaded
correctly in the device manager and I get the first IOCTL's from
SCardSvr.exe. Thanks again.

Thomas