1. yakov werde
  2. PowerBuilder
  3. Thursday, 18 July 2019 19:06 PM UTC

Hello

How to embed ActiveX controls on a window that will be deployed in both both 32 and 64 bit

The painter is 32 bit.  It access the 32 bit Registry section. For OLE objects it displays a list of 32 bit controls for insertion on a form.  It then hard codes the 32 bit binary information at the end of the source in something like this

Start of PowerBuilder Binary Data Section : Do NOT Edit

01w_defaultuser.bin
2B00000a00e011cfd0e11ab1a1000000000000000000000000000000000003003e0009fffe000000060000000000000000000000010000000100000000000010000000000200000001fffffffe0000000000000000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdfffffffefffffffefffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff006f00520074006f004500200074006e00790072000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000050016ffffffffffffffff0000000100000000000000000000000000000000000000000000000000000000c7e9216001d53d9a00000003000001800000000000500003004f0042005800430054005300450052004d0041000000000000000000000000000000000000000000000000000000000000000000000000000000000102001affffffff00000002ffffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000a200000000004200500043004f00530058004f00540041005200450047000000000000000000000000000000000000000000000000000000000000000000000000000000000001001affffffffffffffff000000036bf52a5211d3394ac00053b1a6fa794f00000000c7e9216001d53d9ac7e9216001d53d9a000000000000000000000000006f00430074006e006e00650073007400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001020012ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000000000000000000000000003000000a2000000000000000100000002fffffffe0000000400000005fffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
2Cffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000003000000000800050000000000003ff0000000000003000500000000000000000000000200080000000000010003000b00000003ffff00000000ffff000b000200080000000000320003000b0000000800000000000a00750066006c006c000b0000000b0000000b0000000bffff000bffff0008000000000002000800000000000200080000000000020008000000000002000b00001952000018ce00000000000000000000000000000000000000000000000000000000000000000000000003000000000800050000000000003ff0000000000003000500000000000000000000000200080000000000010003000b00000003ffff00000000ffff000b000200080000000000320003000b0000000800000000000a00750066006c006c000b0000000b0000000b0000000bffff000bffff0008000000000002000800000000000200080000000000020008000000000002000b00001952000018ce000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
11w_defaultuser.bin
End of PowerBuilder Binary Data Section

This bit specific encoding renders the form useless for 64 bit deployment. 

How can 64 applications gain runtime access to a  visual OLE control ?

Thanks

Yakov

yakov werde Accepted Answer Pending Moderation
  1. Monday, 22 July 2019 15:04 PM UTC
  2. PowerBuilder
  3. # 1

Thanks for your response,

This is a .NET MSIL assembly whose classes are invoked via COM InterOp from the GAC,

COM interop has a KEY 

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\

{2D569ACA-A861-4033-BEEA-2123845E1AE4}

Inproc server C:\Windows\system32\mscoree.dll 

Assembly Name  

Class Name

and entries in both 32 & 64 bit COM areas under that key which

64 bit entry points to master entry

32 bit has its own values 

Inproc server C:\Windows\system32\mscoree.dll 

Assembly Name  

Class Name

 

Will this not work with PB 64 bit to .NET visual assemblies?

Comment
  1. yakov werde
  2. Wednesday, 24 July 2019 15:41 PM UTC
I have been tracing this down to find a root cause. Seems like OLE visual control is a .NET WinForm connected to PowerBuilder using the MS Interop Forms Toolkit 2.1 - There are a couple of unusual factors



1) Component Events are NOT integrated into the PB Script Editor when the OLE control is placed on the form



2) I have to declare the component defined events as PB custom user events on a container UserObject which hosts the OLE WinForm. If these events are not declared, the visual control throws runtime exceptions



3) The events are properly invoked in a 32 bit application. But they are NOT invoked in 64 bit application

This is the problem



Question: Is the problem with the InterOp toolkit - where it might not have 64 compatibility, OR is it something on the PB 64 bit implementation where something is not properly exposed?



Anyone with experience in MS Forms InterOp?









  1. Helpful
  1. yakov werde
  2. Wednesday, 24 July 2019 16:18 PM UTC
This video illustrates the issue https://www.screencast.com/t/gmVVmhhD
  1. Helpful
There are no comments made yet.
Brad Mettee Accepted Answer Pending Moderation
  1. Saturday, 20 July 2019 13:37 PM UTC
  2. PowerBuilder
  3. # 2

Are both versions of the control compiled with the same GUID? Are both versions of the control registered at the same time, one in C:\Windows\Syswow64 (32bit), and the other in C:\Windows\System32 (64bit)? Are both OCX files named the same?

At runtime, under 32 or 64bit apps, Windows will read the registry and attempt to load the OCX based on the GUID as requested from the program loading it. If the 32 & 64bit versions differ in ID, it won't be able to find the correct one based on a single GUID.

Comment
There are no comments made yet.
yakov werde Accepted Answer Pending Moderation
  1. Friday, 19 July 2019 19:11 PM UTC
  2. PowerBuilder
  3. # 3

Yes sir. Controls in both bitnesses are installed

Comment
There are no comments made yet.
yakov werde Accepted Answer Pending Moderation
  1. Friday, 19 July 2019 13:01 PM UTC
  2. PowerBuilder
  3. # 4

Yes Sir.  These are home grown components that successfully integrate in the 32 bit deployment world.

 

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 18 July 2019 20:05 PM UTC
  2. PowerBuilder
  3. # 5

Hi Yakov;

  Is the ActiveX control in question available in both 32 & 64 bit?

Regards ... Chris

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.