This is the method i use to start threads and it works, but I wonder are there any downsides to this way.
void myFunc()
{
//code here
}
unsigned int _stdcall ThreadFunction(void* data)
{
myFunc();
return 0;
}
I my main function i use :
HANDLE A = (HANDLE)_beginthredex(0,0,&ThreadFunction,0,0,0);
And I end the thread with CloseHandle(A);
.