How can I use CeRunAppAtTime for a thread
-
Hi I want a thread to start after 15/20 min For that can I use CeRunAppAtTime() .If yes can anyone provide me ways to do that. Suppose this is my thread
void main()
{
..
..
g_handle= ::CreateThread( NULL, 0,MyThread, NULL, 0, 0);
....}
Now I want This MyThread to start after 15/20 min can I do that Thanks in advance
-
Hi I want a thread to start after 15/20 min For that can I use CeRunAppAtTime() .If yes can anyone provide me ways to do that. Suppose this is my thread
void main()
{
..
..
g_handle= ::CreateThread( NULL, 0,MyThread, NULL, 0, 0);
....}
Now I want This MyThread to start after 15/20 min can I do that Thanks in advance
Start your thread immediatly. When the thread starts have it to create an unnamed event. After creating the event the thread can call CeRunAppAtTime and pass the event handle. Then call the Wait function using the even't handle as athe parameter. The thread will be blocked from running until the event gets triggered. For information on using CeRunAppAtTime with an event handle please see my comment at the bottom of This MSDN Documentation page[^]
Joel Ivory Johnson