CoCPXCControlEx crashes

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: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Post Reply
Luz2021
User
Posts: 3
Joined: Mon Mar 22, 2021 10:21 am

CoCPXCControlEx crashes

Post by Luz2021 »

Hello,
on some of our customers' systems, the program crashes when a virtual printer is to be created with "CoCPXCControlEx".
We are using version 4.0.203.0 and 6.0.320.0
Unfortunately, the error cannot be reliably reproduced.
Do you have any idea what could be the cause here?

Here is a code excerpt for version 4:
function PDFXChangeV4CreateDriver(
aFileName,
aOldPrinter : string;
aCaller: TPDFCaller): string;
var
sTmpPrinterName : string;
begin
Log('PDFXChangeV4CreateDriver');
Log('- aFileName: ' + aFileName);
Log('- aOldPrinter: ' + aOldPrinter);

// save old printer name
if aOldPrinter <> '' then
sOLDPrinterName := aOldPrinter;

// Read the path for saveing the PDF for function result
Result := TPDF.PDFXChangeV4GetSavePath;

// Create a new intance with the name "PDF-XChange 4.0 (R)"
try
Log('- PXCComLib_TLB.CoCPXCControlEx.Create');

moPDFPFactory := PXCComLib_TLB.CoCPXCControlEx.Create;

if not (VarType(PDFPrinter) in [varNull, varEmpty]) then
begin
Log('- free temp. driver, if created before');
VarClear(PDFPrinter);
end;

Log('- create the dirver in registry - start');
sTmpPrinterName := 'PDF-XChange 4.0 (R)';

//--> the next line causes the AV
PDFPrinter :=
moPDFPFactory.
Printer['',
sTmpPrinterName,
'OurKey',
'OurCodeDev'];

//--> the next line never reched, because of the AV above
Log('- create the dirver in registry - done');

except on E:Exception do
begin
//--> this line also never reched, because the AV above. The AV is that heavy.
// The Application crashes hard and disappear out of the taskmanager
Log('- error at creation of driver: '+sTmpPrinterName);
Log('- reason: ' + E.Message);
end;
end;

Log('- PDFPrinter.Name: ' + PDFPrinter.Name);
end;

thanks for your efforts.
User avatar
Paul - Tracker Supp
Site Admin
Posts: 6813
Joined: Wed Mar 25, 2009 10:37 pm
Location: Chemainus, Canada
Contact:

Re: CoCPXCControlEx crashes

Post by Paul - Tracker Supp »

Hi Luz2021,

I really have to apologize that we missed your post.

Is this still an issue for you? Do you still need help with this?
Best regards

Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
Post Reply