多线程程序调试运行出错Unhandled exception
1、解决方案:m_hFH463CommI句柄改成全局变量。
在stdafx.h文件中定义全局变量
extern HANDLE g_hFH463CommI; //串口句柄
stdafx.cpp
HANDLE g_hFH463CommI; //串口句柄
然后给全局变量赋值
g_hFH463CommI=m_hFH463CommI;
WriteFile(g_hFH463CommI, ch, sizeof(ch), &dwactlen, NULL) ;
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:65
阅读量:100
阅读量:68
阅读量:177
阅读量:73