[wdmaudiodev] Re: Audio miniport driver

  • From: wdmaudiodev@xxxxxxxxxxxxxx
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Thu, 22 Oct 2020 06:40:28 -0700

Tim, thanks for the reply.


> Do you actually have a KMDF driver?
> Sysvad is a WDM driver, not KMDF.

I /thought/ it was KMDF. My current driver is based on the latest SysVAD, and SysVAD contains lots of WdfXxxxx() function calls and use of structs and macros that begin with "WDF_". The original comments even mention "Framework", e.g.:

*WDF_DRIVER_CONFIG_INIT*(&config, *WDF_NO_EVENT_CALLBACK*);
    //
    // Set WdfDriverInitNoDispatchOverride flag to tell the framework
    // not to provide dispatch routines for the driver. In other words,
    // the framework must not intercept IRPs that the I/O manager has
    // directed to the driver. In this case, they will be handled by Audio
    // port driver.
    //
    config.DriverInitFlags |= WdfDriverInitNoDispatchOverride;


> Assuming you are not a KMDF driver,
> you use IoRegisterDeviceInterface and IoSetDeviceInterfaceState.

It looks like a WDM driver can't create a Symbolic Link, or at least is doesn't let me name it. *IoRegisterDeviceInterface* /returns/ a symbolic link, which kind of surprised me. I looked at *IoCreateSymbolicLink*, but remarks in the docs say:

   /WDM drivers *do not name device objects and therefore should not
   use this routine*. Instead, a WDM driver should call
   //IoRegisterDeviceInterface
   
<https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-ioregisterdeviceinterface>//to
   set up a symbolic link./


I'm really confused.


Other related posts: