windows programming

CreateThread function

tomato13 2008. 2. 13. 11:28

static DWORD WINAPI threadFunc(LPVOID lpparam)
{
 return NULL;
}

 

int CEventInvoker::m_threadCreate()
{
 DWORD dwThreadId;
 HANDLE hThread;
 
 hThread = CreateThread(
        NULL,           // no security attributes
        0,              // use default stack size 
        threadFunc,    // thread function
        this,   // argument to thread function
        0,              // use default creation flags
        &dwThreadId);   // returns the thread identifier
 
 return 1;
}