Results 1 to 16 of 16

Thread: [howto] making a windows shell extension with qt open-source edition

Hybrid View

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

    Default Re: [howto] making a windows shell extension with qt open-source edition

    Hello,

    Quote Originally Posted by caesarxx View Post
    I manged to build your project and it registers fine.... but somehow doesn't work.
    I added

    "
    QFile file("/tmp/out.txt");
    if (file.open(QIODevice::WriteOnly | QIODevice::Text)) {
    QTextStream out(&file);
    out << "getoverlayinfo " << "\n";
    } else { }
    "

    to almost every function since i didn't know how to debug the dll file proberly.. but out.txt is emty..
    do you have any hints ?
    Your .txt file is created by the DLL or not even at all? You also use the "/tmp/out.txt" path on Windows? Does it work?

    Are you on a 32bits Windows with a 32bits QtCreator and did you restart explorer (restart explorer means either kill the process/launch again, or close session and restart, or reboot)? If not, it may be the cause if the registration works but the DLL doesn't do its job.
    If it's the reason, you can still start a fresh process of a 32bits app (SciTE for example), and go to "File > Open..." see if overlays are present.
    This may not be clear enough in this howto, it should be rewritten with better style.


    Quote Originally Posted by caesarxx View Post
    in your project file you named your icon qtdemo.ico not qtoverlay.ico... ?! i created both..
    qtdemo.ico is a mistake in the .pro file, it should be qtoverlay.ico but it shouldn't prevent the overlays from being displayed.
    Quote Originally Posted by caesarxx View Post
    i used your Class IDs... should be fine for testing ?
    Yes, using the same GUID is OK as both mine and yours are examples on our own machines.


    About debugging, I have not tried that yet with but it's a good idea of a thing to look at. On the general principle, you should attach the debugger to a process that uses the DLL (explorer.exe for example) and put breakpoints in your DLL code.
    Last edited by Tilda; 19th August 2010 at 17:43.

  2. The following user says thank you to Tilda for this useful post:


  3. #2
    Join Date
    Aug 2010
    Posts
    6
    Thanks
    1
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4

    Default Re: [howto] making a windows shell extension with qt open-source edition

    Hi,

    The TextFile isn't created at all.. i tested the code in another simple programm and "/tmp/out.txt" worked there.. ( even with windows.. )

    seems like the dll isn't called at all.... ( or has no rights to access /tmp... who knows :-)


    I tried restarting windows, explorer and i started notepad :-)

    hmm... still have no idea.. maybe a windows 7 issue....

    i try to get a debugger an explorer.exe working..

    Thanks !

  4. The following user says thank you to caesarxx for this useful post:


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

    Default Re: [howto] making a windows shell extension with qt open-source edition

    Is it a 32bits Windows or 64bits?

    I did not try with Windows 7, maybe it requires administrator rights to register the DLL.

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


  7. #4
    Join Date
    Aug 2010
    Posts
    6
    Thanks
    1
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4

    Default Re: [howto] making a windows shell extension with qt open-source edition

    Its 32 bits and i tried registering with a Administrator cmd line and without... maybe i try windows xp first...

    what system do you use ?

  8. The following user says thank you to caesarxx for this useful post:


  9. #5
    Join Date
    Aug 2010
    Posts
    6
    Thanks
    1
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4

    Default Re: [howto] making a windows shell extension with qt open-source edition

    for future reference :

    i did everything a second time on a new windows installation, this time i generated new uuid from http://www.famkruithof.net/uuid/uuidgen
    and now it works !!

    Thanks for your Help and efford writing this tutorial !!!

  10. The following user says thank you to caesarxx for this useful post:


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

    Default Re: [howto] making a windows shell extension with qt open-source edition

    Quote Originally Posted by caesarxx View Post
    for future reference :

    i did everything a second time on a new windows installation, this time i generated new uuid from http://www.famkruithof.net/uuid/uuidgen
    and now it works !!

    Thanks for your Help and efford writing this tutorial !!!
    This is really strange, it can't come from the UUID, but I don't understand what was the problem with your old system

    Thank you too for trying my tutorial
    The tutorial still needs work, some things could be done better (like avoiding MS SDK), or explained better.
    Don't hesitate to point out things that were unclear, you can even write text if you have inspiration, if the whole becomes good enough, we could post it to wiki as a collaborative work.

  12. The following user says thank you to Tilda for this useful post:


  13. #7
    Join Date
    Aug 2010
    Posts
    6
    Thanks
    1
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4

    Default Re: [howto] making a windows shell extension with qt open-source edition

    I think it's quite good ! There are only two things i didn't unterstand at first... ( and this was my first qt project ever ! )

    1. Where is the icon comming from.. the filename nevers shows anywerer exept the resource file...
    2. Where is the tmp folder stuff comming from....

    2.-> i found out why it wasn't working on my first try... i don't know why but if i move my project in any other directory than "c:\qt\2010.04\qt" it doesn't work ! if i qmake the projekt the make files are very different than qmake in e.g. c:\projects\. The makefile creates a tmp folder and other stuff but only if qmake is called in the qt directory....... i still can't find out why it has to be in this directroy.. is it you default dir ? where is this saved ? i looked at every file in your example project...

    very very stange.... i used cmd, not qtcreator...

    i keep you postet if i every find out why... a.. and one other thing...

    If anyone want's to use more than one icon :


    in dllmain.cpp:

    QAXFACTORY_BEGIN(
    "{4c52cc51-89f0-48e0-9678-474e3613d9d7}", /* Type Library ID (TLB) */
    "{5c52cc51-89f0-48e0-9678-474e3613d9d7}" /* Application ID (AppID) */
    )
    QAXCLASS(SOSyncedBinder)
    QAXCLASS(SOUnsyncedBinder)
    QAXFACTORY_END()



    and in your class header file for each binded class:

    class SOSyncedBinder : public QObject, public QAxBindable {

    Q_CLASSINFO("ClassID", "{1955991f-0df0-4563-8a0b-624a227605d6}")
    Q_CLASSINFO("InterfaceID", "{2955991f-0df0-4563-8a0b-624a227605d6}")
    Q_CLASSINFO("EventsID", "{3955991f-0df0-4563-8a0b-624a227605d6}")

  14. The following 2 users say thank you to caesarxx for this useful post:

    Tilda (2nd September 2010)

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

    Thumbs up Re: [howto] making a windows shell extension with qt open-source edition

    Quote Originally Posted by caesarxx View Post
    I think it's quite good ! There are only two things i didn't unterstand at first... ( and this was my first qt project ever ! )

    1. Where is the icon comming from.. the filename nevers shows anywerer exept the resource file...
    2. Where is the tmp folder stuff comming from....

    2.-> i found out why it wasn't working on my first try... i don't know why but if i move my project in any other directory than "c:\qt\2010.04\qt" it doesn't work ! if i qmake the projekt the make files are very different than qmake in e.g. c:\projects\. The makefile creates a tmp folder and other stuff but only if qmake is called in the qt directory....... i still can't find out why it has to be in this directroy.. is it you default dir ? where is this saved ? i looked at every file in your example project...

    very very stange.... i used cmd, not qtcreator...
    It's weird, I did not put my project anywhere under c:\qt\ but in "my documents", and IIRC I did not put absolute path references.

    Quote Originally Posted by caesarxx View Post

    i keep you postet if i every find out why... a.. and one other thing...

    If anyone want's to use more than one icon :


    in dllmain.cpp:

    QAXFACTORY_BEGIN(
    "{4c52cc51-89f0-48e0-9678-474e3613d9d7}", /* Type Library ID (TLB) */
    "{5c52cc51-89f0-48e0-9678-474e3613d9d7}" /* Application ID (AppID) */
    )
    QAXCLASS(SOSyncedBinder)
    QAXCLASS(SOUnsyncedBinder)
    QAXFACTORY_END()



    and in your class header file for each binded class:

    class SOSyncedBinder : public QObject, public QAxBindable {

    Q_CLASSINFO("ClassID", "{1955991f-0df0-4563-8a0b-624a227605d6}")
    Q_CLASSINFO("InterfaceID", "{2955991f-0df0-4563-8a0b-624a227605d6}")
    Q_CLASSINFO("EventsID", "{3955991f-0df0-4563-8a0b-624a227605d6}")
    Thank you for finding how to use multiple extensions in the same DLL!
    And also thanks for the feedback!

  16. The following user says thank you to Tilda for this useful post:


  17. #9
    Join Date
    May 2013
    Posts
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: [howto] making a windows shell extension with qt open-source edition

    Error ? I run on QT 2.6.1 . Can you help me ???Error overlay.png

  18. The following user says thank you to tanbmuit for this useful post:


  19. #10
    Join Date
    May 2013
    Posts
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: [howto] making a windows shell extension with qt open-source edition

    Icon overlay not show in win 64bit ??? help me

  20. #11

    Default Re: [howto] making a windows shell extension with qt open-source edition

    Same here. Cannot make it work on Win7 x64 with Visual Studio 2010 and Qt 4.8.4. Any hints?

Similar Threads

  1. Replies: 1
    Last Post: 8th February 2009, 15:08
  2. OLE with Qt Open Source Edition??
    By Arpan in forum Qt Programming
    Replies: 3
    Last Post: 6th August 2008, 14:00
  3. Open Source on Windows
    By yogeshgokul in forum Installation and Deployment
    Replies: 3
    Last Post: 29th January 2008, 09:54
  4. Qt/Windows Open Source Edition to support VS Express
    By pdolbey in forum Installation and Deployment
    Replies: 3
    Last Post: 23rd September 2007, 14:32
  5. Qtopia 4.2 Open Source edition released!
    By lpotter in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 21st December 2006, 20:45

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.