Shambler
May 9th, 2006, 12:39 PM
Here is a stripped down version of the code I have:
void QueryThreadProc(void* QueryRef)
{
// I want to call UT2k4MasterQuery::Tick here
}
UT2k4MasterQuery::UT2k4MasterQuery(char* Key, char* IP, int Port)
{
_beginthread(QueryThreadProc, 0, NULL);
}
void UT2k4MasterQuery::Tick()
{
}
Now, UT2k4MasterQuery is a managed C++ class and I want to find a way of calling UT2k4MasterQuery::Tick from QueryThreadProc.
I've tried passing function references/delegates as arguments for beginthread, using global references (which seem to be totally gone with managed C++??!!!) but without success.
This is really frustrating....what I'm trying to do SHOULD be incredibly simple and I've spent hours at it both searching and testing code, does anyone know how I can get it done?
Thanks.
void QueryThreadProc(void* QueryRef)
{
// I want to call UT2k4MasterQuery::Tick here
}
UT2k4MasterQuery::UT2k4MasterQuery(char* Key, char* IP, int Port)
{
_beginthread(QueryThreadProc, 0, NULL);
}
void UT2k4MasterQuery::Tick()
{
}
Now, UT2k4MasterQuery is a managed C++ class and I want to find a way of calling UT2k4MasterQuery::Tick from QueryThreadProc.
I've tried passing function references/delegates as arguments for beginthread, using global references (which seem to be totally gone with managed C++??!!!) but without success.
This is really frustrating....what I'm trying to do SHOULD be incredibly simple and I've spent hours at it both searching and testing code, does anyone know how I can get it done?
Thanks.