Problems with writing FS plugin

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Athari
Junior Member
Junior Member
Posts: 24
Joined: 2004-01-08, 15:12 UTC

Problems with writing FS plugin

Post by *Athari »

FsExtractCustomIcon: What to return in RemoteName parameter if a file where an icon is located contains multiple icons? How these filenames are used?

FsExecuteFile: TC hangs up when some other value than FS_EXEC_OK is returned. It also hangs up when trying to enter archive by pressing Ctrl+PageDown. And does the same if an item like "Browse with ACDSee" is selected from the context menu (I don't know why these itemes are there, anyway).

These hangs up would be OK if it were possible to terminate the process and continue work, but somehow it becomes impossible (Windows does nothing when I try to remove process), so I have to reboot.

TC 6.01
Windows XP 5.1
Excuse me for my bad English, my native language is C++
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48166
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

FsExtractCustomIcon: What to return in RemoteName parameter if a file where an icon is located contains multiple icons? How these filenames are used?
Total Commander does not use this to extract the icon, you have to do this yourself. TC uses the string for a cache only, so if you return the same name twice, only one of the two icons is stored. So to have a unique name, you can for example append the icon number separated with a comma. If you leave the name unchanged, then TC will save the icons separately for each file.
FsExecuteFile: TC hangs up when some other value than FS_EXEC_OK is returned. It also hangs up when trying to enter archive by pressing Ctrl+PageDown. And does the same if an item like "Browse with ACDSee" is selected from the context menu (I don't know why these itemes are there, anyway).
Hmm, I cannot confirm this. Did you return FS_EXEC_SYMLINK ? Then the RemoteName must be set either to a valid local path, or to a valid path within your plugin, preceded by 3 (!) backslashes.
Author of Total Commander
https://www.ghisler.com
User avatar
Athari
Junior Member
Junior Member
Posts: 24
Joined: 2004-01-08, 15:12 UTC

Post by *Athari »

Hmm, I cannot confirm this. Did you return FS_EXEC_SYMLINK ? Then the RemoteName must be set either to a valid local path, or to a valid path within your plugin, preceded by 3 (!) backslashes.
Must the path within plugin include plugin's name? So "\\\PluginName\Dir\File" or just "\\\Dir\File"? I cannot rely on the first, because users can change this name. The second is quite strange, because paths within plugin are usually "\Dir\File"...

Well, I'll try to return different values in a test plugin, maybe this happens because of my plugin itself.
Excuse me for my bad English, my native language is C++
User avatar
Athari
Junior Member
Junior Member
Posts: 24
Joined: 2004-01-08, 15:12 UTC

Post by *Athari »

I've just tested pressing Ctrl+PageDown. TC hangs up regardless of what plugin is used. The same with commands attached to "HKEY_CLASSES_ROOT\Directory\shell" key. All they appear in the context menu of folders within plugins, but pressing them causes TC to hang up.
Excuse me for my bad English, my native language is C++
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48166
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sorry, I confused something - in fact you don't need to put \\\ in front, it should be sufficient to return the internal or external path.
I've just tested pressing Ctrl+PageDown. TC hangs up regardless of what plugin is used.
Ctrl+PageDown on what? On a file within the plugin?
Author of Total Commander
https://www.ghisler.com
User avatar
Athari
Junior Member
Junior Member
Posts: 24
Joined: 2004-01-08, 15:12 UTC

Post by *Athari »

The forum hasn't informed me of the answer, though the link at the bottom states "Stop watching this topic"... Strange.
Ctrl+PageDown on what? On a file within the plugin?
Yes.
Excuse me for my bad English, my native language is C++
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48166
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I will check that, thanks. I guess that TC is trying to resolve a link or look inside an archive, which doesn't work with file system plugins, of course.
Author of Total Commander
https://www.ghisler.com
User avatar
Athari
Junior Member
Junior Member
Posts: 24
Joined: 2004-01-08, 15:12 UTC

Post by *Athari »

If TC were able to work with archives inside FS-plugins, it would be nice. For example, an FS-plugin could be asked if it itself opens an archive or TC is to extract a file and use standard methods.
Excuse me for my bad English, my native language is C++
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48166
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Well, plugin authors could already do this by showing archives as directories instead of files...
Author of Total Commander
https://www.ghisler.com
User avatar
Athari
Junior Member
Junior Member
Posts: 24
Joined: 2004-01-08, 15:12 UTC

Post by *Athari »

But directory can't be executed or extracted (as file).
Excuse me for my bad English, my native language is C++
Post Reply