[wdmaudiodev] Re: Audio miniport driver

  • From: Tim Roberts <timr@xxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Thu, 22 Oct 2020 20:21:43 -0700

On Oct 22, 2020, at 6:40 AM, wdmaudiodev@xxxxxxxxxxxxxx wrote:


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.

You asked about creating a device interface.  I told you how to do that.  It 
does, indeed, create a symbolic link.  Your apps find that symbolic link by 
using the SetupDi routines to search for the device interface.

It certainly is possible to create your own symbolic link.  The remark in the 
doc is nonsense.  They don’t WANT you to name your driver, because the chances 
for a collision with other drivers is very, very high.  The device interface is 
based on a GUID, so there is zero chance for collision.
— 
Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.

Other related posts: