spynet
April 17th, 2003, 04:43 AM
Hi,
I have a problem of casting..
Thi is the source code:
bool CNTService_Sniffer::StartSniffer()
{
//Start del thread
unsigned int m_uiThreadID;
hThread =(HANDLE) _beginthreadex(
0, 0, ProcessAsThread, //ThreadFunction
0, 0, &m_uiThreadID
);
SetThreadPriority(hThread, THREAD_PRIORITY_NORMAL);
WaitForSingleObject( hThread, INFINITE );
return true;
}
the error is:
!!!!
error C2664: '_beginthreadex' : cannot convert parameter 3 from 'unsigned int (void *)' to 'unsigned int (__stdcall *)(void *)'
None of the functions with this name in scope match the target type
PLEASE HELP ME!! I DO NOT UNERSTAND WHAT IS THE CORRECT CAST..
THANK YOU FOR ATTENTION.
BYProcessAsThread
I have a problem of casting..
Thi is the source code:
bool CNTService_Sniffer::StartSniffer()
{
//Start del thread
unsigned int m_uiThreadID;
hThread =(HANDLE) _beginthreadex(
0, 0, ProcessAsThread, //ThreadFunction
0, 0, &m_uiThreadID
);
SetThreadPriority(hThread, THREAD_PRIORITY_NORMAL);
WaitForSingleObject( hThread, INFINITE );
return true;
}
the error is:
!!!!
error C2664: '_beginthreadex' : cannot convert parameter 3 from 'unsigned int (void *)' to 'unsigned int (__stdcall *)(void *)'
None of the functions with this name in scope match the target type
PLEASE HELP ME!! I DO NOT UNERSTAND WHAT IS THE CORRECT CAST..
THANK YOU FOR ATTENTION.
BYProcessAsThread