Codex API: Archives


The CheckOutArchive function extracts all files from an archive and creates a program group with shortcuts for files of indicated types.


VOID CheckOutArchive(
    LPCTSTR lpArchive,  // archive to check-out
    LPCTSTR lpPath,     // base output folder
    LPCTSTR lpIcons     // file types to create icons for



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

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.


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

The archive contents will be extracted to the folder <lpPath>\<lpArchive>, using the archive name as a subfolder.


[in] Pointer to a null-terminated string formatted as COMMATEXT indicating which file types to create icons for. Multiple file types can be specified. File types must include the file extension and a leading period. File types are not case-sensitive.

A value of ".exe,.hlp,.chm" (without the quotes) will create icons for all executable and help files in the archive.

Return Values

This function does not return any values.


CheckOutArchive 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. Once extraction is complete, the desired icons are created and CheckOutArchive returns.

Use the InstallArchive function for archives which contain built-in installers.


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, InstallArchive, COMMATEXT