User login

Who's online

There are currently 3 users and 137 guests online.

Online users

Advertisements


SourceForge.net Logo

Interop.PDFCreator.dll (0.9.5) incompatible with PDFCreator 0.9.3

Submitted by mrupp on Thu, 2008-04-03 14:22.

Now I have the following situation:
In our C# application, we used PDFCreator 0.9.3 and its COM interface to convert doc2pdf. But now, PDFCreator 0.9.5 is out and, having installed that, our app crashes at the following location of the constructor of my class:

public iPDFCreator()
{
m_pErr = new PDFCreator.clsPDFCreatorError();

m_pdfCreator = new PDFCreator.clsPDFCreator();
m_pdfCreator.eError += new PDFCreator.__clsPDFCreator_eErrorEventHandler(m_pdfCreator_eError);
m_pdfCreator.eReady += new PDFCreator.__clsPDFCreator_eReadyEventHandler(m_pdfCreator_eReady);

string parameters = "/NoProcessingAtStartup";
if (!m_pdfCreator.cStart(parameters, false))
{
m_pdfCreator.cClose();
}
}

Here's the exception that is thrown:

Schnittstelle nicht unterstützt
Exception Type = System.InvalidCastException
Source = mscorlib

Stack-Trace
===========
at System.Runtime.InteropServices.UCOMIConnectionPointContainer.FindConnectionPoint(Guid& riid, UCOMIConnectionPoint& ppCP)
at PDFCreator.__clsPDFCreator_EventProvider.Init()
at PDFCreator.__clsPDFCreator_EventProvider.add_eError(__clsPDFCreator_eErrorEventHandler )
at PDFCreator.clsPDFCreatorClass.add_eError(__clsPDFCreator_eErrorEventHandler )
at PrimaLib.IARLib.iPDFCreator..ctor() in ...

Submitted by mrupp on Thu, 2008-04-03 14:24.

Now I thought: Alright, the Interop.PDFCreator.dll generated with 0.9.3 might not be compatible with 0.9.5, so I did generate a new Interop.PDFCreator.dll using PDFCreator 0.9.5, compiled my app freshly and everything went smoothly. But trying to run my app now on a machine having PDFCreator 0.9.3 installed let it crash again and as I debugged some more, it crashed at the very same location with the same exception. It turned out, that the whole thing only works if the versions match and the app was compiled using the right version of Interop.PDFCreator.dll. Without compiling it just hanged himself at the statement
m_pdfCreator.cClose();

Now this is a bit serious as most of our customers now have 0.9.3 installed and we cannot just force them to use 0.9.5 and a newly compiled version of our app would hang or crash if they still used 0.9.3

So I guess something in the COM-interface must have changed, not beeing downwards compatible, which is (afaik) someone programming a COM-interface mustn't do.

Any suggestions to this problem would be very very welcome.

PS: But still, PDFCreator is great!

© 2006 by pdfforge.org :: Contact us

Validate XHTML or CSS.