DragonNest/Extern/UnRAR/Documentation/RARHeaderDataEx.htm
2024-12-19 09:48:26 +08:00

231 lines
5.7 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>UnRAR.dll Manual</title>
</head>
<body>
<h3>RARHeaderDataEx structure</h3>
<pre>
struct RARHeaderDataEx
{
char ArcName[1024];
wchar_t ArcNameW[1024];
char FileName[1024];
wchar_t FileNameW[1024];
unsigned int Flags;
unsigned int PackSize;
unsigned int PackSizeHigh;
unsigned int UnpSize;
unsigned int UnpSizeHigh;
unsigned int HostOS;
unsigned int FileCRC;
unsigned int FileTime;
unsigned int UnpVer;
unsigned int Method;
unsigned int FileAttr;
char *CmtBuf;
unsigned int CmtBufSize;
unsigned int CmtSize;
unsigned int CmtState;
unsigned int Reserved[1024];
};
</pre>
<h3>Description</h3>
<p>This structure is used by <a href="RARReadHeaderEx.htm">RARReadHeaderEx</a>
function.</p>
<h3>Structure fields</h3>
<ul>
<li>
<i>ArcName</i>
<blockquote>
Output parameter, which contains a zero terminated string of the current
archive name. May be used to determine the current volume name.
</blockquote>
<li>
<i>ArcNameW</i>
<blockquote>
Output parameter, which contains a zero terminated string of the current
archive name in Unicode. May be used to determine the current volume name.
</blockquote>
<li>
<i>FileName</i>
<blockquote>
Output parameter, which contains a zero terminated string of the file name
in OEM (DOS) encoding.
</blockquote>
<li>
<i>FileNameW</i>
<blockquote>
Output parameter, which contains a zero terminated string of the file name
in Unicode.
</blockquote>
<li>
<i>Flags</i>
<blockquote>
<p>Output parameter which contains file flags:</p>
<table border="1">
<tr><td>0x01</td><td>File continued from previous volume</td></tr>
<tr><td>0x02</td><td>File continued on next volume</td></tr>
<tr><td>0x04</td><td>File encrypted with password</td></tr>
<tr><td>0x08</td><td>File comment present</td></tr>
<tr><td>0x10</td><td>Previous files data is used (solid flag)</td></tr>
</table>
<p>Bits 7 6 5 (0xE0 mask)</p>
<table border="1">
<tr><td>0 0 0 (0x00)</td><td>Dictionary size 64 KB</td></tr>
<tr><td>0 0 1 (0x20)</td><td>Dictionary size 128 KB</td></tr>
<tr><td>0 1 0 (0x40)</td><td>Dictionary size 256 KB</td></tr>
<tr><td>0 1 1 (0x60)</td><td>Dictionary size 512 KB</td></tr>
<tr><td>1 0 0 (0x80)</td><td>Dictionary size 1024 KB</td></tr>
<tr><td>1 0 1 (0xA0)</td><td>Dictionary size 2048 KB</td></tr>
<tr><td>1 1 0 (0xA0)</td><td>Dictionary size 4096 KB</td></tr>
<tr><td>1 1 1 (0xE0)</td><td>Directory record</td></tr>
</table>
<p>Other bits are reserved.</p>
</blockquote>
<li>
<i>PackSize</i>
<blockquote>
Output parameter. Lower 32 bits of packed file size. If file is split
between volumes, it contains the lower 32 bits of file part size.
</blockquote>
<li>
<i>PackSizeHigh</i>
<blockquote>
Output parameter. Higher 32 bits of packed file size. If file is split
between volumes, it contains the higher 32 bits of file part size.
</blockquote>
<li>
<i>UnpSize</i>
<blockquote>
Output parameter. Lower 32 bits of unpacked file size.
</blockquote>
<li>
<i>UnpSizeHigh</i>
<blockquote>
Output parameter. Higher 32 bits of unpacked file size.
</blockquote>
<li>
<i>HostOS</i>
<blockquote>
<p>Output parameter. Operating system used to create the archive.</p>
<table border="1">
<tr><td>0</td><td>MS DOS</td></tr>
<tr><td>1</td><td>OS/2</td></tr>
<tr><td>2</td><td>Windows</td></tr>
<tr><td>3</td><td>Unix</td></tr>
</table>
</blockquote>
<li>
<i>FileCRC</i>
<blockquote>
Output parameter, which contains unpacked file CRC32. In case of file
parts split between volumes only the last part contains the correct
CRC and it is accessible only in RAR_OM_LIST_INCSPLIT listing mode.
</blockquote>
<li>
<i>FileTime</i>
<blockquote>
Output parameter. Contains the file modification date and time in standard
MS DOS format.
</blockquote>
<li>
<i>UnpVer</i>
<blockquote>
Output parameter. RAR version needed to extract file.
It is encoded as 10 * Major version + minor version.
</blockquote>
<li>
<i>Method</i>
<blockquote>
<p>Output parameter. Packing method.</p>
<table border="1">
<tr><td>0x30</td><td>Storing</td></tr>
<tr><td>0x31</td><td>Fastest compression</td></tr>
<tr><td>0x32</td><td>Fast compression</td></tr>
<tr><td>0x33</td><td>Normal compression</td></tr>
<tr><td>0x34</td><td>Good compression</td></tr>
<tr><td>0x35</td><td>Best compression</td></tr>
</table>
</blockquote>
<li>
<i>FileAttr</i>
<blockquote>
Output parameter. File attributes.
</blockquote>
</ul>
<li>
<i>CmtBuf</i>
<blockquote>
<p>Input parameter. Points to the buffer for file comment.</p>
<p>File comment support is not implemented in current unrar.dll version.
Appropriate parameters are preserved only for compatibility
with older versions.</p>
<p>Set this field to NULL.</p>
</blockquote>
<li>
<i>CmtBufSize</i>
<blockquote>
<p>Input parameter. Size of buffer for archive comments.</p>
<p>File comment support is not implemented in current unrar.dll version.</p>
<p>Set this field to 0.</p>
</blockquote>
<li>
<i>CmtSize</i>
<blockquote>
<p>Output parameter. Size of file comment read into buffer.<p>
<p>File comment support is not implemented in current unrar.dll version.</p>
<p>Always equal to 0.</p>
</blockquote>
<li>
<i>CmtState</i>
<blockquote>
<p>Output parameter. State of file comment.<p>
<p>File comment support is not implemented in current unrar.dll version.</p>
<p>Always equal to 0.</p>
</blockquote>
<li>
<i>Reserved</i>
<blockquote>
Reserved for future use. The entire array must be filled with zeroes.
</blockquote>
</ul>
<h3>See also</h3>
<blockquote>
<a href="RARReadHeaderEx.htm">RARReadHeaderEx</a> function.
</blockquote>
</body>
</html>