com多线程 在com接口函数中,用_beginthread开启新线程不成功,求教怎么解决? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 只开了一个线程,现在怀疑com接口函数是不是不支持多线程.. CAdd* g_pAdd = NULL;CAdd::CAdd(){ g_pAdd = this;}void FireExecution(void* lpvoid){ ::MessageBox(NULL,szPoint,NULL,1); g_pAdd->Fire_ExecutionOver(6); ::MessageBox(NULL,"after",NULL,1);}STDMETHODIMP CAdd::Add(int a, int b){ // TODO: Add your implementation code here_beginthreadex(NULL,0,(unsigned(__stdcall*)(void*))FireExecution,NULL,0,NULL); return S_OK;}贴上源代码,线程FireExecution中,两个message都能正常弹出,在两个messagebox之间的函数执行进入不了,不知道为什么?类指针g_pAdd也是有效的。 如何在当前窗口显示鼠标位置的坐标 300分求高手完善一个函数 来看我写的界面库 如何用非MFC方式读取bmp文件的内容? 如何增大自动生成菜单中菜单项的字体 OnMouseMove与OnLButtonDown函数的关系,关于绘图 100分求一个定时器的类...大家帮个忙啊... 关于一个界面控件的实现?[十万火急!] RTP和directshow个是什末意思???看那些书可学到??谢谢! 在windows2003下怎样获取杀毒软件病毒库的日期?VC编程 急急急死我了 :( tiger版主,怎么在基于对话框的MFC程序里显示图像? com多线程
{
g_pAdd = this;
}void FireExecution(void* lpvoid)
{
::MessageBox(NULL,szPoint,NULL,1);
g_pAdd->Fire_ExecutionOver(6);
::MessageBox(NULL,"after",NULL,1);
}STDMETHODIMP CAdd::Add(int a, int b)
{
// TODO: Add your implementation code here_beginthreadex(NULL,0,(unsigned(__stdcall*)(void*))FireExecution,NULL,0,NULL); return S_OK;
}
贴上源代码,线程FireExecution中,两个message都能正常弹出,在两个messagebox之间的函数执行进入不了,不知道为什么?类指针g_pAdd也是有效的。