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)