Hello, I have that problem: I try to create a new thread (on windows) with the api function 'CreateThread' from a function in a class; the thread procedure is a function private of the class, also the hanlde return, and the parameters passed. that's how I'm trying to do that (I have created a sample code to help my poor explanations ), that's it: first the main *.cpp file
now the 'asample.h' class header:
and finally the 'asample.cpp' code:
DWORD WINAPI crThr(LPVOID );
the compiler says
DWORD WINAPI CSample::crThr(LPVOID lpParam)
I have tryed to rename the function to:
In method `void CSample::start()':
12 no matches converting function `crThr' to type `DWORD (*)(void *)'
11 candidates are: DWORD CSample::crThr(void *)
[Build Error] [asample.o] Error 1
'DWORD CSample::WINAPI crThr(LPVOID lpParam)'
but not solves the prob; also have done a call like:
and finally I have no idea on what more to do.
How can I salve that problem?
Thank's in advance
PS I've decided to post here instead in windows board because I think that's a class problem, no a winapi prob.