"Nigel Liang" ncliang@gmail.com wrote:
- CreateTimerQueueTimer(phNewTimer, hQueue, pfnCallback, pContext,
dwDueTime, dwPeriod, dwFlags);
- return *phNewTimer;
You have to check the return value of CreateTimerQueueTimer before returning a possible garbage.