Click here to Skip to main content
15,891,687 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to register for hardware changes. I found following link to do this: http://msdn.microsoft.com/en-us/library/windows/desktop/aa363432%28v=vs.85%29.aspx[^]

But, the hardware GUID described is for USB devices not for the Headphone port.

C++
// This GUID is for all USB serial host PnP drivers, but you can replace it 
// with any valid device class guid.
GUID WceusbshGUID = { 0x25dbce51, 0x6c8f, 0x4a72, 
                      0x8a,0x6d,0xb5,0x4c,0x2b,0x4f,0xc8,0x35 };


For following link I can get a lot of system defines classes but I am unable to sort out which one will be useful for Headphone detection:;
http://msdn.microsoft.com/en-us/library/windows/hardware/ff553426%28v=vs.85%29.aspx[^]

can any one help me?

Thanks
Posted
Comments
Michael Haephrati 1-Oct-13 17:43pm    
You are wrong. The USB GUID is brought here just as an example but you can replace it with any other valid GUID.

1 solution

You don't want to be looking at all hardware devices, but rather device events for the Core Audio end-point devices. That can tell you when a headset is plugged in.

http://msdn.microsoft.com/en-us/library/windows/desktop/dd370810(v=vs.85).aspx[^]
 
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