[request]New Feature for the FS-Plugin-SDK

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
Jonas
Senior Member
Senior Member
Posts: 325
Joined: 2003-05-27, 16:59 UTC
Location: Germany
Contact:

[request]New Feature for the FS-Plugin-SDK

Post by *Jonas »

Hi,

It would be realy nice if TC could preserve the DWORD dwReserved1 (dwReserved0 is used by TC for Unix-attributes) from the WIN32_FIND_DATA and pass it in the RemoteInfoStruct back to the plugin. This way pluginwriters would be able to store an integer or a pointer to a struct together with the files.

An Example:
I'm writing an iPod-Plugin. The iPod stores all information about any song in the iTunesDB. If I could store the index of the song together with the fileinformation for TC, I could easily chage these infos on user-request. Else I have to seach the whole DB for the infos I get from the Path (artist, title, album; and because the filename isn't the title but a formated string of Tracknumber anf Title I have to unformat it.) Well, this is very complicated and slow, so I used the filesize to store the ID of the file.

I hope you know what I mean.
What do you think about the solution with dwReserved1?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Hmm, this may be possible, but would probably require major changes to the program in various places. For example, such a number would have to be passed to search, synchronize etc.

Why not build an internal sorted list in FsFindFirst which can then be queried? Should be very fast if the list is sorted by name (insertion sort with binary search), it can then be searched very quickly with binary search. If a name already exists, just append a (2) or so.
Author of Total Commander
https://www.ghisler.com
Post Reply