I'm having a problem with _beginthread in microsoft visual studio c++ 10 express: my code:
void __cdecl DashThread( void * Args ) // function without any class refs
{
while(1){
MessageBox::Show("work");
Sleep(5000);
}
_endthread();
}
private:
System::Void button8_Click_1(System::Object^ sender, System::EventArgs^ e) {
HANDLE HDash = ( HANDLE ) _beginthread(DashThread, 0, NULL );
}
and errors:
error C3641: 'DashThread' : invalid calling convention '__cdecl ' for function compiled with /clr:pure or /clr:safe
error C2664: 'beginthread' : cannot convert parameter 1 from 'void (_cdecl *)(void *)' to 'void (__cdecl *)(void *)'