Skip to Content
0

Register free COM .net Component on Powerbuilder 12.5 classic

Mar 01, 2017 at 08:45 AM

142

avatar image

Hi,

I know the subject has been discussed in the past but I tried a lot on things and I can't make it work.

I made a COM Component in VB.net (framework v4)

The component is a visual one like Bruce Armstrong's TiffViewer (it displays images, pdfs and can do other stuff)

I generated the manifest for the dll (also tried without the -nodependency)

mt.exe -managedassemblyname:GEDSigmaControl.dll -nodependency -out:GEDSigmaCOntrol.dll.manifest

The manifest is:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity name="GEDSigmaControl" version="1.0.0.0" processorArchitecture="x86"/>
<clrClass clsid="{0E9B114F-5FF6-354E-AD5D-EA2672DB1E73}" progid="GEDSigmaControl.ComRegistrationException" threadingModel="Both" name="GEDSigmaControl.ComRegistrationException" runtimeVersion="v4.0.30319"/>
<clrClass clsid="{4893BAEC-BB5B-3284-B699-FA06C7D67A26}" progid="GEDSigmaControl.saisie_txt" threadingModel="Both" name="GEDSigmaControl.saisie_txt" runtimeVersion="v4.0.30319"/>
<clrClass clsid="{66AE526C-E877-3E16-A498-5D7D6F0A5F94}" progid="GEDSigmaControl.saisie_txt+ue_valide_texteEventHandler" threadingModel="Both" name="GEDSigmaControl.saisie_txt+ue_valide_texteEventHandler" runtimeVersion="v4.0.30319"/>
<clrClass clsid="{369BBF17-DE65-3C48-92BE-D058D8F485EF}" progid="GEDSigmaControl.saisie_txt+ue_annule_texteEventHandler" threadingModel="Both" name="GEDSigmaControl.saisie_txt+ue_annule_texteEventHandler" runtimeVersion="v4.0.30319"/>
<clrClass clsid="{4242e90c-99d0-40ba-83fd-b79b4ee006ff}" progid="GEDSigmaControl.SigmaImageControl" threadingModel="Both" name="GEDSigmaControl.SigmaImageControl" runtimeVersion="v4.0.30319"/>
<clrClass clsid="{B35F6C46-1FE2-3B9C-90F5-061F1AE57BD0}" progid="GEDSigmaControl.SigmaImageControl+ue_valide_selectionEventHandler" threadingModel="Both" name="GEDSigmaControl.SigmaImageControl+ue_valide_selectionEventHandler" runtimeVersion="v4.0.30319"/>
<clrClass clsid="{E5142B2A-9639-3135-A89D-390FB21AF4A2}" progid="GEDSigmaControl.SigmaImageControl+ue_notification_oleEventHandler" threadingModel="Both" name="GEDSigmaControl.SigmaImageControl+ue_notification_oleEventHandler" runtimeVersion="v4.0.30319"/>
<clrClass clsid="{418AA27D-8F37-3940-A88D-D6F65E00DEC6}" progid="GEDSigmaControl.SigmaImageControl+ue_select_signEventHandler" threadingModel="Both" name="GEDSigmaControl.SigmaImageControl+ue_select_signEventHandler" runtimeVersion="v4.0.30319"/>
<file name="GEDSigmaControl.dll" hashalg="SHA1"/>
</assembly>

I then embeded the manifest in the dll (at least I hope so)

mt.exe -manifest GEDSigmaControl.dll.manifest -outputresource:GEDSigmaControl.dll;#2

I compiled my PB application (tried external and no manfest) (with or without use classic style checked)

I modified the PB app anifest as follows

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
     version="1.0.0.0"
     processorArchitecture="x86"
     name="Sybase.PB"
     type="win32"
 />
<description>PowerBuilder</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
             type="win32"
             name="Microsoft.Windows.Common-Controls"
             version="6.0.0.0"
             processorArchitecture="X86"
             publicKeyToken="6595b64144ccf1df"
             language="*"
         />
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly>
<assemblyIdentity name="GEDSigmaControl" version="1.0.0.0" type="win32"/>
</dependentAssembly>
</dependency>
<!--file name="GEDSigmaControl.dll" hashalg="SHA1">
<comClass clsid="{0E9B114F-5FF6-354E-AD5D-EA2672DB1E73}" progid="GEDSigmaControl.ComRegistrationException" threadingModel="Both" />
<comClass clsid="{4893BAEC-BB5B-3284-B699-FA06C7D67A26}" progid="GEDSigmaControl.saisie_txt" threadingModel="Both" />
<comClass clsid="{66AE526C-E877-3E16-A498-5D7D6F0A5F94}" progid="GEDSigmaControl.saisie_txt+ue_valide_texteEventHandler" threadingModel="Both" />
<comClass clsid="{369BBF17-DE65-3C48-92BE-D058D8F485EF}" progid="GEDSigmaControl.saisie_txt+ue_annule_texteEventHandler" threadingModel="Both" />
<comClass clsid="{4242e90c-99d0-40ba-83fd-b79b4ee006ff}" progid="GEDSigmaControl.SigmaImageControl" threadingModel="Both" />
<comClass clsid="{B35F6C46-1FE2-3B9C-90F5-061F1AE57BD0}" progid="GEDSigmaControl.SigmaImageControl+ue_valide_selectionEventHandler" threadingModel="Both" />
<comClass clsid="{E5142B2A-9639-3135-A89D-390FB21AF4A2}" progid="GEDSigmaControl.SigmaImageControl+ue_notification_oleEventHandler" threadingModel="Both" />
<comClass clsid="{418AA27D-8F37-3940-A88D-D6F65E00DEC6}" progid="GEDSigmaControl.SigmaImageControl+ue_select_signEventHandler" threadingModel="Both" />
</file-->
<ms_asmv3:trustInfo xmlns:ms_asmv3="urn:schemas-microsoft-com:asm.v3">
<ms_asmv3:security xmlns:ms_asmv3="urn:schemas-microsoft-com:asm.v3">
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" uiAccess="false">
</requestedExecutionLevel>
</requestedPrivileges>
</ms_asmv3:security>
</ms_asmv3:trustInfo>
</assembly>

You'll notice I tried with the dependency and file tags.

I copied the dll and it's dependencies inside my application directory.

Registered DLL + Original manifest: PB application Works

Registered DLL + Modified manifest: The component is not found

Unregistered DLL + Modified manifest : The component is not found

Just in case I tried the Fusion Log Viewer I saw mentionned in a archived post.

I see lines for my other .net dll (which is registered) and it's dependencies but I don't see a line for that dll when it's not registered.

We've had problems in the past with customers not re-registering the dll properly in the past and I'd really like to go register free.

I know there a method writing in the HKCU section of the registry but I's like to avoid that one.

Thanks in advance for your help and time.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Rodolfo Reyes Mar 02, 2017 at 06:50 PM
0

Try with this

http://blogs.artinsoft.net/Mrojas/archive/2009/03/03/Calling-NET-from-PowerBuilder.aspx

I have several systems in Power Builder 12.X from which I call DLL's,

Developed in .NET

The first time I can do this, it using the previous tutorial.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thanks for the link but the method implies that the .net dll needs to be regisered (and that I already know how to do)

What I'm looking for is to make the Side by Side Manifest work so the users won't have to install the .net dlls each time I certain make changes to them.

Most of our costumers don't have in house sys admins and can't be bothered to deploy the components correctly.

0