ArcProcessDataProcW function

Top  Previous  Next

The function must be called by the plugin to indicate progress of packing, unpacking, testing, deleting and to allow interruption of these processes.

Plugin should call the function pretty often, to avoid impression of hanging.

Plugin must remember pointer on the function in functions ArcOpenW, ArcPackFilesW, ArcDeleteFilesW.

Syntax C++

typedef int (__stdcall *ArcProcessDataProcW)(

                _In_ LONG_PTR Session,

                _In_ wchar_t *FileName,

                _In_ int Size

);

 

Parameters

Session [in]

Type: LONG_PTR

Session identifier.

FileName [in]

Type: wchar_t*

The name of the processed archive (0-terminated string). Value NULL should be avoided.

Size [in]

Type: int

Usually the parameter specifies the number of bytes, processed since the last call.

If the value is less than 0, the value is percentage provided by the plugin.

Two lower digits in the number (between -1 and -100) define total progress (-1 is 1%, -100 is 100%),

Negative values between -1000 and -1100 define the progress of processing the current file (-1001 is 1%, -1100 is 100%),

Negative values less than -100000 (constant PK_DOUBLEPROGRESS) allow specifying both percentage in a single number using following formula:

PK_DOUBLEPROGRESS – (TotalPercentage + CurrentFilePercantage*1000)

Return value

Type: int

Returns 0 if user interrupted. Otherwise plugin execution should be continued.