Windows 7 Audio API problem on Windows 7


I developed a simple recording applicaiton using audio API.
When I run this application on Windows 7, it has one problem.
If I remove and re-plug Mic during record, my application become block.
The call of waveInUnprepareHeader() or waveInReset() function doesn't never return.
My application works well on Windows XP.

Is this just the problem of Windows 7? or how can I resolve this problem?

I attached my sample application. View attachment


This website is not affiliated, owned, or endorsed by Microsoft Corporation. It is a member of the Microsoft Partner Program.