Registration-Free Deployment From PowerBuilder Application

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

aitchisj
User
Posts: 47
Joined: Mon Apr 04, 2011 4:44 am

Registration-Free Deployment From PowerBuilder Application

Post by aitchisj »

Hi there,

I'm having difficulty getting registration-free deployment of the ActiveX SDK to work for my PowerBuilder 11 win32 application. When I register the DLL in addition to doing PDFXCview.exe /regserver, all works fine. All works GREAT actually, and I'm loving your software. The problem is that I don't want to have to register the DLL because doing so requires administrative privileges which is an evil I don't want to have to enforce upon my users.

When building my application from PowerBuilder, I've told it to generate an external manifest which I have amended with the dependency information that I copied from your example Client.exe.manifest that came with the SDK-installer. I have run a tool called "sigcheck" which has confirmed to me that there is no internal manifest in the exe that I have generated, therefore there is no conflict with internal/external manifests.

When I run my application and attempt to invoke the ActiveX control, I get an error... "error calling external function..." ... basically something isn't wired together properly with the ActiveX, which to me should boil down to this attempted registry-free deployment.

Here is my application manifest (my_app.exe.manifest):

Code: Select all

 <?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="my_app"
     type="win32"
 />
 <description>my_app</description>
<dependency>
            <dependentAssembly>
                        <assemblyIdentity
                                    type="win32"
                                    name="PDFXCviewAx.X"
                                    version="1.0.0.0" />
            </dependentAssembly>
</dependency>
 <dependency>
     <dependentAssembly>
         <assemblyIdentity
             type="win32"
             name="Microsoft.Windows.Common-Controls"
             version="6.0.0.0"
             processorArchitecture="X86"
             publicKeyToken="6595b64144ccf1df"
             language="*"
         />
     </dependentAssembly>
 </dependency>
 <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>
Also included in the deployment directory are:
my_app.exe
PDFXCviewAx.X.manifest (which I haven't changed, simply copied it from the supplied example)
PDFXCviewAx.dll
PDFXCview.exe
resource.dat

I've tried quite a few different things to get this to work, including an attempt to embed the manifest as an internal manifest within the exe using mt.exe, which hasn't worked. I also tried to run PDFXCview.exe /regserver just in case that step also needed to be done in addition to having a manifest, but this also has not helped.

Is there an obvious step I'm missing here, or an issue with my process that somebody might be able to help me with? I'm attempting to deploy this on 32-bit Windows 7 and so far this is the only OS I've tested with; however, the production application will be run on any OS after and including Windows XP.

Thank you very much,
-John
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: Registration-Free Deployment From PowerBuilder Application

Post by Corwin - Tracker Sup »

Hello John,

It looks like some problem with opening manifest file with your application. Try to use our manifest file (without modifying it) and also make sure that you have disabled "New Visual Style Controls" check box in PowerBuilder build options.
aitchisj
User
Posts: 47
Joined: Mon Apr 04, 2011 4:44 am

Re: Registration-Free Deployment From PowerBuilder Application

Post by aitchisj »

Hi Corwin,

I appreciate your response. I have ensured that the application is not built using "new visual style controls" and also substituted the sample manifest files into my deployment directory without modifying them (but instead renaming my executable to Client.exe), but I'm still getting the same error (Error calling external object function...) when I try to invoke the ActiveX control.

I know for a fact that my external manifest is being read when I launch the application, which I have confirmed by adding/removing this from the Client.exe.manifest:

Code: Select all

<dependency>
     <dependentAssembly>
         <assemblyIdentity
             type="win32"
             name="Microsoft.Windows.Common-Controls"
             version="6.0.0.0"
             processorArchitecture="X86"
             publicKeyToken="6595b64144ccf1df"
             language="*"
         />
     </dependentAssembly>
</dependency>
Note that this section is what is generated by PowerBuilder when I tell it to create an external manifest during the build process. When it's removed, my buttons look squarish, like they would if running under the Windows Classic theme. When I include it, my buttons are rounded and look prettier, for lack of a better description. So, the application manifest is DEFINITELY being read. Something is failing in linking to the ActiveX; however, at this point, it's a complete mystery to me. I have scoured the depths of the internet to try to find something to help me with this, but while I have found references to other people having similar issues, I have not found a solution.

Do you suppose this could be a PowerBuilder-specific problem? Has anyone gotten registry-free deployment to work with a PowerBuilder application? (win32, Windows7 32-bit)

FACTS:
I'm using the manifest files that were included in the registration-free example WITHOUT modifying them, but rather I've renamed my executable to Client.exe.
The manifest for Client.exe is DEFINITELY being read.
There is no embedded internal manifest in my Client.exe
All of the required deployment files are in the same directory
Everything works GREAT if I register the DLL

Any help that anyone can provide is greatly appreciated. I really like this product but this particular problem is really getting in the way!
-John
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: Registration-Free Deployment From PowerBuilder Application

Post by Corwin - Tracker Sup »

Hello John,

Can you send us simple compiled program, so we can reproduce this problem here?

Please zip and remove all license info from your example and ensure all required files to allow us to run are included.
aitchisj
User
Posts: 47
Joined: Mon Apr 04, 2011 4:44 am

Re: Registration-Free Deployment From PowerBuilder Application

Post by aitchisj »

Hi,

I've attached a compiled sample as you have requested. In the sample I've included all of the required runtime files for PowerBuilder (various DLL's). I've also included all of the required distribution files for the ActiveX SDK, but I had to exclude PDFXCView.exe and PDFXCViewAx.dll since the maximum allowed upload size is 5 MiB. The sample also includes the source (xchange-viewer.pbl).

This is what I've noticed:
remove the client.exe.manifest and register the DLL and also do PDFXCview.exe /regserver and the sample application will work.
Unregister the DLL and do PDFXCview.exe /unregserver, but include client.exe.manifest and the sample will not work.
You do not have the required permissions to view the files attached to this post.
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: Registration-Free Deployment From PowerBuilder Application

Post by Corwin - Tracker Sup »

Hello John,

We have tested here and it looks like the problem is in the way a PowerBuilder application works with registration-free activation of COM component. Viewer ActiveX creates successfully, however it doesn't receive any methods that are called on the client side (from Client.exe). In such case all we can recommend - is to write to PowerBuilder technical support.
aitchisj
User
Posts: 47
Joined: Mon Apr 04, 2011 4:44 am

Re: Registration-Free Deployment From PowerBuilder Application

Post by aitchisj »

Thank you for taking the time to look at it, I appreciate that. Nice to know that it's not just me, at least. If I manage to find a solution to this problem I will be sure to leave an update here. The good news is that having to register the DLL isn't necessarily a deal-breaker for us, just an inconvenience.

Thanks again,
John
User avatar
Paul - PDF-XChange
Site Admin
Posts: 7362
Joined: Wed Mar 25, 2009 10:37 pm

Re: Registration-Free Deployment From PowerBuilder Application

Post by Paul - PDF-XChange »

Hi John,

thanks for the feedback and understanding. If you do find a solution do be sure to let us know here on the forum. Inquiring minds want to know...

regards
Best regards

Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com