1 /*******************************************************************************
\r
2 TPI - flexible but useless plug-in framework.
\r
3 Copyright (C) 2002-2009 Silky
\r
5 This library is free software; you can redistribute it and/or modify it under
\r
6 the terms of the GNU Lesser General Public License as published by the Free
\r
7 Software Foundation; either version 2.1 of the License, or (at your option)
\r
10 This library is distributed in the hope that it will be useful, but WITHOUT
\r
11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
\r
12 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
\r
15 You should have received a copy of the GNU Lesser General Public License along
\r
16 with this library; if not, write to the Free Software Foundation, Inc.,
\r
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
\r
20 *******************************************************************************/
\r
22 //******************************************************************************
\r
24 //******************************************************************************
\r
27 #define ERAR_SUCCESS 0
\r
28 #define ERAR_END_ARCHIVE 10
\r
29 #define ERAR_NO_MEMORY 11
\r
30 #define ERAR_BAD_DATA 12
\r
31 #define ERAR_BAD_ARCHIVE 13
\r
32 #define ERAR_UNKNOWN_FORMAT 14
\r
33 #define ERAR_EOPEN 15
\r
34 #define ERAR_ECREATE 16
\r
35 #define ERAR_ECLOSE 17
\r
36 #define ERAR_EREAD 18
\r
37 #define ERAR_EWRITE 19
\r
38 #define ERAR_SMALL_BUF 20
\r
39 #define ERAR_UNKNOWN 21
\r
40 #define ERAR_MISSING_PASSWORD 22
\r
43 #define RAR_OM_LIST 0
\r
44 #define RAR_OM_EXTRACT 1
\r
45 #define RAR_OM_LIST_INCSPLIT 2
\r
50 #define RAR_EXTRACT 2
\r
53 #define RAR_VOL_ASK 0
\r
54 #define RAR_VOL_NOTIFY 1
\r
57 #define RAR_HASH_NONE 0
\r
58 #define RAR_HASH_CRC32 1
\r
59 #define RAR_HASH_BLAKE2 2
\r
61 //******************************************************************************
\r
63 //******************************************************************************
\r
65 typedef int (__stdcall *UNRARCALLBACK)(unsigned int msg, long UserData, long P1, long P2);
\r
67 struct RARHeaderDataEx
\r
70 wchar_t ArcNameW[1024];
\r
71 char FileName[1024];
\r
72 wchar_t FileNameW[1024];
\r
74 unsigned int PackSize;
\r
75 unsigned int PackSizeHigh;
\r
76 unsigned int UnpSize;
\r
77 unsigned int UnpSizeHigh;
\r
78 unsigned int HostOS;
\r
79 unsigned int FileCRC;
\r
80 unsigned int FileTime;
\r
81 unsigned int UnpVer;
\r
82 unsigned int Method;
\r
83 unsigned int FileAttr;
\r
85 unsigned int CmtBufSize;
\r
86 unsigned int CmtSize;
\r
87 unsigned int CmtState;
\r
88 unsigned int DictSize;
\r
89 unsigned int HashType;
\r
91 unsigned int Reserved[1014];
\r
94 struct RAROpenArchiveDataEx
\r
98 unsigned int OpenMode;
\r
99 unsigned int OpenResult;
\r
101 unsigned int CmtBufSize;
\r
102 unsigned int CmtSize;
\r
103 unsigned int CmtState;
\r
104 unsigned int Flags;
\r
105 UNRARCALLBACK Callback;
\r
107 unsigned int Reserved[28];
\r
110 enum UNRARCALLBACK_MESSAGES
\r