一个编译错误,大家帮忙看看

pursuit 2003-08-18 03:22:52
......
if (hReadThread = CreateThread (NULL, 0, ReadPortThread, 0, 0, &dwThreadID))
......
DWORD CSerial::ReadPortThread(LPVOID lpvoid)
出现编译错误:
error C2664: 'CreateThread' : cannot convert parameter 3 from 'unsigned long (void *)' to 'unsigned long (__cdecl *)(void *)'
None of the functions with this name in scope match the target type
请问该如何修改?
...全文
41 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
shi0503 2003-08-28
  • 打赏
  • 举报
回复
好像是要把线称作为一个全局函數
ms44 2003-08-27
  • 打赏
  • 举报
回复
parameters error,好好检查一下吧.
aawolf 2003-08-26
  • 打赏
  • 举报
回复
ReadPortThread定义有问题,在定义前加上个__cdecl
pursuit 2003-08-26
  • 打赏
  • 举报
回复
UP有分
r302t 2003-08-19
  • 打赏
  • 举报
回复
调用的ReadPortThread函数不符合要求,主要指所带参数的类型不符合要求。

19,500

社区成员

发帖
与我相关
我的任务
社区描述
硬件/嵌入开发 嵌入开发(WinCE)
社区管理员
  • 嵌入开发(WinCE)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧