PDA

View Full Version : CoCreateInstance failure



wter27
7th February 2011, 14:59
When adding these codes into the project.


QAxWidget *wordActive = new QAxWidget(0,0);
wordActive->setControl(QString::fromUtf8("{00020906-0000-0000-C000-000000000046}"));

First is normal .Then there is the error.I don't know why.I do not have a commercial lisience.So does it matter.And what's the reason called these errors?
CoCreateInstance failure (????????????é¡£)
QAxBase::setControl: requested control {00020906-0000-0000-C000-000000000046} could not be instantiated
By the way .I use the QApplication ,not the QCoreApplication.

franz
7th February 2011, 15:46
License is irrelevant here. Your active x component cannot be loaded and that probably makes it less of a Qt problem. Does the control by the name of "{00020906-0000-0000-C000-000000000046}" exist?

high_flyer
7th February 2011, 15:51
"{00020906-0000-0000-C000-000000000046}"
This UUID doesn't look as a valid UUID.

wter27
7th February 2011, 17:04
License is irrelevant here. Your active x component cannot be loaded and that probably makes it less of a Qt problem. Does the control by the name of "{00020906-0000-0000-C000-000000000046}" exist?

Yeah,I think it exsits.I find the UUID by the visual stido ole view.exe.And when I compile the program .It could run normally at first.After I recompile the project.It came the error.

ChrisW67
8th February 2011, 01:33
That is the UUID for Microsoft Word.

Have you tried using QAxObject instead?

Also, have a look here: http://support.microsoft.com/kb/828550

Maxbester
17th April 2013, 09:57
Is there a way in Qt to catch this error and notify the user?

ChrisW67
17th April 2013, 10:16
Exactly which error, generated by what?
You can check QAxBase::isNull()