ArcPackFilesW function

Top  Previous  Next

The function gets called to create an archive or to add files and folders to it.

Syntax C++

int __stdcall ArcPackFilesW(

                _In_ wchar_t *PackedFile,

                _In_ wchar_t *SubPath,

                _In_ wchar_t *SrcPath,

                _In_ wchar_t *AddList,

                _In_ int Flags,

                _In_ __int64 Size,

                _In_ LONG_PTR Session,

                _In_ ArcProcessDataProcW ProcessDataW,

                _In_ LONG_PTR Reserved

);

 

Parameters

PackedFile [in]

Type: wchar_t*

Full path to updated or new archive (0-terminated string).

SubPath [in]

Type: wchar_t*

Subfolder inside archive (0-terminated string). If archiving is happening in the archive root, the parameter is NULL.

Example: if SubPath contains "subdirectoryA1\subdirectoryA2", and AddList contains "subdirB1\subdirB2\file", the file will be saved inside the archive in subfolder: " subdirectoryA1\subdirectoryA2\subdirB1\subdirB2\file" .

SrcPath [in]

Type: wchar_t*

Contains the source folder of all archived files, listed in AddList. Path specified in SrcPath gets added to the path of all files in AddList. Can be NULL.

AddList [in]

Type: wchar_t*

List of all archived files and folders. Each file is a 0-terminated string with the file path. Files follow each other. The last file is appended with additional 0-character. i.e. the list is concluded with two 0 unicode characters.

Flags [in]

Type: int

Bit combination of following flags:

Code

Comments

PK_PACKEX_MOVE_FILES

1

Remove files after archiving

PK_PACKEX_SAVE_PATHS

2

Save file subfolders

PK_PACKEX_ENCRYPT

4

Plugin must request a password and encrypt content of files

PK_PACKEX_ENCRYPTLIST

8

Plugin must request a password and encrypt content of files.

At the moment if the flag is set, flag PK_PACKEX_ENCRYPT is also set. i.e. this is a flag for stronger encryption.

PK_PACKEX_SOLID

16

Create uninterrupted archive. The archiver must analyze contents of all files as a whole one. Sometimes that allows considerably reduce the archive size.

Size [in]

Type: __int64

The total size of archived files. Plugin must use the parameter, e.g. in cases it doesn't support archiving of very large files. It can show warnings calling ArcShowDialogProcW or return error code E_EX_FILE_TOO_BIG.

If Size is less than 0, Size contains minimal common size of files. Probably the size is larger (not all files have been scanned).

Session [in]

Type: LONG_PTR

Session identifier. This value should be passed to ProcessDataW.

ProcessDataW [in]

Type: ArcProcessDataProcW

Feedback function. Informs about execution percentage and allows terminate processing.

Reserved [in]

Type: LONG_PTR

Reserved. Must be 0.

Return value

Type: int

If success returns 0, otherwise – error code.