Codex SDK: Plug-In DLL Functions

GetArchiveInfo

The GetArchiveInfo function opens an archive and returns basic archive information. This is a plug-in defined function.

This function has been superceded by the GetArchiveSizeEx and GetArchiveInfoEx functions starting with Codex 2.1, however plug-ins may choose to continue implementing this function to retain compatibility with Codex 2.0 applications.

 

INT GetArchiveInfo(
    LPCTSTR lpFileName,  // name of file to open
    BOOL bSilent,        // silent operation flag
    LPTSTR lpItems,      // points to file names inside archive
    LPTSTR lpPwdItems,   // points to password protected file names inside archive
    LPTSTR lpDateTimes,  // points to dates and times of files inside archive
    LPTSTR lpSizes,      // points to sizes of files inside archive
    LPTSTR lpCompSizes   // points to compressed sizes of files inside archive
);

Parameters

lpFileName

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

bSilent

[in] Boolean value indicating whether to work in silent mode.

if bSilent is TRUE, you should not prompt the user with any information (such as errors) or requests (such as spanned media disk changes) that may be necessary. The plug-in must decide how to act on all such conditions.

if bSilent is FALSE, you may prompt the user for any and all needs.

pItems

[out] Pointer to the buffer that receives the names of all the files inside the archive.

lpPwdItems

[out] Pointer to the buffer that receives the names of all the password protected files inside the archive.

lpDateTimes

[out] Pointer to the buffer that receives the dates and times of all the files inside the archive.
The dates and times are already formatted as strings with textual date and time information.

lpSizes

[out] Pointer to the buffer that receives the original sizes of all the files inside the archive.
For archive types which cannot support this value, expect a return of 0 for each of the files inside the archive. An example to such archive types might be single-file compressors such as GZIP.

lpCompSizes

[out] Pointer to the buffer that receives the compressed sizes of all the files inside the archive.
For archive types which cannot support this value, expect a return of 0 for each of the files inside the archive. An example to such archive types might be solid compressors such as CAB.

Return Values

If the function succeeds, the return value is the count of items inside the archive.

If the function fails, the return value is -1. The user may call the GetArchiveError function to obtain error details, therefore GetArchiveInfo may need to set internal error level flags if an error occurred.

Remarks

The buffers filled in by this function are formatted as COMMATEXT to facilitate the representation of a collection of items in a single buffer.

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

SDK Overview, Plug-In Features, GetArchiveError, COMMATEXT