Codex API: Archives

ConvertArchive

The ConvertArchive function converts archives from one type to another.

 

VOID ConvertArchive(
    LPCTSTR lpArchive,    // archive to convert
    LPCTSTR lpNewArchive  // new archive name
);

Parameters

lpArchive

[in] Pointer to a null-terminated string that specifies the full path of the archive to convert.

The archive must be supported for decompression. Use the GetExtractableArchivesEx function to obtain a list of archives supported for decompression.

Furthermore, a "Structured" decompression profile must exist for the archive. Use the GetExtractionProfilesEx function to obtain a list of supported decompression profiles for the archive.

lpNewArchive

[in] Pointer to a null-terminated string specifying the full path of the new archive to create.

The archive must be supported for compression. Use the GetCompressibleArchivesEx function to obtain a list of archives supported for compression.

Furthermore, a "Structured" compression profile must exist for the archive. Use the GetCompressionProfilesEx function to obtain a list of supported compression profiles for the archive.

Return Values

This function does not return any values.

Remarks

ConvertArchive first invokes the decompression plug-in mapped to the given archive type and extracts all archive contents to a temporary folder. The plug-in is responsible for displaying progress and feedback to the user. The plug-in must also handle error conditions.

Once extraction is complete, ConvertArchive invokes the compression plug-in mapped to the new archive and recompresses all the extracted files. Again, the compression plug-in displays progress and handles errors.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later.
Windows 95/98/Me:
Requires Windows 98 (or Windows 95 with DCOM 1.2).
Header:
Declared in mCodexAPI.h.
Library:
Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetExtractableArchivesEx, GetExtractionProfilesEx, GetCompressibleArchivesEx, GetCompressionProfilesEx