I need to run this fuction in separate thread:
EdsError downloadEvfData(EdsCameraRef camera)
{
EdsError err = EDS_ERR_OK;
// some code skipped
}
I call this function like this:
HANDLE thread = CreateThread(NULL,0,downloadEvfData,camera,0,NULL);
But get this error:
invalid conversion from 'void (*)(EdsCameraRef)' {aka 'void (*)(__EdsObject*)'} to 'LPTHREAD_START_ROUTINE' {aka 'long unsigned int (__attribute__((stdcall)) *)(void*)'}
How can I fix it? Thanks a lot!
Your
downloadEvfDatafunction doesn't have the expectedLPTHREAD_START_ROUTINEsignature, you can do something like this instead (ifEdsCameraRefis a pointer) :