#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; }
原文地址:http://blog.csdn.net/u011046042/article/details/41977625