6 #define ERAR_END_ARCHIVE 10
\r
7 #define ERAR_NO_MEMORY 11
\r
8 #define ERAR_BAD_DATA 12
\r
9 #define ERAR_BAD_ARCHIVE 13
\r
10 #define ERAR_UNKNOWN_FORMAT 14
\r
11 #define ERAR_EOPEN 15
\r
12 #define ERAR_ECREATE 16
\r
13 #define ERAR_ECLOSE 17
\r
14 #define ERAR_EREAD 18
\r
15 #define ERAR_EWRITE 19
\r
16 #define ERAR_SMALL_BUF 20
\r
17 #define ERAR_UNKNOWN 21
\r
18 #define ERAR_MISSING_PASSWORD 22
\r
20 #define RAR_OM_LIST 0
\r
21 #define RAR_OM_EXTRACT 1
\r
22 #define RAR_OM_LIST_INCSPLIT 2
\r
26 #define RAR_EXTRACT 2
\r
28 #define RAR_VOL_ASK 0
\r
29 #define RAR_VOL_NOTIFY 1
\r
31 #define RAR_DLL_VERSION 5
\r
37 #define HANDLE void *
\r
39 #define UINT unsigned int
\r
42 struct RARHeaderData
\r
47 unsigned int PackSize;
\r
48 unsigned int UnpSize;
\r
49 unsigned int HostOS;
\r
50 unsigned int FileCRC;
\r
51 unsigned int FileTime;
\r
52 unsigned int UnpVer;
\r
53 unsigned int Method;
\r
54 unsigned int FileAttr;
\r
56 unsigned int CmtBufSize;
\r
57 unsigned int CmtSize;
\r
58 unsigned int CmtState;
\r
62 struct RARHeaderDataEx
\r
65 wchar_t ArcNameW[1024];
\r
66 char FileName[1024];
\r
67 wchar_t FileNameW[1024];
\r
69 unsigned int PackSize;
\r
70 unsigned int PackSizeHigh;
\r
71 unsigned int UnpSize;
\r
72 unsigned int UnpSizeHigh;
\r
73 unsigned int HostOS;
\r
74 unsigned int FileCRC;
\r
75 unsigned int FileTime;
\r
76 unsigned int UnpVer;
\r
77 unsigned int Method;
\r
78 unsigned int FileAttr;
\r
80 unsigned int CmtBufSize;
\r
81 unsigned int CmtSize;
\r
82 unsigned int CmtState;
\r
83 unsigned int Reserved[1024];
\r
87 struct RAROpenArchiveData
\r
90 unsigned int OpenMode;
\r
91 unsigned int OpenResult;
\r
93 unsigned int CmtBufSize;
\r
94 unsigned int CmtSize;
\r
95 unsigned int CmtState;
\r
98 typedef int (CALLBACK *UNRARCALLBACK)(UINT msg,LPARAM UserData,LPARAM P1,LPARAM P2);
\r
100 struct RAROpenArchiveDataEx
\r
104 unsigned int OpenMode;
\r
105 unsigned int OpenResult;
\r
107 unsigned int CmtBufSize;
\r
108 unsigned int CmtSize;
\r
109 unsigned int CmtState;
\r
110 unsigned int Flags;
\r
111 UNRARCALLBACK Callback;
\r
113 unsigned int Reserved[28];
\r
116 enum UNRARCALLBACK_MESSAGES {
\r
117 UCM_CHANGEVOLUME,UCM_PROCESSDATA,UCM_NEEDPASSWORD,UCM_CHANGEVOLUMEW,
\r
121 typedef int (PASCAL *CHANGEVOLPROC)(char *ArcName,int Mode);
\r
122 typedef int (PASCAL *PROCESSDATAPROC)(unsigned char *Addr,int Size);
\r
128 typedef HANDLE (PASCAL *RAROpenArchive)(struct RAROpenArchiveData *ArchiveData);
\r
129 typedef HANDLE (PASCAL *RAROpenArchiveEx)(struct RAROpenArchiveDataEx *ArchiveData);
\r
130 typedef int (PASCAL *RARCloseArchive)(HANDLE hArcData);
\r
131 typedef int (PASCAL *RARReadHeader)(HANDLE hArcData,struct RARHeaderData *HeaderData);
\r
132 typedef int (PASCAL *RARReadHeaderEx)(HANDLE hArcData,struct RARHeaderDataEx *HeaderData);
\r
133 typedef int (PASCAL *RARProcessFile)(HANDLE hArcData,int Operation,char *DestPath,char *DestName);
\r
134 typedef int (PASCAL *RARProcessFileW)(HANDLE hArcData,int Operation,wchar_t *DestPath,wchar_t *DestName);
\r
135 typedef void (PASCAL *RARSetCallback)(HANDLE hArcData,UNRARCALLBACK Callback,LPARAM UserData);
\r
136 typedef void (PASCAL *RARSetChangeVolProc)(HANDLE hArcData,CHANGEVOLPROC ChangeVolProc);
\r
137 typedef void (PASCAL *RARSetProcessDataProc)(HANDLE hArcData,PROCESSDATAPROC ProcessDataProc);
\r
138 typedef void (PASCAL *RARSetPassword)(HANDLE hArcData,char *Password);
\r
139 typedef int (PASCAL *RARGetDllVersion)();
\r