ProgressProc
ProgressProc is a callback function, which the plugin can call to show copy progress. The address of this callback function is received through the FsInit() function when the plugin is loaded.
 
Declaration:
 
int __stdcall ProgressProc(int PluginNr, char* SourceName, char* TargetName, int PercentDone);
 
Description of parameters:
 
PluginNr Here the plugin needs to pass the plugin number received through the FsInit() function.
 
SourceName Name of the source file being copied. Depending on the direction of the operation (Get, Put), this may be a local file name of a name in the plugin file system.
 
TargetName Name to which the file is copied.
 
PercentDone Percentage of THIS file being copied. Total Commander automatically shows a second percent bar if possible when multiple files are copied.
 
Return value:
 
Total Commander returns 1 if the user wants to abort copying, and 0 if the operation can continue.
 
Important note:
 
You should call this function at least twice in the copy functions FsGetFile(), FsPutFile() and FsRenMovFile(), at the beginning and at the end. If you can't determine the progress, call it with 0% at the beginning and 100% at the end.
 
New in 1.3: During the FsFindFirst/FsFindNext/FsFindClose loop, the plugin may now call the ProgressProc to make a progess dialog appear. This is useful for very slow connections. Don't call ProgressProc for fast connections! The progress dialog will only be shown for normal dir changes, not for compound operations like get/put. The calls to ProgressProc will also be ignored during the first 5 seconds, so the user isn't bothered with a progress dialog on every dir change.