[WFX] ProgressProc in FsExecuteFile

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
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

[WFX] ProgressProc in FsExecuteFile

Post by *Dalai »

Hi there.

While I was implementing a new feature in one of my plugins, I got stuck.

Question: In which WFX functions does TC show a dialog when the plugin calls ProgressProc? Does it work in FsExecuteFile? For me it doesn't. I can provide a bit of code for context if necessary, but I'll leave that out for now. Despite several calls to ProgressProc per second, TC doesn't show any progress dialog. I tried several different intervals and TC versions, without success. The operation performed in this function might take up to 10 seconds or even longer, and until the call to FsExecuteFile is done, TC is frozen, thus making it unusable (and Windows is replacing it with a ghost window).

I think I've seen the progress window when calling ProgressProc in FsDeleteFile, but that doesn't help for FsExecuteFile...

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [WFX] ProgressProc in FsExecuteFile

Post by *ghisler(Author) »

No, ProgressProc only shows a progress for operations which also show a progress in Total Commander itself: Copy, Move, Delete.

If execute takes that long, consider starting a background thread returning immediately from the function.
Author of Total Commander
https://www.ghisler.com
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: [WFX] ProgressProc in FsExecuteFile

Post by *Dalai »

Thank you for your response!
ghisler(Author) wrote: 2022-05-22, 08:24 UTCNo, ProgressProc only shows a progress for operations which also show a progress in Total Commander itself: Copy, Move, Delete.
Yes, that's what I concluded from what I was seeing.
If execute takes that long, consider starting a background thread returning immediately from the function.
It's less about the execution time. My intention was to show a progress to the user at what exactly is happening (including a way to cancel the operation) without having to implement my own dialog. But that's out of the question now, which is unfortunate. I guess I have to figure out another way of least amount of work for me ;).

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Post Reply