I have an MFC app playing DirectX audio while aQueue timer is running. I start the timer when the audio starts, and stop the timer when the audio stops.
The calls to start and stop the timer are standard:
DeleteTimerQueueTimer(NULL, m_timerHandle, NULL);
// create the timer
BOOL success = ::CreateTimerQueueTimer(
Interestingly, if I make the interval higher (change 50 to 2000) it doesn't hang, but then I get an error when I call CloseHandle.
I am guessing this has something to do with the way threads are handled, but I don't have much experience controlling threads.