Phill Heald
December 3rd, 2006, 12:34 PM
Hi All...
Not being au fait with multi threading, Id just like to get your advice,
Im starting a thread like this:
m_pFileHub = AfxBeginThread(RUNTIME_CLASS(CFileHub),
THREAD_PRIORITY_NORMAL,
0,
CREATE_SUSPENDED);
where m_pFileHub is a pointer to a class derived from CWinThread.
Now the compiler doesnt like it because it insists on returning a CWinThread*, not a CFileHub*.
My question is, how do I start my thread then get access to its variables and methods. I had thought I would be able to use the pointer returned by AfxBeginThread !
Thanks all for helping me
Phill
Not being au fait with multi threading, Id just like to get your advice,
Im starting a thread like this:
m_pFileHub = AfxBeginThread(RUNTIME_CLASS(CFileHub),
THREAD_PRIORITY_NORMAL,
0,
CREATE_SUSPENDED);
where m_pFileHub is a pointer to a class derived from CWinThread.
Now the compiler doesnt like it because it insists on returning a CWinThread*, not a CFileHub*.
My question is, how do I start my thread then get access to its variables and methods. I had thought I would be able to use the pointer returned by AfxBeginThread !
Thanks all for helping me
Phill