#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; }