1. Brage Mogstad
  2. PowerBuilder
  3. Friday, 15 October 2021 13:22 PM UTC

Hello,
This works on my workstation where PB is installed.
With customers, it does not work (exe+pbd+dll).
Am I missing .dll's in my deployment? 


oleObject PBObject
long ll_result

PBObject = CREATE oleObject

ll_result = PBObject.ConnectToNewObject &
("PowerBuilder.Application")


Regards
Brage Mogstad

Maritech Systems AS

 

Accepted Answer
Brage Mogstad Accepted Answer Pending Moderation
  1. Friday, 15 October 2021 21:16 PM UTC
  2. PowerBuilder
  3. # Permalink

The dll rpcrt4.dll had to be present in the program folder in order for this to work.

https://infocenter-archive.sybase.com/help/index.jsp?topic=/com.sybase.dc37774_1100/html/apptech/CAIBCBBA.htm

 

Regards

Brage

Comment
  1. Armeen Mazda @Appeon
  2. Saturday, 16 October 2021 15:58 PM UTC
Thanks for sharing the solution!
  1. Helpful
There are no comments made yet.
Brage Mogstad Accepted Answer Pending Moderation
  1. Friday, 15 October 2021 19:37 PM UTC
  2. PowerBuilder
  3. # 1

Im just generating a guid. afaik pb do not yet have a function for this.

Im starting to wonder if I might be able to get a guid from the db instead, perhaps thats a better angle..

 

oleObject PBObject
long ll_result

PBObject = CREATE oleObject

ll_result = PBObject.ConnectToNewObject &
("PowerBuilder.Application")
IF ll_result < 0 THEN
// handle the error
ll_result = -1
ELSE
ll_result = PBObject.GenerateGUID(REF as_GUID)
END IF

return ll_result

Comment
  1. Chris Pollach @Appeon
  2. Friday, 15 October 2021 20:22 PM UTC
I thought something like that. The OLE Server feature, Generate GUID(), etc is from a much earlier version of PB. These features were deprecated long ago by Sybase!

Instead GUID's are now generated by SDK calls. For example ...

https://community.appeon.com/index.php/qna/q-a/generating-a-guid
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 15 October 2021 17:24 PM UTC
  2. PowerBuilder
  3. # 2

Hi Brage;

  It's more than just the PB runtime being required. Your App is basically trying to use the connection request as an OLE "server". The CTMO() command requesting the connection to "PowerBuilder.Application" initiates a call to the O/S to lookup in its "registry" that entry. The "PowerBuilder.Application" entry then maps in the registry to another entry which defines to the O/S what to launch (ie: EXE, DLL, etc) plus other runtime parameters.

  So it could be that the registry on your PB IDE machine has these registry mappings. When you deploy, you need to also recreate the same mappings on the deployment machine for the OLE server operation.

  Now depending on exactly what the "PowerBuilder.Application" OLE server is type wise, that can vary. You would have to give us more details on your Apps use of this external resource and details of its operations in order to help further.

Regards ... Chris

 

Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Friday, 15 October 2021 15:18 PM UTC
  2. PowerBuilder
  3. # 3

The PowerBuilder Runtime DLL files are required.

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.