描述:
请问在ATL编写ActiveX 该如何使用线程/多线程.
解决方案1:
//my example:
DWORD WINAPI FirstSyncThread( LPVOID lpParam )
{
CMEUUOutLook*pMeuu=(CMEUUOutLook*)lpParam;
if(pMeuu !=NULL)
{
...
}
return 0;
}
void CMEUUOutLook::FirstSyncWithRemote()
{
DWORD dwThreadId;
m_hFirstThread = CreateThread(
NULL, // no security attributes
0, // use default stack size
FirstSyncThread, // thread function
this, // argument to thread function
0, // use default creation flags
&dwThreadId); // returns the thread identifier
}
http://www.mvps.org/vcfaq/com/index.htm