I have written a program bassed on MSDN MMDevice API .
The primary part in this program is IMMDeviceEnumerator::RegisterEndpointNotificationCallback method.
This program works on the most machines properly, it means the program first prints a list of all audio end-points on the machine and nextt, while a head-phone is pluged in the head-phone jack or a microphone is pluged to the microphone jack, the program is able to detect audio end-point changes and prints that change.
But it does not work well on some machines for instant my own laptop, despite it prints all audio end-points correctly; it can not detect audio end-point changes on head-phone jack, such as pluging and un-pluging head-phone in the jack. while microphone pluging is detected.
Sound card drivers is installed and you can hear voice, when a head-phone is plugged. OS is windows 10 64-bit.
I know MMDevice API requires at least windows Vista and beyond also its lib and dll and sound card drivers should be installed.
I would apreciate, if someone explanes why head-phone changes are not detected via windows on such machines and how I can fix this issue.