首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > PB >

怎么获得guid

2012-03-25 
如何获得guid?oleObject PBObjectlong ll_resultstring s_guidPBObject CREATE oleObjectll_result PB

如何获得guid?
oleObject PBObject 
long ll_result
string s_guid

PBObject = CREATE oleObject

ll_result = PBObject.ConnectToNewObject("PowerBuilder.Application")
IF ll_result < 0 THEN
messagebox("","连接失败:与PowerBuilder.Application连接出错!")
return
ELSE
ll_result = PBObject.GenerateGUID(s_guid)
END IF

IF ll_result < 0 THEN
messagebox("","生成GUID失败:不能获得GUID!")
return
END IF

s_guid = mid(s_guid,2,len(s_guid) - 2)


网上很多地方有这段代码取guid,pb80,pbvm80.dll ,rpcrt4.dll, pbaen80.tld文件都有
为何还是取不到guid的值?

[解决办法]
ll_result = PBObject.GenerateGUID(ref s_guid)

热点排行