way to create device interface (KMDF)

Discussion in 'Windows Vista Drivers' started by zlyh, Nov 16, 2007.

  1. zlyh

    zlyh Guest

    Paper "Sample Drivers for the Kernel‑Mode Driver Framework" (p.18) tells "A
    device interface can be created in any of three ways:
    1) A user-mode installation application can create the interface... ,
    2) An INF can create the interface... ,
    3) The driver can create the interface.. ".
    If I use "[ClassInstall32]" in INF file may I don't use
    WdfDeviceCreateDeviceInterface in driver code?
    zlyh, Nov 16, 2007
    1. Advertisements

  2. zlyh

    Tim Roberts Guest

    Maybe, but you still have to call WdfDeviceSetDeviceInterfaceState to
    enable the interface. What's the point of skipping it? It's two lines of
    Tim Roberts, Nov 18, 2007
    1. Advertisements

  3. IIR ClassInstall32 installs a class GUID, not a device interface GUID. Just
    register the device interface GUID in your driver and KMDF will dothe rest.

    Doron Holan [MSFT], Nov 19, 2007
  4. zlyh

    zlyh Guest

    Yes, not ClassInstall32, I would like to say InterfaceInstall32.
    As beginner I don't understand why I need to duplicate same entries.
    Well, as I see I have to use InterfaceInstall32 only when I make my own new
    non standard interface. I don't do it, I just want to use existing interface.
    (I learn to develop drivers with USB device).
    "WdfDeviceCreateDeviceInterface" function just tells to system: "This device
    will communicate by that existing interface". Is it right?
    Do I have to use DDInstall.Interfaces Section in INF file?
    zlyh, Nov 22, 2007
  5. zlyh

    Tim Roberts Guest

    What kind of device is it? Windows has drivers for the standard USB device
    classes (Audio, Video, Communication, Mass Storage, etc), but if you have a
    generic device that does not fall into one of the standard device classes,
    you have to write your own driver.
    Well, yes and no. Mostly no. When you register yourself in a device
    interface, it lets user mode applications find your device by enumerating
    the devices who have registered. That's all it does. You don't "inherit"
    any behavior by registering a device interface. It's just a way to allow
    your driver to be found.
    Yes, if you are installing your own driver, but that has nothing to do with
    "device interfaces". The word "interface" is overloaded in the NT driver
    Tim Roberts, Nov 24, 2007
    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.