Home > Back-end >  Two timeSetEvent when performing a callback function...
Two timeSetEvent when performing a callback function...

Time:09-24

I used two timeSetEvent function, circulation perform two things at the same time, one for collection, a broadcast, use the callback function to trigger the loop execution,
Results: two timeSetEvent function return values are not zero (hereinafter the program ID1=16, ID2=33), the timer has created a success, but only the first two callback function callback function (first create the timer callback function can perform, created after the timer callback function cannot be run), hereinafter called the TimeCallBack1 function can perform, TimeCallBack2 function but the code does not perform,

If one of the timer commented out, another program is running normal,

Always can't find the reason, urgent, everybody can help me to analysis analysis, thank you!

Program is very big, the following is the application framework:
//a.c pp
ID1=timeSetEvent (1, 1, (LPTIMECALLBACK) TimeCallBack1, (DWORD) this, TIME_PERIODIC);
Void PASCAL TimeCallBack1 (UINT uTimerID, UINT uMsg, dwords dwUser, dwords dw1, dwords dw2)
{
//
}
//the biggest pp
ID2=timeSetEvent (10, 1, (LPTIMECALLBACK) TimeCallBack2, (DWORD) this, TIME_PERIODIC);
Void PASCAL TimeCallBack2 (UINT uTimerID, UINT uMsg, dwords dwUser, dwords dw1, dwords dw2)
{
//
}
  • Related