--- Sponsor's Message --------------------------------------
Who Are the Top Dogs?
Find out about the best newsletters and discussions!
http://click.topica.com/aaaa4qbUrGczbU68iFb/TopDogs
------------------------------------------------------------
Hello all
First of all I give credit to all those who are
taking control
of this multi-programmer-game.
Next I have a problem similar to that oh Josiha
Avery. The thing is
how to use a function-pointer to an instance in a
class.
int CacheSocket::create()
{
// Locally defined function
pointer
// This is how the function-pointer
should look to be accepted in the CreateThread
DWORD (__stdcall
*func)(void*);
// A function defined in the
class we are currently in func =
this->ServerThread;
// THIS IS WHERE THE ERROR OCCURS
ERROR MSG
cannot convert from 'unsigned long
(__stdcall CacheSocket::*)(void *)'
to 'unsigned long (__stdcall *)(void
*)'
// Create the thread
CreateThread( NULL, 0,
(LPTHREAD_START_ROUTINE)func, NULL, NULL, &ThreadId );
}
DWORD WINAPI CacheSocket::ServerThread( LPVOID
lpParameter )
{
}
Please help me with this one
Christian Gyrling
____________________________________________________________
T O P I C A -- Learn More. Surf Less.
Newsletters, Tips and Discussions on Topics You Choose.
http://www.topica.com/partner/tag01
|