使用两个WINDOWS类库出现的问题,请帮忙看看!

txhby0395 2007-02-07 09:03:46
在我的程序中同时使用了两个类库,一个是ADO库,还有一个是msscript库,调用方式如下
#import "C:\Program Files\Common Files\System\ado\msado15.dll" no_namespace rename("EOF","adoEOF")
#pragma warning( disable: 4786)
#import "msscript.ocx" no_namespace
以上代码都放在StdAfx.h文件中,但编译以后给出如下错误提示:
Compiling...
StdAfx.cpp
e:\functionscript\release\msscript.tlh(444) : error C2367: 'Error' : redefinition; different uuid specifiers
e:\functionscript\release\msado15.tlh(923) : see declaration of 'Error'
Error executing cl.exe.
Creating browse info file...

出错的文件内容为
msscript.tlh(444)
struct __declspec(uuid("0e59f1de-1fbe-11d0-8ff2-00a0d10038bc"))
Error;
// [ default ] interface IScriptError
msado15.tlh
struct __declspec(uuid("00000500-0000-0010-8000-00aa006d2ea4"))
Error : IDispatch

请大家帮我分析一下,应该怎么修改
...全文
166 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
txhby0395 2007-02-07
  • 打赏
  • 举报
回复
感谢提醒,我已经顺利解决了!
ouyh12345 2007-02-07
  • 打赏
  • 举报
回复
Error重定义了.
看来得使用ado的命名空间.

3,245

社区成员

发帖
与我相关
我的任务
社区描述
ATL,Active Template Library活动(动态)模板库,是一种微软程序库,支持利用C++语言编写ASP代码以及其它ActiveX程序。
社区管理员
  • ATL/ActiveX/COM社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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