Codex API: Archives

QueryArchiveEx

The QueryArchiveEx function returns basic archive information. The QueryArchiveFieldLength function must be called before this function.

 

VOID QueryArchiveEx(
    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
    LPTSTR lpError       // points to archive query error
);

Parameters

lpItems

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

You may pass NULL in this parameter if this field is not required.

lpPwdItems

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

You may pass NULL in this parameter if this field is not required.

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.

You may pass NULL in this parameter if this field is not required.

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.

You may pass NULL in this parameter if this field is not required.

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.

You may pass NULL in this parameter if this field is not required.

lpError

[out] Pointer to the buffer that receives a textual description of the error which occurred while attempting to obtain information about the files contained inside the archive. This error is returned by the plug-in handling the archive.

You may pass NULL in this parameter if this field is not required.

Return Values

This function does not return any values.

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.

Call the QueryArchiveFieldLength function first to obtain the sizes of the buffers you need to allocate. If QueryArchiveFieldLength succeeds, then call the QueryArchiveEx function to obtain the actual archive information into the buffers you have allocated.

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, LoadPlugIns, QueryArchiveFieldLength, COMMATEXT