UMDF smart card reader driver

Hi,

can I implement a smart card reader driver in UMDF with the the current 7.1 WDK ?

I tried to find the answer by myself but found confusing information. The key problem seems to be the kernel mode library smclib. The library is designed to be used in a WDM driver. The WDK sample driver pcscr has been converted to kmdf meanwhile, but this requires some ugly hacks to make smclib compatible with kmdf.

Questions:
The WDK doc talks about a “WDM version of the library”:
http://msdn.microsoft.com/en-us/library/ff548899(VS.85).aspx
Is there any other version?

How much functionality is implemented in smclib? Is it IOCTL decoding and IRP handling only?
Can I use the UMDF reflector to handle IOCTL_SMARTCARD_xxx in user mode?
I would be required to re-implement the IOCTL decoding done in smclib.

MS seems to use UMDF for their ICCD class driver (USB).

Can anyone shade some light on this.

Thanks.
Udo

AFAIK there is only WDM version of this lib, but you can use it in KMDF (see the sample)

the lib is working with your code using callbacks, you will get a callback when you need to do something, the lib handles all of internal state of the PC/SC Reader.
it also handle the inserting and removing of a card using IRP (by completing IRP to indicate change)

Maybe you can build a proxy KMDF/WDM drivers that sends the callbacks to your UMDF driver.

You are correct that the inbox smart card driver is a UMDF driver, however is accomplished by using some internal interface that are not publicly exposed. There is currently no support for writing a smart card driver entirely in UMDF.

Brandon

Thanks Branton for this clear statement.

Udo

On 18.11.2010 00:49, xxxxx@microsoft.com wrote:

You are correct that the inbox smart card driver is a UMDF driver, however is accomplished by using some internal interface that are not publicly exposed. There is currently no support for writing a smart card driver entirely in UMDF.

Brandon

We were talking debating this some more internally, and it is possible to implement your own version of smclib in user mode. The device interface is documented and you could roll all that logic on your own without the need for any sort of KM driver that would shuttle data back and forth from UMDF. With that being said, I am not a Smart Card expert so I am not sure exactly what this entails or how much work is required.

Thanks for clarification. This is exactly the approach I planned to
implement.

Regards,
Udo

On 19.11.2010 01:53, xxxxx@microsoft.com wrote:

We were talking debating this some more internally, and it is possible to implement your own version of smclib in user mode. The device interface is documented and you could roll all that logic on your own without the need for any sort of KM driver that would shuttle data back and forth from UMDF. With that being said, I am not a Smart Card expert so I am not sure exactly what this entails or how much work is required.