Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results


More Info on Driver Writing and Debugging

The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.

Check out The OSR Learning Library at:

Before Posting...

Please check out the Community Guidelines in the Announcements and Administration Category.

Plug/Unplug virtual device

kaikai Member Posts: 4

I’m having a virtual audio driver and a virtual mic. Then I have a winform application to control the virtual device. Are there anyway that when my app is closed the virual device will be hidden from user, and when my app is opened again the virtual device wil appear.? Thank you.


  • Doron_HolanDoron_Holan Member - All Emails Posts: 10,584

    What bigger problem are you trying to solve?

  • kaikai Member Posts: 4
    edited April 6

    @Doron_Holan My app will cancel noise from the real mic and then send audio to virtual driver. User will use my virtual mic instead the real mic in other application(like skype). So I want my virtual mic to be hidden from user when my app is closed.

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 13,916

    Yes, actually, there is a way.

    You need to support the KSPROPERTY_JACK_DESCRIPTION property. I'm guessing you already support that, because starting with Windows 8, the Audio Engine won't recognize your driver without it. The JACK_DESCRIPTION structure includes a member called IsConnected, which you are probably setting to TRUE. So, just set that to FALSE to start with. Then, when you want to change your availability state, you change that element, then fire off a KSEVENT_PINCAPS_JACKINFO_CHANGE event using IPortEvents::GenerateEventList. That will cause the Audio Engine to fetch your jack description again. It's exactly the same as plugging or unplugging headphones into a physical headphone jack.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 13,916

    Of course, the PROPER way to do what you have done is to write a GFX APO that sits inline with the audio endpoint.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Developing Minifilters 24 May 2021 Live, Online
Writing WDF Drivers 14 June 2021 Live, Online
Internals & Software Drivers 2 August 2021 Live, Online
Kernel Debugging 27 Sept 2021 Live, Online