我无法将 stdcall 函数名称“TestFunction”作为参数传递给 ExecuteLocalThread 并在 beginthreadex 中使用
unsigned __stdcall TestFunction(void* timerPointer)
{
unsigned result =0;
printf("thread is running\n");
return result;
}
void ExecuteLocalThread(unsigned int (_stdcall *_StartAddress)(void *))
{
HANDLE heartBeatThread;
unsigned int hbThreadID;
heartBeatThread = (HANDLE)_beginthreadex(NULL, 0 , unsigned int (_stdcall *_StartAddress)(void *)/*&TestFunction*/, (void*)this, CREATE_SUSPENDED, &hbThreadID);
ResumeThread( heartBeatThread );
}