I'm trying to call this function requested times. All functions and variables are members of one class, access is public. So, I'm calling like this:
void MultiReader::CreateThreads()
{
unsigned int nThreadNo;
for( nThreadNo = 0; nThreadNo < vDirectories.size(); nThreadNo++)
{
CreateThread( NULL, 0, &MultiReader::ReaderThread, vDirectories.at(nThreadNo).sDirectoryName, 0, NULL);
}
}
DWORD WINAPI MultiReader::ReaderThread(LPVOID p_pVoid)
{
return NULL;
}
And I get this:
error C2664: 'CreateThread' : cannot convert parameter 3 from 'DWORD (__stdcall MultiReader::* )(PVOID)' to 'LPTHREAD_START_ROUTINE'
There is no context in which this conversion is possible
Can anyone point my error? Suggestion maybe?