driver remove via devcon sometimes doesn't remove audio inputs and outputs

Dear Sirs,

I’ve a pure virtual audio driver which I’m installing and uninstalling via devcon. But sometimes the uninstall doesn’t remove the audio inputs and outputs and they go into hidden state in the device managers “Audio inputs and outputs” tab. In the “Sound, video and game controllers” tab the driver is removed. This doesn’t happen always even on the same system sometimes the inputs and outputs are also removed, sometimes not and then I have to remove them manually in the device manager.

Looking at my setupapi.dev.log the devcon uninstall looks like this for a successful remove:

>>>  [Delete Device - ROOT\MEDIA\0000]
>>>  Section start 2018/10/17 13:49:24.734
      cmd: devcon.exe  remove *R3LAYWDMDriver
     dvi: Query-and-Remove succeeded
<<<  Section end 2018/10/17 13:49:24.840
<<<  [Exit status: SUCCESS]


>>>  [Delete Device - SWD\MMDEVAPI\{0.0.0.00000000}.{6247CE0D-5C9E-41B1-BBA2-1688857CD843}]
>>>  Section start 2018/10/17 13:49:24.996
      cmd: C:\WINDOWS\System32\svchost.exe -k LocalSystemNetworkRestricted -p
<<<  Section end 2018/10/17 13:49:25.012
<<<  [Exit status: SUCCESS]


>>>  [Delete Device - SWD\MMDEVAPI\{0.0.1.00000000}.{3E58B06F-7A2E-4669-9E5E-DAAD442046C7}]
>>>  Section start 2018/10/17 13:49:25.090
      cmd: C:\WINDOWS\System32\svchost.exe -k LocalSystemNetworkRestricted -p
<<<  Section end 2018/10/17 13:49:25.105
<<<  [Exit status: SUCCESS]

When the audio inputs and outputs are not removed I can only see the first section and the “[Delete Device - SWD\MMDEVAPI …” sections are missing:

>>>  [Delete Device - ROOT\MEDIA\0000]
>>>  Section start 2018/10/17 14:41:16.391
      cmd: devcon.exe  remove *R3LAYWDMDriver
     dvi: Query-and-Remove succeeded
<<<  Section end 2018/10/17 14:41:16.462
<<<  [Exit status: SUCCESS]

What could be the reason that the “[Delete Device - SWD\MMDEVAPI …” command is not invoked sometimes? Can I somehow trigger these commands from my code?

Thanks and best regards,
Johannes Freyberger

ups … parts of the setupapi.dev.log seem to be interpreted as quotes. Sorry for that, please unfold …

Sorry for that, please unfold

Markdown is a wonderful thing. But, you know, you actually have to use it.

B)

Peter

Yes, you’re right, but I wasn’t aware that Markdown is active. Thanks for justifying my post.