### RAROpenArchiveData structure

    struct RAROpenArchiveData
    {
      char *ArcName;
      UINT OpenMode;
      UINT OpenResult;
      char *CmtBuf;
      UINT CmtBufSize;
      UINT CmtSize;
      UINT CmtState;
    };

### Description

This structure is used by RAROpenArchive function.

### Structure fields

- ArcName

  > Input parameter which should point to zero terminated string containing the archive name.

- OpenMode

  > Input parameter.

  > Possible values

  > - RAR_OM_LIST

  >   Open archive for reading file headers only.

  > - RAR_OM_EXTRACT

  >   Open archive for testing and extracting files.

  > - RAR_OM_LIST_INCSPLIT

  >   Open archive for reading file headers only. If you open an archive in such mode, RARReadHeader[Ex] will return all file headers, including those with "file continued from previous volume" flag. In case of RAR_OM_LIST such headers are automatically skipped. So if you process RAR volumes in RAR_OM_LIST_INCSPLIT mode, you will get several file header records for same file if file is split between volumes. For such files only the last file header record will contain the correct file CRC and if you wish to get the correct packed size, you need to sum up packed sizes of all parts.

- OpenResult

  > Output parameter.

  > Possible values:

  > 0 | Success
  > ERAR_NO_MEMORY | Not enough memory to initialize data structures
  > ERAR_BAD_DATA | Archive header broken
  > ERAR_UNKNOWN_FORMAT | Unknown encryption used for archive headers
  > ERAR_EOPEN | File open error
  > ERAR_BAD_PASSWORD | Entered password is invalid. This code is returned only for archives in RAR 5.0 format

- CmtBuf

  > Input parameter which should point to the buffer for archive comments. Maximum comment size is limited to 64Kb. Comment text is zero terminated. If the comment text is larger than the buffer size, the comment text will be truncated. If CmtBuf is set to NULL, comments will not be read.

- CmtBufSize

  > Input parameter which should contain size of buffer for archive comments.

- CmtSize

  > Output parameter containing size of comments actually read into the buffer, cannot exceed CmtBufSize.

- CmtState

  > Output parameter.

  > Possible values:

  > 0 | Comments are not present
  > 1 | Comments are read completely
  > ERAR_NO_MEMORY | Not enough memory to extract comments
  > ERAR_BAD_DATA | Broken comment
  > ERAR_SMALL_BUF | Buffer is too small, comments are not read completely.

### See also

> RAROpenArchive function.