M
MyCatAlex
Guest
I need to define a few separate threads and synchronize the process in my C++ application. I cannot find any headers anywhere to define the variables and constants that are given in C++ examples. For instance:
It is so called controlling function (Multithreading: Creating Worker Threads in MFC)
UINT MyThreadProc( LPVOID pParam )
{
CMyObject* pObject = (CMyObject*)pParam;
if (pObject == NULL ||
!pObject->IsKindOf(RUNTIME_CLASS(CMyObject)))
return 1; // if pObject is not valid
// do something with 'pObject'
return 0; // thread completed successfully
}
And how about this function:
CWinThread* AfxBeginThread(
AFX_THREADPROC pfnThreadProc,
LPVOID pParam,
int nPriority = THREAD_PRIORITY_NORMAL,
UINT nStackSize = 0,
DWORD dwCreateFlags = 0,
LPSECURITY_ATTRIBUTES lpSecurityAttrs = NULL);
The highlighted words are undefined.
Is there a unified method to quickly find headers that will define all the missing variables, etc.
Thank you, - MyCatAlex
Continue reading...
It is so called controlling function (Multithreading: Creating Worker Threads in MFC)
UINT MyThreadProc( LPVOID pParam )
{
CMyObject* pObject = (CMyObject*)pParam;
if (pObject == NULL ||
!pObject->IsKindOf(RUNTIME_CLASS(CMyObject)))
return 1; // if pObject is not valid
// do something with 'pObject'
return 0; // thread completed successfully
}
And how about this function:
CWinThread* AfxBeginThread(
AFX_THREADPROC pfnThreadProc,
LPVOID pParam,
int nPriority = THREAD_PRIORITY_NORMAL,
UINT nStackSize = 0,
DWORD dwCreateFlags = 0,
LPSECURITY_ATTRIBUTES lpSecurityAttrs = NULL);
The highlighted words are undefined.
Is there a unified method to quickly find headers that will define all the missing variables, etc.
Thank you, - MyCatAlex
Continue reading...