Codex API: Archives


The ExtractArchive function extracts compressed files inside an archive.


VOID ExtractArchive(
    LPCTSTR lpArchive,  // archive to extract
    LPCTSTR lpPath,     // output folder
    LPCTSTR lpFiles,    // files in archive to extract
    LPCTSTR lpProfile   // extraction profile to use



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

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


[in] Pointer to a null-terminated string specifying the output folder for the extracted files. UNC paths are accepted.


[in] Pointer to a null-terminated string formatted as COMMATEXT specifying the list of files inside the archive to be extracted. If the files inside the archive contain path information, lpFiles must also contain corresponding path information.

Wildcards are NOT accepted.


[in] Pointer to a null-terminated string specifying the decompression profile to use. Use the GetExtractionProfilesEx function to obtain a list of available profiles by each archive type.

The indicated profile must exist.

It is recommended that you only use the "Default" profile, which is guaranteed to exist if the archive is decompressible.

Return Values

This function does not return any values.


ExtractArchive invokes the decompression plug-in mapped to the given archive type. The plug-in is responsible for displaying progress and feedback to the user. The plug-in must also handle error conditions. ExtractArchive returns once the invoked plug-in completes processing.


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).
Declared in mCodexAPI.h.
Use mCodexAPI.dll.

See Also

Codex API Overview, Codex API Functions, GetExtractableArchivesEx, GetExtractionProfilesEx, CreateMergedArchive, COMMATEXT