创建一个线程
#include <windows.h>
#include <process.h>
unsigned __stdcall myfunc(void* p);
void main()
{
HANDLE thd;
unsigned tid;
thd = (HANDLE)_beginthreadex(NULL,
0,
myfunc,
0,
0,
&tid );
if (thd != NULL)
{
CloseHandle(thd);
}
}
unsigned __stdcall myfunc(void* p)
{
// ...
return 0;
}

浙公网安备 33010602011771号