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
41 #define ERAR_EREFERENCE 23
\r
42 #define ERAR_BAD_PASSWORD 24
\r
45 #define RAR_OM_LIST 0
\r
46 #define RAR_OM_EXTRACT 1
\r
47 #define RAR_OM_LIST_INCSPLIT 2
\r
52 #define RAR_EXTRACT 2
\r
55 #define RAR_VOL_ASK 0
\r
56 #define RAR_VOL_NOTIFY 1
\r
59 #define RAR_HASH_NONE 0
\r
60 #define RAR_HASH_CRC32 1
\r
61 #define RAR_HASH_BLAKE2 2
\r
63 //******************************************************************************
\r
65 //******************************************************************************
\r
67 typedef int (__stdcall *UNRARCALLBACK)(unsigned int msg, long UserData, long P1, long P2);
\r
69 struct RARHeaderDataEx
\r
72 wchar_t ArcNameW[1024];
\r
73 char FileName[1024];
\r
74 wchar_t FileNameW[1024];
\r
76 unsigned int PackSize;
\r
77 unsigned int PackSizeHigh;
\r
78 unsigned int UnpSize;
\r
79 unsigned int UnpSizeHigh;
\r
80 unsigned int HostOS;
\r
81 unsigned int FileCRC;
\r
82 unsigned int FileTime;
\r
83 unsigned int UnpVer;
\r
84 unsigned int Method;
\r
85 unsigned int FileAttr;
\r
87 unsigned int CmtBufSize;
\r
88 unsigned int CmtSize;
\r
89 unsigned int CmtState;
\r
90 unsigned int DictSize;
\r
91 unsigned int HashType;
\r
93 unsigned int Reserved[1014];
\r
96 struct RAROpenArchiveDataEx
\r
100 unsigned int OpenMode;
\r
101 unsigned int OpenResult;
\r
103 unsigned int CmtBufSize;
\r
104 unsigned int CmtSize;
\r
105 unsigned int CmtState;
\r
106 unsigned int Flags;
\r
107 UNRARCALLBACK Callback;
\r
109 unsigned int Reserved[28];
\r
112 enum UNRARCALLBACK_MESSAGES
\r