Dear all,

I met one problem about resuming the thread. The thread function init
() will be executed when the thread test_thread() is resumed. 
However, it is never done by my following snippet of code as 
follows. I don't know where the problem is. Can you help me a little?

Thanks in advance,

Bests,

L.M

// Include relevant libs.
#include "windows.h"
...

//global vars.
HANDLE Handle_1 = 0;

DWORD WINAPI init()
{
        ...
}

void test_thread(void)
{
        DWORD dwThreadId;
        
        Handle_1 = CreateThread( NULL, 0, init, NULL, 
CREATE_SUSPENDED, &dwThreadId );
                                                        
                                        
}

int main() 
{
     ...
     test_thread();
     ResumeThread( Handle_1 );
     ...
}

Reply via email to