How do I get IShellBrowser?

This is a discussion on How do I get IShellBrowser? within the C Programming forums, part of the General Programming Boards category; Hi there, I seem to have a problem when trying to capture the IShellBrowser interface of an Explorer Window. Intensive ...

  1. #1
    Registered User
    Join Date
    May 2004
    Posts
    6

    How do I get IShellBrowser?

    Hi there,

    I seem to have a problem when trying to capture the IShellBrowser interface of an Explorer Window. Intensive googling taught me that by sending the "undocumented" message CWM_GETISHELLBROWSER (WM_USER+7) to an explorer window would return a valid IShellBrowser interface. However, what it returns is non-NULL, but not valid, and I cannot get it to work.

    Therefore always ready to try out alternative methods (when earlier attempts fail) I got hold of an IShellFolder interface for the desktop, used that to create an IShellView interface (which is valid!), and hope to use THAT to create an IShellBrowser. However, the last stage seems problematic.

    So, can anyone please help me to get a valid IShellBrowser interface (in C)?

    Thanks for your time and trouble,

    Franchie

  2. #2
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    http://weblogs.asp.net/oldnewthing/a...004/07/20.aspx

    If you like, you can also post how you are using WM_GETISHELLBROWSER. This sort of stuff belongs in the windows forum.

  3. #3
    Registered User
    Join Date
    May 2004
    Posts
    6
    Thanks for your reply...

    Sorry about the wrong forum, I made a stupid mistake.

    As for the way I call CWM_GETISHELLBROWSER:

    Code:
    /*Looking for a target window...*/
    
    HWND Explhwnd = FindWindow("CabinetWClass",NULL);
    if(Explhwnd==NULL) {...}
    iSB = (IShellBrowser*)SendMessage(Explhwnd, CWM_GETISHELLBROWSER ,0,0);
    
    /*Thats all. iSB is now non-NULL, but not valid either.*/
    Thanks again for your help.

    Franchie

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21