File system plugin strangeness

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
HenrikHusted
Junior Member
Junior Member
Posts: 39
Joined: 2003-03-24, 10:47 UTC

File system plugin strangeness

Post by *HenrikHusted »

Hi all,
I'm developing a fs plugin but am experiencing some problems.
My FsFindFirst() and FsFindNext() is being called by tcmd and I can see the file list being populated with the correct file names.
When there is no more files my FsFindNext() returns false. Then to my surprise FsFindFirst() is being called once again followed by calls FsFindNext().
Happens every time. Any ideas to why tcmd calls FsFindNext() twice?

.Henrik
User avatar
André Martin
Senior Member
Senior Member
Posts: 245
Joined: 2003-02-05, 15:46 UTC
Location: Dresden, Germany

Post by *André Martin »

I can confirm this behavior when using the debugger but I am not really sure if it also happens when TC & the plugin runs in non debugging mode - hm - very strange anyway...
Browse the web with the HTTP SmartBrowserPlugin
Check your mails with the POP3/SMTP EmailPlugin!
Mighty_Bear
New Member
New Member
Posts: 1
Joined: 2004-01-08, 08:14 UTC
Location: Russia, Rostov-On-Don

Another strangeness in fs_plugin

Post by *Mighty_Bear »

deleted...
Last edited by Mighty_Bear on 2004-01-12, 07:03 UTC, edited 1 time in total.
HenrikHusted
Junior Member
Junior Member
Posts: 39
Joined: 2003-03-24, 10:47 UTC

Post by *HenrikHusted »

If I skip a call to SHBrowseForFolder() and use ILCreateFromPathW() to get my pidl then everything works fine.
Does anyone know what's so special about SHBrowseForFolder()?

.H
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48093
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

When Total Commander loses focus to another task and gets back the focus, it tries to re-read the directory - apparently SHBrowseForFolder() is causing such a task switch...
Author of Total Commander
https://www.ghisler.com
HenrikHusted
Junior Member
Junior Member
Posts: 39
Joined: 2003-03-24, 10:47 UTC

Post by *HenrikHusted »

Ahh... I didn't set tcmd as parent hwnd before calling SHBrowseForFolder() :oops:
Post Reply