求助,驱动程序中加入__try __except会报错

whatday 2011-12-25 07:19:20
环境为:VC6+WDK7600 在程序中一旦用到 __try __except 会报错unresolved external symbol __except_handler4 怎么解决呢 在网上查了下 好像是VC有个 Buffer Security Check就是这个选上出错的 但是VC6中 不知道在哪里设置? 还有这个是不是库没有引入造成的呢?
...全文
290 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
fly4free 2011-12-26
  • 打赏
  • 举报
回复
try
{
}
except(EXECUTION_HANDLER)
{
}

没有下划线。
whatday 2011-12-26
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 fight_in_dl 的回复:]

Also, add /GS- option. It will solve problems with ___security_cookie and __except_handler4, though shall produce non-critical warning under VC6, since VC6 doesn't know this option.

如上所说,手动加入编译选项/……
[/Quote]
实在是准确无误呀 谢谢fight_in_dl
战在春秋 2011-12-26
  • 打赏
  • 举报
回复
Also, add /GS- option. It will solve problems with ___security_cookie and __except_handler4, though shall produce non-critical warning under VC6, since VC6 doesn't know this option.

如上所说,手动加入编译选项/GS-即可,可能会有警告,不用理会。


  • 打赏
  • 举报
回复
要自己定义except_handler4

2,640

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 硬件/系统
社区管理员
  • 硬件/系统社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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