Virtual Smartcard Driver (kmdf) -> WdfDeviceCreateDeviceInterface?

Discussion in 'Windows Vista Drivers' started by Thomas Kluge, Mar 19, 2008.

  1. Thomas Kluge

    Thomas Kluge Guest

    I want to build a non pnp smartcard driver.

    I just tried to followed the suggestions in the thread:
    http://www.techtalkz.com/microsoft-...tcard-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
     
    Thomas Kluge, Mar 19, 2008
    #1
    1. Advertisements

  2. 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 S. Shatskih, Mar 19, 2008
    #2
    1. Advertisements

  3. 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
     
    Doron Holan [MSFT], Mar 19, 2008
    #3
  4. Thomas Kluge

    Thomas Kluge Guest

    ..as a root enumerated smart card. this will give you a pnp presence, but does not require your device
    Great, this is new to me, I thought: no ressource -> no pnp.

    Thanks for that clarification to you and Maxim.

    Thomas
     
    Thomas Kluge, Mar 19, 2008
    #4
  5. Thomas Kluge

    Thomas Kluge Guest

    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
     
    Thomas Kluge, Mar 31, 2008
    #5
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.