Print Page | Close Window

CoInitialize Error

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=2052
Printed Date: 15 Sep 25 at 9:45PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: CoInitialize Error
Posted By: satenderk
Subject: CoInitialize Error
Date Posted: 22 Nov 11 at 6:12AM
Hi,

I am using quickpdf Active-x with PHP and sometimes I am getting the error like

Uncaught exception 'com_exception' with message 'Failed to create COM object 'QuickPDFAX0718.PDFLibrary':CoInitialize has not been called.' in.

The code I am using  is as follow:

$this->objqp = new COM("QuickPDFAX0718.PDFLibrary"); 
$qpkey = $this->objqp->UnlockKey("*****************"); 

Please told me the appropriate solution for that.



Replies:
Posted By: Ingo
Date Posted: 22 Nov 11 at 7:14AM
Hi!
 
You don't read other posts...?   ;-)
http://www.quickpdf.org/forum/tquickpdfcreate-crash-if-coinitialize-not-called_topic2049.html - http://www.quickpdf.org/forum/tquickpdfcreate-crash-if-coinitialize-not-called_topic2049.html
If you're using Google with this string "CoInitialize has not been called" you'll get the answer immediately:
Call CoInitialize when your program starts and CoUnitialize when it terminates.
It depends on your programming language... in C++ it should be in InitInstance and ExitInstance.
BTW: You should update at least to last 7-version 7.26 or try the newest 8-beta soon where the "CoInitialize-behavior" will be fixed.
Cheers and welcome here,
Ingo
 


Posted By: satenderk
Date Posted: 22 Nov 11 at 7:57AM
Yes I read the previous post ?

But I was not finding any solution for that.

Thank for reply


Posted By: Ingo
Date Posted: 22 Nov 11 at 12:54PM
Hi!
 
So you know what to do.
Use the co-syntax and it will run as you want it.
And up from the newest 8.xx beta you won't have to care about these issues ;-)
 
Cheers, Ingo


Posted By: satenderk
Date Posted: 22 Nov 11 at 12:56PM
Thanks a lot.


Posted By: AndrewC
Date Posted: 08 Dec 11 at 1:07AM
We have added a whole lot of code to the 8.14 beta 1 release that should overcome the the CoInitialize problem.  Beta testers are very welcome.

  http://www.quickpdflibrary.com/blog/2011/12/quick-pdf-library-8-14-beta-1-released/

Andrew.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk