关于线程创建的问题
在类的头文件中:
public:
unsigned int _stdcall StopCollect(void * param);
在实现源代码中:
void CCompanyInformationView::OnCollectInformation()
{
HANDLE hndstop=NULL;
DWORD addr=0;
hndstop=(HANDLE)_beginthreadex(NULL,0,StopCollect,0,0,&addr);
.......
.......
}
unsigned int _stdcall CCompanyInformationView::StopCollect(void * param)
{
m_flag=1;
return 1;
}
编译出现的错误:
E:\dev\src\CompanyInformation\CompanyInformationView.cpp(203) : 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
在网上看到过好多类似问题的,但都试过了,都解决不了
希望有高手给点详细的意见