Can't Create Instance of the Driver

PDF-XChange Drivers API (only) V4/V5
This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-XChange Printer Drivers SDK (only) - VERSION 4 & 5 - Please use the PDF-Tools SDK Forum for Library DLL assistance.

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

jeffp
User
Posts: 923
Joined: Wed Sep 30, 2009 6:53 pm

Can't Create Instance of the Driver

Post by jeffp »

I have a client on whose machine I can't get our code to create a valid instance of your CPXCControlEx class/interface.

My application is written Delphi and crashes on the following line of code

FPDFInstance := CoCPXCControlEx.Create;

I'm using the lastest driver 5.5.311.

I can print to the driver from an app like Word no problem (but with watermarks). So it seems the driver is installed and working. I just can't get my code to create the object.

I have a lot of users out there using the same software with virtually no driver issues. So this one is a head scratcher.

Any thoughts?

--Jeff
User avatar
Paul - PDF-XChange
Site Admin
Posts: 7361
Joined: Wed Mar 25, 2009 10:37 pm

Re: Can't Create Instance of the Driver

Post by Paul - PDF-XChange »

Hi Jeff,

you should have recently received a new serial key for your SDK. I just emailed it to you again. First thing I'd be doing is ensuring you are using this latest key. It is good from build 309 of the SDK to current.

hth
Best regards

Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
jeffp
User
Posts: 923
Joined: Wed Sep 30, 2009 6:53 pm

Re: Can't Create Instance of the Driver

Post by jeffp »

But the call to

FPDFInstance := CoCPXCControlEx.Create;

Comes before I would call the Printer procedure that asks for the code.
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3586
Joined: Thu Jul 08, 2004 10:36 pm

Re: Can't Create Instance of the Driver

Post by Ivan - Tracker Software »

Can you please run:
pdfSaver5.exe /RegServer
in the folder where driver is installed? By default, it is C:\Program Files\Tracker Software\PDF-XChange 5

It should be launched with Administrative privileges.

HTH
PDF-XChange Co Ltd. (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
jeffp
User
Posts: 923
Joined: Wed Sep 30, 2009 6:53 pm

Re: Can't Create Instance of the Driver

Post by jeffp »

Just tried this but it didn't work. Still crashing in the same spot.

Where in the registry can I look to ensure that this got registered.

Also, currently I install the driver within my own installation. In doing so I am firing you PDFX5SA-sm.exe file with params indicated in your sdk help.

Do I also need to run /RegServer on the pdfSaver5.exe as well or do you already do that when I run your install packet above?

--Jeff
User avatar
Will - Tracker Supp
Site Admin
Posts: 6815
Joined: Mon Oct 15, 2012 9:21 pm

Re: Can't Create Instance of the Driver

Post by Will - Tracker Supp »

Hi Jeff,

Thanks for the post - Ivan has asked if you would be amenable to a remote session. If so, please take a look at the following KB article and email support@pdf-xchange.com with your TeamViewer info., the signed indemnity form and a time & day that works best for you.

Cheers,
If posting files to this forum, you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded.
Thank you.

Best regards

Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
jeffp
User
Posts: 923
Joined: Wed Sep 30, 2009 6:53 pm

Re: Can't Create Instance of the Driver

Post by jeffp »

We've been able to replicate this on one of our office computers. But the person whose computer this is out sick so I'll get back to you when he is back in the office.

What KB article are you referring to. I didn't see anything on the last post.

--Jeff
User avatar
Will - Tracker Supp
Site Admin
Posts: 6815
Joined: Mon Oct 15, 2012 9:21 pm

Re: Can't Create Instance of the Driver

Post by Will - Tracker Supp »

My apologies Jeff, I missed the link!
https://www.pdf-xchange.com/knowledgebase/357

No worries, let us know if/when you're ready :)
If posting files to this forum, you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded.
Thank you.

Best regards

Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
jeffp
User
Posts: 923
Joined: Wed Sep 30, 2009 6:53 pm

Re: Can't Create Instance of the Driver

Post by jeffp »

Looks like we won't be able to do a remote session until Monday since my employee is out sick until Monday.

In the meantime, can you tell me the register items I can check to see if the COM object got registered.

Also, what's the name of the ActiveX object. For example, I can do in Delphi CreateOLEObject(Excel.Application). What's the namespace for your object.

--Jeff
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3586
Joined: Thu Jul 08, 2004 10:36 pm

Re: Can't Create Instance of the Driver

Post by Ivan - Tracker Software »

In the meantime, can you tell me the register items I can check to see if the COM object got registered.
HKEY_CLASSES_ROOT\CLSID\{24DFB749-780D-41B4-9BE3-8894D202B944}
there should be valid "LocalServer32" key with path to pdfSaver5.exe in its (Default) value,
and TypeLib key should be {0A8E6A2C-43A6-48FE-953C-4668DC9F0352}

HKEY_CLASSES_ROOT\TypeLib\{0A8E6A2C-43A6-48FE-953C-4668DC9F0352}\1.0\
for x64 system should have both "0\win32" and "0\win64" keys with valid path for .tlb and .exe files.

HKEY_CLASSES_ROOT\PXCComLib5.CPXCControlEx
with CLSID key with value "{24DFB749-780D-41B4-9BE3-8894D202B944}"

HKEY_CLASSES_ROOT\PXCComLib5.CPXCControlEx.1
with CLSID key with value "{24DFB749-780D-41B4-9BE3-8894D202B944}"

there also should be the following entries:
HKEY_CLASSES_ROOT\Interface\{73D6873C-BD16-49E6-A160-81D847A24DF7}
HKEY_CLASSES_ROOT\Interface\{127EDB28-902F-4487-AC32-3EF045C7AB9F}

For 64-bit OS, there should be corresponding entries in 32-bit part of the registry as well.
Also, what's the name of the ActiveX object. For example, I can do in Delphi CreateOLEObject(Excel.Application). What's the namespace for your object.
Full name of our COM object is PXCComLib5.CPXCControlEx, but it is not an OLE control, and cannot be created using CreateOLEObject.
PDF-XChange Co Ltd. (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
jeffp
User
Posts: 923
Joined: Wed Sep 30, 2009 6:53 pm

Re: Can't Create Instance of the Driver

Post by jeffp »

Ok. Sorry it took so long to get back to you.

The registry entries look fine, but it still won't work on one of our machines. We are calling the driver from a 32bit app if that helps.

Here is the name and phone number of the person in our office whose machine this is one. You can call him anytime to remote in.

Jim Garrison
801-722-7085
jeffp
User
Posts: 923
Joined: Wed Sep 30, 2009 6:53 pm

Re: Can't Create Instance of the Driver

Post by jeffp »

Can you email me the PXCComLib5_TLB.pas file you used in the sample Delphi project.

I think I may be using the one from the prior version.
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3586
Joined: Thu Jul 08, 2004 10:36 pm

Re: Can't Create Instance of the Driver

Post by Ivan - Tracker Software »

I cannot find it on my machine right now, will take a look on a build machine.
anyway, I believe that file is generated by Delphi environment automatically when you add a typelibrary to your project. Can you just try to add the "PDF-XChange Printer 2012 Type Library" to your project and see if system generates that file?
PDF-XChange Co Ltd. (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
jeffp
User
Posts: 923
Joined: Wed Sep 30, 2009 6:53 pm

Re: Can't Create Instance of the Driver

Post by jeffp »

Ok. I regenerated it.

Looks like that was the issue. My bad. I forgot to regenerate the TLB file when we switched from 4.0 to 5.0.

Thanks for your help.
User avatar
Will - Tracker Supp
Site Admin
Posts: 6815
Joined: Mon Oct 15, 2012 9:21 pm

Re: Can't Create Instance of the Driver

Post by Will - Tracker Supp »

:D
If posting files to this forum, you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded.
Thank you.

Best regards

Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
jeffp
User
Posts: 923
Joined: Wed Sep 30, 2009 6:53 pm

Re: Can't Create Instance of the Driver

Post by jeffp »

Ok. I now have a somewhat related issue. Now that I'm using the right TLB file things are much better.

But I have a client that is getting an exception in the following location.

FPDFInstance := CoCPXCControlEx.Create; //Creates the object fine
FPDFInstance.RemoveOrphanPrinters('', FInitPrinterName); //This is fine
ADisp := FPDFInstance.Printer('', FInitPrinterName, FRegKey, FDevCode); //EXCEPTION HERE

I have hundreds of users and this is the first one where this exception has occurred.

Do you have a small test exe I can put on my user's machine to test if it is specific to my code or not?

Any thoughts? Again, I'm using Delphi.

--Jeff
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3586
Joined: Thu Jul 08, 2004 10:36 pm

Re: Can't Create Instance of the Driver

Post by Ivan - Tracker Software »

You can use any example (C++, Delphi, etc.) from our Driver API installation.
PDF-XChange Co Ltd. (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
jeffp
User
Posts: 923
Joined: Wed Sep 30, 2009 6:53 pm

Re: Can't Create Instance of the Driver

Post by jeffp »

Ok. But any ideas why it would crash with the Printer() call?
User avatar
John - Tracker Supp
Site Admin
Posts: 5223
Joined: Tue Jun 29, 2004 10:34 am

Re: Can't Create Instance of the Driver

Post by John - Tracker Supp »

I am sorry Jeff we don't - it would be like chasing a needle in a haystack as we have no insight into your app, the users system or indeed how they are using the combination - without further information we are somewhat impotent.
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com
jeffp
User
Posts: 923
Joined: Wed Sep 30, 2009 6:53 pm

Re: Can't Create Instance of the Driver

Post by jeffp »

Ok. I had my customer run the Delphi_DriverAPI.exe on his machine.

His response is below. Does it tell you anything?
Hi Jeff,
I have done tried the driver test app.
The pdfs were created successfully from the three tabs:

However, an exception was fired when I used the Print doc file Tab.
I have copied the exception and copied the detailed information and pasted it below.
Many thanks,
Ian.

Detailed technical information follows:
---
(Inner Exception)
Date and Time: 26/02/2015 11:30:37
Machine Name: IAN-XPS
IP Address: fe80::6559:3002:39ff:6e3e%3
Current User: IAN-XPS\IanJohn

Application Domain: C:\Program Files (x86)\WinZip Courier\
Assembly Codebase: file:///C:/Program Files (x86)/WinZip Courier/WZOffice.DLL
Assembly Full Name: WZOffice, Version=4.5.0.0, Culture=neutral, PublicKeyToken=3935833c83097ae3
Assembly Version: 4.5.0.0

Exception Source: WZOffice
Exception Type: System.NullReferenceException
Exception Message: Object reference not set to an instance of an object.
Exception Target Site: AddinModule_AddinFinalize

---- Stack Trace ----
WinZipAddin.Office.AddinModule.AddinModule_AddinFinalize(sender As Object, e As EventArgs)
WZOffice.DLL: N 0008 (0x8) IL
AddinExpress.MSO.ADXAddinModule.Extensibility.IDTExtensibility2.OnDisconnection(disconnectMode As ext_DisconnectMode, custom As Array&)
WZOffice.DLL: N 1599 (0x63F) IL



(Outer Exception)
Date and Time: 26/02/2015 11:30:37
Machine Name: IAN-XPS
IP Address: fe80::6559:3002:39ff:6e3e%3
Current User: IAN-XPS\IanJohn

Application Domain: C:\Program Files (x86)\WinZip Courier\
Assembly Codebase: file:///C:/Program Files (x86)/WinZip Courier/AddinExpress.MSO.2005.DLL
Assembly Full Name: AddinExpress.MSO.2005, Version=7.1.4050.2005, Culture=neutral, PublicKeyToken=4416dd98f0861965
Assembly Version: 7.1.4050.2005

Exception Source:
Exception Type: AddinExpress.MSO.ADXExternalException
Exception Message: An error has occurred in the code of the add-in.
Exception Target Site: Object reference not set to an instance of an object.

---- Stack Trace ----
jeffp
User
Posts: 923
Joined: Wed Sep 30, 2009 6:53 pm

Re: Can't Create Instance of the Driver

Post by jeffp »

Just checking in to see if you've seem my last post with the debug info.
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3586
Joined: Thu Jul 08, 2004 10:36 pm

Re: Can't Create Instance of the Driver

Post by Ivan - Tracker Software »

Yes, we saw this log but it does not help. It is log from WinZip not from PDF-XChange driver.

Can you please ask your customer to extract the file from attached archive and place it into the folder where pdfSaver5.exe has been installed?
Just in case, if he has multiply copies of pdfSaver5.exe, please ask to place this file into all locations.
Please let us know if that helps.
You do not have the required permissions to view the files attached to this post.
PDF-XChange Co Ltd. (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.