PB OLE對象PowerBuilder.Application

dgzys0769 2013-01-08 03:49:34
PB11.5版本
PBObject = CREATE oleObject
ll_result = PBObject.ConnectToNewObject("PowerBuilder.Application")
ll_result结果是-2,需要什么DLL呢
...全文
1104 13 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
A啦Dbit 2013-01-10
  • 打赏
  • 举报
回复
oleobject PBObject
int ll_result
PBObject = CREATE oleObject
ll_result = PBObject.ConnectToNewObject("PowerBuilder.Application")

messagebox('',ll_result) //咱电脑上返回0
destroy pbobject



dgzys0769 2013-01-10
  • 打赏
  • 举报
回复
引用 7 楼 zlf19810306 的回复:
用windows API CoCreateGuid
因为发现PB有自带的OLE,所以不想用太多的DLL,才不考虑Windows API的
pb8 2013-01-10
  • 打赏
  • 举报
回复
引用 12 楼 dgzys0769 的回复:
引用 10 楼 pb8 的回复:除了复制dll,还需要导入pbdwr90.reg文件,文件中的路径部分要换成你的实际路径 都需要哪个dll呢 pbapl115.dll,我有 pbdwr90.reg 如果是11.5,是换成pbdwr115.reg吗?
dll最好复制全一些,发布后也可以用procmon之类的工具检测一下看需要的dll,另pbdwr**.reg中**是需要换民具体版本的,在你的sybase\shared\powerbuilder下有
dgzys0769 2013-01-10
  • 打赏
  • 举报
回复
引用 10 楼 pb8 的回复:
除了复制dll,还需要导入pbdwr90.reg文件,文件中的路径部分要换成你的实际路径
都需要哪个dll呢 pbapl115.dll,我有 pbdwr90.reg 如果是11.5,是换成pbdwr115.reg吗?
dgzys0769 2013-01-10
  • 打赏
  • 举报
回复
引用 9 楼 xiajinxian 的回复:
oleobject PBObject int ll_result PBObject = CREATE oleObject ll_result = PBObject.ConnectToNewObject("PowerBuilder.Application") messagebox('',ll_result) //咱电脑上返回0 destroy pbobject……
你那个是开发环境哦
pb8 2013-01-10
  • 打赏
  • 举报
回复
除了复制dll,还需要导入pbdwr90.reg文件,文件中的路径部分要换成你的实际路径
zlf19810306 2013-01-09
  • 打赏
  • 举报
回复
在PB9里这种用法是 automation server 用Using PowerBuilder as an automation server automation server 在11.5里已经没有了
zlf19810306 2013-01-09
  • 打赏
  • 举报
回复
用windows API CoCreateGuid
dgzys0769 2013-01-09
  • 打赏
  • 举报
回复
引用 3 楼 lzp_lrp 的回复:
系统中没有 PowerBuilder.Application 这个类
请问需要什么样的组件?
dgzys0769 2013-01-09
  • 打赏
  • 举报
回复
引用 4 楼 zlf19810306 的回复:
在PB9里这种用法是 automation server 用Using PowerBuilder as an automation server automation server 在11.5里已经没有了
11.5已经不能用了吗 看到说需要DLL及其他文件的都是低版本的 我是想用PBObject.GenerateGUID(REF GUID) 这个函数的,虽然现在直接通过数据库newid()取到了,但是在没有连接数据库的程序就没办法用了
WorldMobile 2013-01-08
  • 打赏
  • 举报
回复
系统中没有 PowerBuilder.Application 这个类
WorldMobile 2013-01-08
  • 打赏
  • 举报
回复
返回值是-2,意思是类名不对 -2 Class name not found Syntax oleobject.ConnectToNewObject ( classname ) Argument Description oleobject The name of an OLEObject variable that you want to connect to an automation server or COM object. You cannot specify an OLEObject that is the Object property of an OLE control. classname A string whose value is a programmatic identifier or class ID that identifies an automation server or COM server. Return value Integer. Returns 0 if it succeeds and one of the following negative values if an error occurs: -1 Invalid Call: the argument is the Object property of a control -2 Class name not found -3 Object could not be created -4 Could not connect to object -9 Other error -15 COM+ is not loaded on this computer -16 Invalid Call: this function not applicable If any argument's value is null, ConnectToNewObject returns null.
A啦Dbit 2013-01-08
  • 打赏
  • 举报
回复
这是什么东东,,有这样用的?

1,108

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 相关问题讨论
社区管理员
  • 基础类社区
  • WorldMobile
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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