1. Brian McCarthy
  2. PowerBuilder
  3. Tuesday, 22 October 2024 13:15 PM UTC

I am developing an application using PowerBuilder 2021 that utilizes third-party ActiveX components. Since I have multiple applications that require different versions of these ActiveX controls, I prefer to avoid registering them globally to prevent version conflicts.

I would like to implement registration-free COM activation by embedding a custom manifest file into my PowerBuilder application. However, after researching this topic, I came across the article titled "Using Manifest Files with Applications and Components" on your documentation site. Unfortunately, it doesn't appear to specify how to include a custom manifest file within the application executable for this purpose.

Could you please provide guidance or best practices on how to embed a custom manifest file within the PowerBuilder 2021 environment to achieve registration-free COM activation of ActiveX components that are not globally registered?

Who is viewing this page
Brian McCarthy Accepted Answer Pending Moderation
  1. Tuesday, 22 October 2024 22:29 PM UTC
  2. PowerBuilder
  3. # 1

I read that thread and the referenced site: https://www.manifestmaker.com/sxs/help/pbdotnet.htm

It sounds like there is no accepted way for PowerBuilder to use an embedded manifest that would allow use of registration free active x components. My understanding is that in order to use registration free active x components, the approach would be:

  1. Set the manifest option for "External Manifest" in PowerBuilder. Do not use "No Manifest" or "Embedded Manifest" as both of these options actually embed a default manifest. "External Manifest" is the only option that does not embed a manifest file.
  2. Ensure the registry key for "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide\PreferExternalManifest" has a value of 1 to allow windows to use external manifest files.[edit] - I don't think this is necessary if "External Manifest" is selected in PowerBuilder. Windows will use the [program].exe.manifest file I think if one does not exist embedded in the application without having to set a system wide registry setting.
  3. Create a custom [program].exe.manifest file with the desired registration free active x components defined and ensure this is next to the [program].exe file.

It's my understanding that the way PowerBuilder creates the .exe file, we cannot use a tool like "mt.exe" to update the default manifest that that gets embedded into the exe by PowerBuilder .

I'm very new to PowerBuilder and just started maintaining an existing application so it is definitely possible I misunderstood something, so please let me know if anything I've said sounds incorrect.

Thanks,

brian

Comment
  1. Miguel Leeuwe
  2. Wednesday, 23 October 2024 14:30 PM UTC
I haven't played a lot with embedded and external manifests, other than they gave me problems.

I hope Appeon steps in here.

regards.
  1. Helpful
  1. Bruce Armstrong
  2. Thursday, 24 October 2024 15:03 PM UTC
You understand it correctly. I referred to it in that other thread. PowerBuilder creates a non-standard EXE in that it included additional information after the typical EXE file. None of the tools that embed a manifest into an EXE know about that, and so when they operate on a PowerBuilder EXE they write out the standard part and then truncate the EXE at that point. And then the EXE never works. You *must* use an external manifest. And you must prevent PowerBuilder from adding one to the EXE, because an internal manifest overrides and external one.
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Tuesday, 22 October 2024 14:06 PM UTC
  2. PowerBuilder
  3. # 2
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.