Results 1 to 5 of 5

Thread: Using COM(ActiveX?) hangs up

  1. #1
    Join Date
    Jan 2007
    Location
    Augsburg, Germany
    Posts
    75
    Thanks
    4
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Unhappy Using COM(ActiveX?) hangs up

    Hello,

    First of all: The examples of ActiveQt do all do their work

    Now to my problem: I'm trying to access a remote application, which results in a hangup ... maybe someone can tell me why
    The querySubObject() causes the problem ... If disableMetaObject() is set, it does not hang up .. while calling this function inventor takes up 100% cpu

    Qt Code:
    1. CLSID clsid;
    2. ::CLSIDFromProgID(L"Inventor.Application", &clsid);
    3.  
    4. IUnknown* unk = NULL;
    5. if ( SUCCEEDED(::GetActiveObject(clsid, NULL, &unk)) )
    6. {
    7. QAxObject inventor(unk);
    8. QAxObject* pDocuments = inventor.querySubObject("Documents"); // hangs up
    9. if ( pDocuments )
    10. {
    11. //...
    12. }
    13.  
    14. unk->Release();
    15. }
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Using COM(ActiveX?) hangs up

    What if you break and debug? Does it freeze inside Qt code, your code or COM code?

  3. #3
    Join Date
    Jan 2007
    Location
    Augsburg, Germany
    Posts
    75
    Thanks
    4
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Using COM(ActiveX?) hangs up

    not really debugable ... none of the threads stops somewhere meaningful ...

    I found that the calls don't hang up. But each call takes about 20+ seconds!! While that Inventor does not hang up and still works with 100% cpu usage ...

    So how to get the calls do their work faster? I don't need a function list of the object, I know which functions to call ..

  4. #4
    Join Date
    Jan 2007
    Location
    Augsburg, Germany
    Posts
    75
    Thanks
    4
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Using COM(ActiveX?) hangs up

    Ok, after trying:

    with disableMetaObject() and dynamicCall() everything works fast ... but setting this on each object is really annoying

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Using COM(ActiveX?) hangs up

    Are you using debug or release mode?

    How about using QAxBase::queryInterface() to ask for an interface that would return return an interface you might call directly? I don't know if it's possible with the COM server you want, but omitting creation of QAxObject should speed things up.

Similar Threads

  1. Qtopia example execution error(application hangs)
    By devendra in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 17th October 2006, 09:11

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.