Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
3.67/5 (3 votes)
Hi everybody!

I would like to know how to detect the removal of a headset device. When the headset device is unplugged I want to stop the currently running video. Does anybody know how to do that?
I'm programming in VB.net, but any examples on how to achieve this are welcome.

Thanks for your interest!
Posted
Updated 25-Aug-11 22:29pm
v3

AFAIK, you can't, not without some specialized hardware to monitor the physical port.
 
Share this answer
 
Monitoring that is driver specific, if it's supported at all. Not all audio cards support reporting jack status.

There is also no standard interface to check for that or get notifications for it. You'd have to write code specific to the audio driver to get any kind of notification and that's only if the audio driver exposes an interface to do so.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900