This project has moved and is read-only. For the latest updates, please go here.

How to detect insertion or removal of a USB sound card?

May 11, 2013 at 6:17 AM
Is there anyway to detect when a USB sound card is either inserted or removed? Bonus, if I can also detect insertion/removal of a Mic from the Mic RJ-45 jack.
May 12, 2013 at 8:00 AM
Edited May 12, 2013 at 8:00 AM
You should be able to use this as a starting point:

Detecting USB Drive Removal in a C# Program
Windows will send WM_DEVICECHANGE message to all applications whenever some hardware change occurs, including when a flash drive (or other removable device) is inserted or removed. The WParam parameter of this message contains code which specifies exactly what event occurred.