Results 1 to 7 of 7

Thread: CoCreateInstance failure

  1. #1
    Join Date
    Jan 2011
    Posts
    40
    Thanks
    5
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default CoCreateInstance failure

    When adding these codes into the project.
    Qt Code:
    1. QAxWidget *wordActive = new QAxWidget(0,0);
    2. wordActive->setControl(QString::fromUtf8("{00020906-0000-0000-C000-000000000046}"));
    To copy to clipboard, switch view to plain text mode 
    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.

  2. #2
    Join Date
    Jul 2009
    Location
    Enschede, Netherlands
    Posts
    462
    Thanked 69 Times in 67 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: CoCreateInstance failure

    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?
    Horse sense is the thing that keeps horses from betting on people. --W.C. Fields

    Ask Smart Questions

  3. #3
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: CoCreateInstance failure

    "{00020906-0000-0000-C000-000000000046}"
    This UUID doesn't look as a valid UUID.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  4. #4
    Join Date
    Jan 2011
    Posts
    40
    Thanks
    5
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: CoCreateInstance failure

    Quote Originally Posted by franz View Post
    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.

  5. #5
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: CoCreateInstance failure

    That is the UUID for Microsoft Word.

    Have you tried using QAxObject instead?

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

  6. The following user says thank you to ChrisW67 for this useful post:

    wter27 (10th February 2011)

  7. #6
    Join Date
    Jan 2013
    Posts
    6
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: CoCreateInstance failure

    Is there a way in Qt to catch this error and notify the user?

  8. #7
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: CoCreateInstance failure

    Exactly which error, generated by what?
    You can check QAxBase::isNull()

Similar Threads

  1. Qt Creator Debugger failure
    By Carlton in forum Qt Tools
    Replies: 3
    Last Post: 23rd November 2010, 20:58
  2. QProcess start() failure
    By jacek_ in forum Qt Programming
    Replies: 3
    Last Post: 26th November 2009, 13:04
  3. Failure to build qt 4.5.1
    By doggrant in forum Qt Programming
    Replies: 1
    Last Post: 24th June 2009, 15:47
  4. DLL Failure on Winblows
    By ComaWhite in forum Qt Programming
    Replies: 1
    Last Post: 7th September 2008, 16:07
  5. QWT assert failure
    By Andimat in forum Qwt
    Replies: 1
    Last Post: 21st June 2007, 14:36

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.