CreateObject 调用提示UTILCLS.H 有误 急呀!

zwest 2004-12-27 11:29:01
void __fastcall TForm1::Button3Click(TObject *Sender)
{
Variant Ex;
int i,j=1;
AnsiString para1,para2,para3,para4;
Ex=Variant::CreateObject("myobj");
i = Ex.OleFunction("function2",para1,para2,para3,para4);
}
用的CB5编译
先注册myobj.dll成功
调用 i = Ex.OleFunction("function1"); 即没参数时是成功的
运行上面一段提示 '[C++ Error] UTILCLS.H(3299): E2451 Undefined symbol 'Count''错误
会不会是utilcls.h版本低了

...全文
131 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
zwest 2004-12-27
  • 打赏
  • 举报
回复
Ex.OleFunction("function2",para1,para2,para3,para4);
para1,para2,para3,para4 是参数
是不是语句调用参数错了
zwest 2004-12-27
  • 打赏
  • 举报
回复
后来用CB中ATCIVEX直接调用myobj.dll生成.cpp
生成的文件中也有一段提示
//
// The code generated by the TLIBIMP utility or the Import|TypeLibrary
// and Import|ActiveX feature of C++Builder rely on specific versions of
// the header file UTILCLS.H found in the INCLUDE\VCL directory. If an
// older version of the file is detected, you probably need an update/patch.
//
#error "This file requires a newer version of the header UTILCLS.H" \
"You need to apply an update/patch to your copy of C++Builder"
请各位帮忙看看!
zwest 2004-12-27
  • 打赏
  • 举报
回复
好象还是相同的问题
sunliwen780502 2004-12-27
  • 打赏
  • 举报
回复
加头文件:
#include <Comobj.hpp>

13,824

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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