Context menu Shell Extension details needed

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
JoeMi
Junior Member
Junior Member
Posts: 5
Joined: 2005-04-04, 12:46 UTC

Context menu Shell Extension details needed

Post by *JoeMi »

:oops:
Hello!
Please, help me with next issue
I'm writing ContextMenu ShellExtension - Everything works fine, instead of realisation of IObjectWithSite interface. There I try to get an interface of IShellBrowser-type for seamless working at explorer and large group of applications, using common dialogs. For finding this interface from Explorer/CommonDialog I use an instance of IServiceProvider interface - with SID_STopLevelBrowser-key for explorer - and with SID_SCommDlgBrowser-key for common dialogs.
Returned pointer is castable to IShellBrowser-interface. But noone of these SID-keys are not usable for getting same interface for TotalCommander's view. I need just use it for changing current directory - but I have to be sharp sure that I deal with an instance of TotalCommander for changing funtioning mode of context menu shell extension. How may I to do this? I hope, that IUnknown-object being gotten as a parameter of IObjectWithSite.SetSite is enough to solvet his problem.
1. I need to decide - what host have deployed context menu extension (Is it TC?)
2. I need to get an instance of IShellBrowser interface to control current displaying directory/folder form realisation of IObjectWithSite.SetSite call.
Please, help me. Thank you.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Total Commander does not implement IShellBrowser, sorry. Therefore you cannot use this method for changing dirs in Total Commander. The following sample in VC++6.0 will show you what Total Commander calls when showing the context menu:

https://plugins.ghisler.com/addons/samplerightclick.zip
Author of Total Commander
https://www.ghisler.com
JoeMi
Junior Member
Junior Member
Posts: 5
Joined: 2005-04-04, 12:46 UTC

Post by *JoeMi »

Okay, thank you
:? But isn't there any other way to decide, that TC is running this extension? Does viewer implemet IServiceProvider-interface, and if so - it it possible with it to get other COM-interface for TC-view controlling?
TC v6.5 provides correct IDataObject-interface for Shell Extension IShellExtInit.Initialize-call, so, may be assuming about IServiceProvider may help me.
I dont want to analyze hostwindow caption's text - it is possible to be changed again :roll:
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

No, TC doesn't use OLE2 at all for directory browsing of normal directories, just for virtual folders. And therefore it does not implement any of the OLE interfaces either! The IDataObject is implemented by Microsoft when calling the functions in the above-mentioned sample...
Author of Total Commander
https://www.ghisler.com
JoeMi
Junior Member
Junior Member
Posts: 5
Joined: 2005-04-04, 12:46 UTC

Post by *JoeMi »

Okay. But, is it possible to write a plug-in module, allowing to implement an OLE Automation to TC, or even .NET-style managed component for remote (insider) controlling? I just need to know about ShellExtension caller, even if it is TC.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

No, unfortunately a plugin wouldn't help either, because plugins don't have access to file lists, sorry.
Author of Total Commander
https://www.ghisler.com
Post Reply