polus
October 4th, 2005, 04:33 PM
Hi, Im trying to create a worker thread and have followed/read several guides. I get this error when trying to compile:
error C2665: 'AfxBeginThread' : none of the 2 overloads can convert parameter 1 from type 'void (void)'
I dont understand, there is a funtion that takes void, void:
void CFModAudio::PlayThread( void )
Please help.
void CFModAudio::Play()
{
running = TRUE;
AfxBeginThread( PlayThread, (LPVOID)this );
}
UINT CFModAudio::PlayThread( LPVOID pcAudio )
{
CFModAudio *cAudio = (CFModAudio *)pcAudio;
cAudio->PlayThread();
return 0;
}
void CFModAudio::PlayThread( void )
{
// Do the worker task...
}
error C2665: 'AfxBeginThread' : none of the 2 overloads can convert parameter 1 from type 'void (void)'
I dont understand, there is a funtion that takes void, void:
void CFModAudio::PlayThread( void )
Please help.
void CFModAudio::Play()
{
running = TRUE;
AfxBeginThread( PlayThread, (LPVOID)this );
}
UINT CFModAudio::PlayThread( LPVOID pcAudio )
{
CFModAudio *cAudio = (CFModAudio *)pcAudio;
cAudio->PlayThread();
return 0;
}
void CFModAudio::PlayThread( void )
{
// Do the worker task...
}