control on windos server versions crashing

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
EricAriens
User
Posts: 130
Joined: Tue May 03, 2016 1:11 pm

control on windos server versions crashing

Post by EricAriens »

Hi,

I build the full demo and copied to other computers to do some testing.
I can not run the program on Windows Server 2012 or Windows Server 2016.
Do I need to install and or register files?

This is found in the eventlog
Application: FullDemo.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Runtime.InteropServices.COMException
at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(System.Guid ByRef, System.Object, Int32, System.Guid ByRef)
at System.Windows.Forms.AxHost.CreateWithLicense(System.String, System.Guid)
at System.Windows.Forms.AxHost.CreateInstanceCore(System.Guid)
at System.Windows.Forms.AxHost.CreateInstance()
at System.Windows.Forms.AxHost.GetOcxCreate()
at System.Windows.Forms.AxHost.TransitionUpTo(Int32)
at System.Windows.Forms.AxHost.CreateHandle()
at System.Windows.Forms.Control.CreateControl(Boolean)
at System.Windows.Forms.Control.CreateControl(Boolean)
at System.Windows.Forms.AxHost.EndInit()
at FullDemo.MainFrm.InitializeComponent()
at FullDemo.MainFrm..ctor()
at FullDemo.Program.Main()
This is the eventlog on windows server 2012
Application: FullDemo.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Runtime.InteropServices.COMException
Stack:
at System.Windows.Forms.AxHost.CreateInstance()
at System.Windows.Forms.AxHost.GetOcxCreate()
at System.Windows.Forms.AxHost.TransitionUpTo(Int32)
at System.Windows.Forms.AxHost.CreateHandle()
at System.Windows.Forms.Control.CreateControl(Boolean)
at System.Windows.Forms.Control.CreateControl(Boolean)
at System.Windows.Forms.AxHost.EndInit()
at FullDemo.MainFrm.InitializeComponent()
at FullDemo.MainFrm..ctor()
at FullDemo.Program.Main()
Faulting application name: FullDemo.exe, version: 1.0.0.0, time stamp: 0x57553f68
Faulting module name: KERNELBASE.dll, version: 6.3.9600.17055, time stamp: 0x532943a3
Exception code: 0xe0434352
Fault offset: 0x00011d4d
Faulting process id: 0xb98
Faulting application start time: 0x01d1c14f1b8af380
Faulting application path: C:\Users\administrator\Desktop\HyaPDF.v310\Debug\FullDemo.exe
Faulting module path: C:\Windows\SYSTEM32\KERNELBASE.dll
Report Id: 59757d3c-2d42-11e6-80c4-000c2999a521
Faulting package full name:
Faulting package-relative application ID:
Regards
Eric Ariens
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: control on windos server versions crashing

Post by Sasha - Tracker Dev Team »

Hello Eric,

Please read this - maybe you'll figure out how to solve that problem:
https://sdkhelp.pdf-xchange.com/vie ... stribution

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
EricAriens
User
Posts: 130
Joined: Tue May 03, 2016 1:11 pm

Re: control on windos server versions crashing

Post by EricAriens »

Hi,

It helps a bit :)

I registered PDFXEditCore.x64.dll. It registered with no problems.
I copied the content from the bin directory (including the languages directory).

When I try to run the program I get one information and two errors in the windows event viewer.
The first error
Source .NET runtime EventID 1026:
Application: FullDemo.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Runtime.InteropServices.COMException
Stack:
at System.Windows.Forms.AxHost.CreateInstance()
at System.Windows.Forms.AxHost.GetOcxCreate()
at System.Windows.Forms.AxHost.TransitionUpTo(Int32)
at System.Windows.Forms.AxHost.CreateHandle()
at System.Windows.Forms.Control.CreateControl(Boolean)
at System.Windows.Forms.Control.CreateControl(Boolean)
at System.Windows.Forms.AxHost.EndInit()
at FullDemo.MainFrm.InitializeComponent()
at FullDemo.MainFrm..ctor()
at FullDemo.Program.Main()
Error 2 Application errror EventID 1000
Faulting application name: FullDemo.exe, version: 1.0.0.0, time stamp: 0x5761015b
Faulting module name: KERNELBASE.dll, version: 6.3.9600.18007, time stamp: 0x55c4bcfc
Exception code: 0xe0434352
Fault offset: 0x00015b68
Faulting process id: 0xb9c
Faulting application start time: 0x01d1c6ecad0981ab
Faulting application path: C:\Users\administrator\Desktop\New folder (2)\FullDemo.exe
Faulting module path: C:\Windows\SYSTEM32\KERNELBASE.dll
Report Id: ead2a97e-32df-11e6-80d2-000c29390f51
Faulting package full name:
Faulting package-relative application ID:
Information Windows error reporting EventId 1001
Fault bucket , type 0
Event Name: CLR20r3
Response: Not available
Cab Id: 0

Problem signature:
P1: FullDemo.exe
P2: 1.0.0.0
P3: 5761015b
P4: System.Windows.Forms
P5: 4.0.30319.34250
P6: 54d46da6
P7: c2b
P8: 36
P9: PSZQOADHX1U5ZAHBHOHGHLDGIY4QIXHX
P10:

Attached files:

These files may be available here:
C:\Users\administrator\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_FullDemo.exe_d6ccbfe4c97125e54ea4b8d38eb5e593b593ab_626b09bc_f90636ee

Analysis symbol:
Rechecking for solution: 0
Report Id: ead2a97e-32df-11e6-80d2-000c29390f51
Report Status: 2048
Hashed bucket:


If I registered the PDFXEditCore.xxx.dll or not , every time I need to copy the PDFXEdit.dll to the directory containing the exe (or probably copy it to the gac)

Regards
Eric
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: control on windos server versions crashing

Post by Sasha - Tracker Dev Team »

Hello Eric,

1) If you don't want to copy the dll, then the app.manifest should be used when compiling the program:
Image
And after that you should do regsvr32 with the appropriate dll with the same platform as your project.

2) If you want to copy the dll, then the Registration-Free\FullDemo.exe.manifest should be used
Image
Then the regsvr32 is not needed then the appropriate dll an the Resource.dat file is needed in the projects directory.
Also, you can read more about this method in the FullDemo project FullDemo\Registration-Free\Readme.txt

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
EricAriens
User
Posts: 130
Joined: Tue May 03, 2016 1:11 pm

Re: control on windos server versions crashing

Post by EricAriens »

Hi,

I tried to build with the Registratiorn-Free\FullDemo.exe.manifest.
I had some problems.
The Registration-Free directory is empty. I found a FullDemo.exe/manifest in the source directory and did use that.
I still get errors
Activation context generation failed for "C:\Users\administrator\Desktop\Debug\FullDemo.exe". Dependent Assembly PDFXEditCore.x86.X,type="win32",version="1.0.0.0" could not be found. Please use sxstrace.exe for detailed diagnosis.
The ....x86.dll is in the directory.

Regards
Eric
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: control on windos server versions crashing

Post by Sasha - Tracker Dev Team »

What are you want to achieve - copying of the dll or registering of the dll?
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
EricAriens
User
Posts: 130
Joined: Tue May 03, 2016 1:11 pm

Re: control on windos server versions crashing

Post by EricAriens »

Hi,

The main goal is to create an installer that installs our software with the sdk properly installed/registered.

For now I want to test the software i create on another computer. I get errors.
So I tried to install the full demo on another computer.
This I what I did.

Compiled the full demo program (debug, any cpu).
Copied the directory containing the build and copied it to a test computer.
I ran the full demo and I got a message that PDFXEdit.dll is not found.
Copied the dll to the exe directory.
Ran it and got the error in the event viewer (program stopped message box).
Used regsvr32 to register PDFXEditCore.x86.dll. That did not work (x64 os)
Used regsvr32 to register PDFXEditCore.x64.dll. Registered ok
Still have the error in the event viewer.
Tried to build with the register free manifest
Could not find the manifest and used the one in the source directory.
Build the register free version.
Copied the directory (including PDFXEditCore.x86.dll, PDFXEditCore.x64.dll and PDFXEdit.dll)
Ran the program and got a error in the event viewer.

The test computer is an Microsoft Windows Server 2012 R2 Datacenter running on VMWare.
.Net 4.0 installed.

Regards
Eric
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: control on windos server versions crashing

Post by Sasha - Tracker Dev Team »

Hello Eric,

Have you copied the Resouces.dat file with the exe?
Also, building a project with AnyCPU can differ based on your System. Better build it ether x86 or x64.
Also, I will post the Readme.txt file that I mentioned before:
///////////////////////////////////////////////////////////////////////////////////////
// Registration-Free Redistribution
///////////////////////////////////////////////////////////////////////////////////////

Your application installer should locate all application executable files and the require PDF-XChange Editor SDK files in a single common folder along with two additional XML files with prescribed file names as follows:

<YourProgramName>.exe.manifest
PDFXEditCore.x86.X.manifest

Where <YourProgramName> - is the name of the application’s executable file without a file extension.

More detailed information regarding Registration-Free technology can be found here: https://msdn.microsoft.com/en-us/library/ms973913.aspx.

IMPORTANT: in your development environment you will also need to change the settings of your project to use external manifest files as opposed to those built-in by default.

---

To enable the Registration-Free mode for 'FullDemo' sample:

1. Go to project's Properties, select 'Application' tab, in 'Resources' section and choose 'Create application without a manifest' option and re-build application.
Note: on this step the PDFXEditCore.x86.dll should be still installed in the system as regular COM-server.

2. Copy PDFXEditCore.x86.X.manifest and FullDemo.exe.manifest files to <ProjectDir>\bin\x86\<ConfigurationDir>.
Also place the PDFXEditCore.x86.dll and Resources.dat files into this folder too. After that you will be able to start and use the FullDemo.exe even if PDFXEditCore.x86.dll is not installed as COM-server.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
EricAriens
User
Posts: 130
Joined: Tue May 03, 2016 1:11 pm

Re: control on windos server versions crashing

Post by EricAriens »

Hi,

The PDFXEditCore.x86.X.manifest was the missing link in the register-free solution.
That is working now.
Unfortunately the register-free solution is not good enough for our suite.

With some trying registering with regsvr32 and regasm I also got the regular solution working.
I do not know the exact registering anymore so I have get a clean machine to try some more.
I will post when I have the exact register solution. :)

Regards
Eric
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: control on windos server versions crashing

Post by Sasha - Tracker Dev Team »

Hello Eric,

Great news, looking forward for your solution :wink:
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
EricAriens
User
Posts: 130
Joined: Tue May 03, 2016 1:11 pm

Re: control on windos server versions crashing

Post by EricAriens »

Hi,

I did some more testing.

This is what I find:
Resources.dat and PDFXEdit.dll need to be in the exe directory. If not the application will quit and 2 errors will appear in the event log. One application error and one .Net runtime error. The .Net Runtime error will be a FileNotFoundException.
If the PDFXEditCorex86/64.dll is not registered also 2 errors appear in the event viewer. One application error and one .Net Runtime error (System.Runtime.InteropServices.COMException).
If the language directory is not there the language wiil set default to english and can not be changed.

I created a setup project in visual studio with Visual Studio Installer Projects (addon).
I had to add resource.dat and the language directory manually.
Also the PDFXEditCorex86/64.dll was detected as a dependency it was not set for registering. I had to set the Register property to vsdrfCOMSelfReg.

Regards
Eric
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2352
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: control on windos server versions crashing

Post by Vasyl-Tracker Dev Team »

Hi Eric.
Resources.dat and PDFXEdit.dll need to be in the exe directory. If not the application will quit and 2 errors will appear in the event log. One application error and one .Net runtime error. The .Net Runtime error will be a FileNotFoundException.
Sure, its described here:
https://sdkhelp.pdf-xchange.com/vie ... stribution
If the language directory is not there the language wiil set default to english and can not be changed.
Yes, if you want to have multilingual UI for our ActiveX Control - you must also have Languages subfolder inside folder that already contains our PDFXEditCore.x86/x64.dll, surely - with corresponding lang-files.
Also the PDFXEditCorex86/64.dll was detected as a dependency it was not set for registering. I had to set the Register property to vsdrfCOMSelfReg.
Not clear for me, prease explain more what you mean. Definitely, when you using the Free-Registration method for our SDK-components - its not necessary to register PDFXEditCorex86/64.dll globally in the target system (bу regsvr32 or by vsdrfCOMSelfReg). Surely, when you using the Free-Registration then your product will definitely use the local copy of sdk-files, according to specified manifest file. But redundant an unnecessary using (for your case) of regsvr32/vsdrfCOMSelfReg may cause problems for other 3rd-party products that already using our SDK, but trough global ActiveX-registration. In that case your installer may replace already registered (by this 3rd party products) our SDK-components by newest/oldest version..
We always recommend for developers to use Free-Registration method to avoid potential conflicts between different products on the customer's machine. But developer has choice what way is the best for him..

HTH.
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
EricAriens
User
Posts: 130
Joined: Tue May 03, 2016 1:11 pm

Re: control on windos server versions crashing

Post by EricAriens »

Hi,
Quote:
Resources.dat and PDFXEdit.dll need to be in the exe directory. If not the application will quit and 2 errors will appear in the event log. One application error and one .Net runtime error. The .Net Runtime error will be a FileNotFoundException.

Sure, its described here:
https://sdkhelp.pdf-xchange.com/vie ... stribution
It is only described that the Resource.dat should be present. There is no mentioning of the PDFXEdit.dll.
Quote:
Also the PDFXEditCorex86/64.dll was detected as a dependency it was not set for registering. I had to set the Register property to vsdrfCOMSelfReg.

Not clear for me, prease explain more what you mean. Definitely, when you using the Free-Registration method for our SDK-components - its not necessary to register PDFXEditCorex86/64.dll globally in the target system (bу regsvr32 or by vsdrfCOMSelfReg). Surely, when you using the Free-Registration then your product will definitely use the local copy of sdk-files, according to specified manifest file. But redundant an unnecessary using (for your case) of regsvr32/vsdrfCOMSelfReg may cause problems for other 3rd-party products that already using our SDK, but trough global ActiveX-registration. In that case your installer may replace already registered (by this 3rd party products) our SDK-components by newest/oldest version..
We always recommend for developers to use Free-Registration method to avoid potential conflicts between different products on the customer's machine. But developer has choice what way is the best for him..
I do not use the Free-Registration.
I added a setup project to the Full Demo solution.
The setup will tries to automatically detect what dependencies the application has. What dll need to added to the exe to make it run properly. The setup detected that that Full Demo.exe needed PDFXEditCorex86/64.dll. So it added the file to the setup. When installing the Full Demo application it did not register the dll. So in the setup project I had to add the instruction to register PDFXEditCorex86/64.dll by setting the property Register so the dll would be registered when installing Full Demo.

The findings are pure informational. I hope it helps people and saves time when creating a setup 8)

Regards
Eric
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17818
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: control on windos server versions crashing

Post by Tracker Supp-Stefan »

Hi Eric,

Thanks for sharing your findings!
Indeed I hope they will be beneficial to someone else too.

Regards,
Stefan
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2352
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: control on windos server versions crashing

Post by Vasyl-Tracker Dev Team »

It is only described that the Resource.dat should be present. There is no mentioning of the PDFXEdit.dll.
Here is small misunderstanding. Our Editor SDK doesn't contain module with the PDFXEdit.dll name.
It contains only PDFXEditCore.x86.dll and PDFXEditCore.x64.dll...
Perhaps you were talking about these files:
Interop.PDFXEdit.dll
AxInterop.PDFXEdit.dll
?
But these files are automatically generated by C# IDE during building your project(or in moment when you added in your project the Reference to our PDFXEditCore.x86.dll or to PDFXEditCore.x64.dll).
So - we not providing these files in our SDK, no sense for that, because you are always able to generate it on your side as well, as part of your project assembly..
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
EricAriens
User
Posts: 130
Joined: Tue May 03, 2016 1:11 pm

Re: control on windos server versions crashing

Post by EricAriens »

Hi,

Can you please explain why, when I install the SDK a file named PDFXEdit.dll is added in the bin directory (see SDK bin directory.jpg). I did not put it there :lol:
When the file is not present in the exe directory I get an file not found exception (See PDFXEdit file not found.jpg).

Regards
Eric
Attachments
PDFXEdit file not found.zip
(50.09 KiB) Downloaded 126 times
SDK bin directory.zip
(30.29 KiB) Downloaded 138 times
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: control on windos server versions crashing

Post by Sasha - Tracker Dev Team »

Hello Eric,

That's because these dlls are auto generated by C# compiler when you add the Editor's ActiveX COM Component or the Editor's dll to the project references.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2352
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: control on windos server versions crashing

Post by Vasyl-Tracker Dev Team »

Hi Eric.

I just installed Editor SDK on my machine and only these *.dll files are in "Editor SDK" folder and all subfolders:

c:\Program Files (x86)\Tracker Software\Editor SDK\Bin\PDFXEditCore.x64.dll
c:\Program Files (x86)\Tracker Software\Editor SDK\Bin\PDFXEditCore.x86.dll
c:\Program Files (x86)\Tracker Software\Editor SDK\Samples\CSharp\FullDemo\Bin\x86\Release\AxInterop.PDFXEdit.dll
c:\Program Files (x86)\Tracker Software\Editor SDK\Samples\CSharp\FullDemo\Bin\x86\Release\Interop.PDFXEdit.dll

so, Sasha is right, the PDFXEdit.dll is added by your IDE after compiling the sample project.
Also, on your "SDK bin directory.JPG" you may see that date of two generated PDFXEdit.dll/AxPDFXEdit.dll is new completely, not the same as for original files for this sample project.

Cheers.
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Post Reply