I had declared a function and passed as 3 parameter of CreateThread() function but I tried to put this function and related in a class apart, to make code more organizated but I got the following error:
error: cannot convert 'long unsigned int (MainWindow::)(void)' to 'LPTHREAD_START_ROUTINE {aka long unsigned int (attribute((stdcall)) )(void)}' for argument '3' to 'void* CreateThread(LPSECURITY_ATTRIBUTES, SIZE_T, LPTHREAD_START_ROUTINE, LPVOID, DWORD, LPDWORD)'
^
I guess it's because every first parameter of a method as hidden parameter auto-generated by the compiler which is where this
pointer gets passed making the function signature mismatch, right?
Is there any way I can make this work?
It does happens in the call from inside a method:
hThread = CreateThread( NULL, 0, &func, NULL, 0, NULL);