Results 1 to 4 of 4

Thread: ActiveQt not calling COM functions

  1. #1
    Join Date
    Jul 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default ActiveQt not calling COM functions

    Hi,
    So I've implemented a shell extension COM object that has a QAxBindable object that creates a QAxAggregated object. It implements IShellExtInit and IContextMenu. I register the extension as a ContextMenuHandler for all files and it works fine on the Desktop. I can see the IShellExtInit and IContextMenu interfaces get queried and see their member functions invoked. However, in the actual Explorer windows it gets loaded and the QAxBindable interface is called to instantiate the QAxAggregated, but then the Initialize member function of IShellExtInit never actually gets invoked like it does when I right click on the desktop. I suppose this is an issue with COM but I have been unable to find a cause for the problem.

    Further, when i set the ThreadingModel in the registry to Apartment, then the context menu will load in whatever window it's first loaded in, but then not at all in any others.

    Any thoughts? I can provide more information, just wondered if anyone had seen anything like this before.

  2. #2
    Join Date
    Jun 2010
    Posts
    9
    Thanks
    1
    Thanked 11 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: ActiveQt not calling COM functions

    Hello,
    As a coincidence, I'm also trying to create a context menu shell extension I based the code on what I did for overlay icons but explorer never shows my menu.
    On the other hand, when I'm opening a file dialog (e.g. "open file dialog" from notepad), I always see my context menu, but never in explorer!

    After adding "ThreadingModel" to my registry, I still did not observe the menu even once in explorer
    After the first time it displays on your machine, is your "ThreadingModel" value kept in the registry or removed?

  3. #3
    Join Date
    Jul 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: ActiveQt not calling COM functions

    Hello, I managed to get the context menu to display everywhere by removing the code within activeqt that checks to make sure the same thread id is invoking the call. It seems to work although it does crash from the constructor of a QLocalSocket but only if it's called for a context menu in a different thread. I'm not sure exactly where to proceed from here.

  4. #4
    Join Date
    Oct 2011
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: ActiveQt not calling COM functions

    Hi,

    I have faced this same problem, as my context menu shows when right clicking files from desktop or from notepad open file dialog but not in actual file explorer. Has someone found solution for this?

Similar Threads

  1. Replies: 5
    Last Post: 17th November 2010, 17:29
  2. Calling GUI functions from a DLL
    By inktomi in forum Qt Programming
    Replies: 0
    Last Post: 19th July 2010, 12:50
  3. class calling other class functions?
    By Hardstyle in forum Newbie
    Replies: 4
    Last Post: 2nd June 2010, 02:38
  4. Problems with ACtiveQT in calling a routine
    By franco.amato in forum Qt Programming
    Replies: 0
    Last Post: 15th April 2010, 01:00
  5. Replies: 7
    Last Post: 15th January 2010, 20:45

Tags for this Thread

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.