采用WaitForSingleObject来实现。
HANDLE hTaskProc = CreateThread(NULL, 0, UploadTaskProc, (void *)this, 0, NULL);
if (hTaskProc != NULL)
{
WaitForSingleObject(hTaskProc, 5000);
CloseHandle(hTaskProc);
}
采用WaitForSingleObject来实现。
HANDLE hTaskProc = CreateThread(NULL, 0, UploadTaskProc, (void *)this, 0, NULL);
if (hTaskProc != NULL)
{
WaitForSingleObject(hTaskProc, 5000);
CloseHandle(hTaskProc);
}