[][src]Type Definition wcxhead::tProcessDataProc

type tProcessDataProc = extern "stdcall" fn(FileName: *mut char, Size: c_int) -> c_int;

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. For plugins which unpack in CloseArchive: Set size to negative percent value (-1..-100) to directly set first percent bar, -1000..-1100 for second percent bar (-1000=0%).

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.