TProcessDataProc: Difference between revisions
Francoisal (talk | contribs) No edit summary |
Francoisal (talk | contribs) |
||
Line 5: | Line 5: | ||
== Description == | == Description == | ||
SetProcessDataProc has provided you with a pointer to a function with this declaration. When you want to notify the user about the progress when un/packing files, call this function with appropriate parameters. The function itself is part of Totalcmd - you only specify what Totalcmd should display. In addition, Totalcmd displays the Cancel button that allows the user to abort the un/packing process. If the user has clicked on Cancel, the function returns zero. | [[SetProcessDataProc]] has provided you with a pointer to a function with this declaration. When you want to notify the user about the progress when un/packing files, call this function with appropriate parameters. The function itself is part of Totalcmd - you only specify what Totalcmd should display. In addition, Totalcmd displays the Cancel button that allows the user to abort the un/packing process. If the user has clicked on Cancel, the function returns zero. | ||
* ''FileName'' can be used to pass a pointer to the currently processed filename (0 terminated string), or NULL if it is not available. | * ''FileName'' can be used to pass a pointer to the currently processed filename (0 terminated string), or NULL if it is not available. | ||
* Set ''Size'' to the number of bytes processed since the previous call to the function. | * Set ''Size'' to the number of bytes processed since the previous call to the function. |
Revision as of 14:53, 18 April 2006
tProcessDataProc is a typedef of the function that notifies the user about the progress when un/packing files.
typedef int (__stdcall *tProcessDataProc)(char *FileName, int Size);
Description
SetProcessDataProc has provided you with a pointer to a function with this declaration. When you want to notify the user about the progress when un/packing files, call this function with appropriate parameters. The function itself is part of Totalcmd - you only specify what Totalcmd should display. In addition, Totalcmd displays the Cancel button that allows the user to abort the un/packing process. If the user has clicked on Cancel, the function returns zero.
- FileName can be used to pass a pointer to the currently processed filename (0 terminated string), or NULL if it is not available.
- Set Size to the number of bytes processed since the previous call to the function.
Note
The keyword or constant __stdcall must be set according to the compiler that you will use to make the library. For example, this is STDCALL for cygwin and __stdcall for MSC.