unrarsrc  6.1.7
About: unrar extracts, views and tests the contents of archives created with the RAR archiver.
  Fossies Dox: unrarsrc-6.1.7.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

dll.hpp
Go to the documentation of this file.
1#ifndef _UNRAR_DLL_
2#define _UNRAR_DLL_
3
4#pragma pack(push, 1)
5
6#define ERAR_SUCCESS 0
7#define ERAR_END_ARCHIVE 10
8#define ERAR_NO_MEMORY 11
9#define ERAR_BAD_DATA 12
10#define ERAR_BAD_ARCHIVE 13
11#define ERAR_UNKNOWN_FORMAT 14
12#define ERAR_EOPEN 15
13#define ERAR_ECREATE 16
14#define ERAR_ECLOSE 17
15#define ERAR_EREAD 18
16#define ERAR_EWRITE 19
17#define ERAR_SMALL_BUF 20
18#define ERAR_UNKNOWN 21
19#define ERAR_MISSING_PASSWORD 22
20#define ERAR_EREFERENCE 23
21#define ERAR_BAD_PASSWORD 24
22
23#define RAR_OM_LIST 0
24#define RAR_OM_EXTRACT 1
25#define RAR_OM_LIST_INCSPLIT 2
26
27#define RAR_SKIP 0
28#define RAR_TEST 1
29#define RAR_EXTRACT 2
30
31#define RAR_VOL_ASK 0
32#define RAR_VOL_NOTIFY 1
33
34#define RAR_DLL_VERSION 8
35
36#define RAR_HASH_NONE 0
37#define RAR_HASH_CRC32 1
38#define RAR_HASH_BLAKE2 2
39
40
41#ifdef _UNIX
42#define CALLBACK
43#define PASCAL
44#define LONG long
45#define HANDLE void *
46#define LPARAM long
47#define UINT unsigned int
48#endif
49
50#define RHDF_SPLITBEFORE 0x01
51#define RHDF_SPLITAFTER 0x02
52#define RHDF_ENCRYPTED 0x04
53#define RHDF_SOLID 0x10
54#define RHDF_DIRECTORY 0x20
55
56
58{
59 char ArcName[260];
60 char FileName[260];
61 unsigned int Flags;
62 unsigned int PackSize;
63 unsigned int UnpSize;
64 unsigned int HostOS;
65 unsigned int FileCRC;
66 unsigned int FileTime;
67 unsigned int UnpVer;
68 unsigned int Method;
69 unsigned int FileAttr;
70 char *CmtBuf;
71 unsigned int CmtBufSize;
72 unsigned int CmtSize;
73 unsigned int CmtState;
74};
75
76
78{
79 char ArcName[1024];
80 wchar_t ArcNameW[1024];
81 char FileName[1024];
82 wchar_t FileNameW[1024];
83 unsigned int Flags;
84 unsigned int PackSize;
85 unsigned int PackSizeHigh;
86 unsigned int UnpSize;
87 unsigned int UnpSizeHigh;
88 unsigned int HostOS;
89 unsigned int FileCRC;
90 unsigned int FileTime;
91 unsigned int UnpVer;
92 unsigned int Method;
93 unsigned int FileAttr;
94 char *CmtBuf;
95 unsigned int CmtBufSize;
96 unsigned int CmtSize;
97 unsigned int CmtState;
98 unsigned int DictSize;
99 unsigned int HashType;
100 char Hash[32];
101 unsigned int RedirType;
102 wchar_t *RedirName;
103 unsigned int RedirNameSize;
104 unsigned int DirTarget;
105 unsigned int MtimeLow;
106 unsigned int MtimeHigh;
107 unsigned int CtimeLow;
108 unsigned int CtimeHigh;
109 unsigned int AtimeLow;
110 unsigned int AtimeHigh;
111 unsigned int Reserved[988];
112};
113
114
116{
117 char *ArcName;
118 unsigned int OpenMode;
119 unsigned int OpenResult;
120 char *CmtBuf;
121 unsigned int CmtBufSize;
122 unsigned int CmtSize;
123 unsigned int CmtState;
124};
125
126typedef int (CALLBACK *UNRARCALLBACK)(UINT msg,LPARAM UserData,LPARAM P1,LPARAM P2);
127
128#define ROADF_VOLUME 0x0001
129#define ROADF_COMMENT 0x0002
130#define ROADF_LOCK 0x0004
131#define ROADF_SOLID 0x0008
132#define ROADF_NEWNUMBERING 0x0010
133#define ROADF_SIGNED 0x0020
134#define ROADF_RECOVERY 0x0040
135#define ROADF_ENCHEADERS 0x0080
136#define ROADF_FIRSTVOLUME 0x0100
137
138#define ROADOF_KEEPBROKEN 0x0001
139
141{
142 char *ArcName;
143 wchar_t *ArcNameW;
144 unsigned int OpenMode;
145 unsigned int OpenResult;
146 char *CmtBuf;
147 unsigned int CmtBufSize;
148 unsigned int CmtSize;
149 unsigned int CmtState;
150 unsigned int Flags;
152 LPARAM UserData;
153 unsigned int OpFlags;
154 wchar_t *CmtBufW;
155 unsigned int Reserved[25];
156};
157
162
163typedef int (PASCAL *CHANGEVOLPROC)(char *ArcName,int Mode);
164typedef int (PASCAL *PROCESSDATAPROC)(unsigned char *Addr,int Size);
165
166#ifdef __cplusplus
167extern "C" {
168#endif
169
170HANDLE PASCAL RAROpenArchive(struct RAROpenArchiveData *ArchiveData);
171HANDLE PASCAL RAROpenArchiveEx(struct RAROpenArchiveDataEx *ArchiveData);
172int PASCAL RARCloseArchive(HANDLE hArcData);
173int PASCAL RARReadHeader(HANDLE hArcData,struct RARHeaderData *HeaderData);
174int PASCAL RARReadHeaderEx(HANDLE hArcData,struct RARHeaderDataEx *HeaderData);
175int PASCAL RARProcessFile(HANDLE hArcData,int Operation,char *DestPath,char *DestName);
176int PASCAL RARProcessFileW(HANDLE hArcData,int Operation,wchar_t *DestPath,wchar_t *DestName);
177void PASCAL RARSetCallback(HANDLE hArcData,UNRARCALLBACK Callback,LPARAM UserData);
178void PASCAL RARSetChangeVolProc(HANDLE hArcData,CHANGEVOLPROC ChangeVolProc);
179void PASCAL RARSetProcessDataProc(HANDLE hArcData,PROCESSDATAPROC ProcessDataProc);
180void PASCAL RARSetPassword(HANDLE hArcData,char *Password);
181int PASCAL RARGetDllVersion();
182
183#ifdef __cplusplus
184}
185#endif
186
187#pragma pack(pop)
188
189#endif
int(PASCAL * PROCESSDATAPROC)(unsigned char *Addr, int Size)
Definition: dll.hpp:164
int PASCAL RARGetDllVersion()
Definition: dll.cpp:466
int PASCAL RARReadHeader(HANDLE hArcData, struct RARHeaderData *HeaderData)
Definition: dll.cpp:184
int PASCAL RARProcessFile(HANDLE hArcData, int Operation, char *DestPath, char *DestName)
Definition: dll.cpp:420
int PASCAL RARReadHeaderEx(HANDLE hArcData, struct RARHeaderDataEx *HeaderData)
Definition: dll.cpp:209
int PASCAL RARCloseArchive(HANDLE hArcData)
Definition: dll.cpp:168
int(PASCAL * CHANGEVOLPROC)(char *ArcName, int Mode)
Definition: dll.hpp:163
void PASCAL RARSetPassword(HANDLE hArcData, char *Password)
Definition: dll.cpp:454
HANDLE PASCAL RAROpenArchive(struct RAROpenArchiveData *ArchiveData)
Definition: dll.cpp:17
UNRARCALLBACK_MESSAGES
Definition: dll.hpp:158
@ UCM_NEEDPASSWORDW
Definition: dll.hpp:160
@ UCM_NEEDPASSWORD
Definition: dll.hpp:159
@ UCM_CHANGEVOLUMEW
Definition: dll.hpp:159
@ UCM_CHANGEVOLUME
Definition: dll.hpp:159
@ UCM_PROCESSDATA
Definition: dll.hpp:159
int(CALLBACK * UNRARCALLBACK)(UINT msg, LPARAM UserData, LPARAM P1, LPARAM P2)
Definition: dll.hpp:126
int PASCAL RARProcessFileW(HANDLE hArcData, int Operation, wchar_t *DestPath, wchar_t *DestName)
Definition: dll.cpp:426
void PASCAL RARSetProcessDataProc(HANDLE hArcData, PROCESSDATAPROC ProcessDataProc)
Definition: dll.cpp:447
void PASCAL RARSetChangeVolProc(HANDLE hArcData, CHANGEVOLPROC ChangeVolProc)
Definition: dll.cpp:432
void PASCAL RARSetCallback(HANDLE hArcData, UNRARCALLBACK Callback, LPARAM UserData)
Definition: dll.cpp:439
HANDLE PASCAL RAROpenArchiveEx(struct RAROpenArchiveDataEx *ArchiveData)
Definition: dll.cpp:33
unsigned int Reserved[988]
Definition: dll.hpp:111
unsigned int UnpSize
Definition: dll.hpp:86
unsigned int MtimeHigh
Definition: dll.hpp:106
unsigned int CmtState
Definition: dll.hpp:97
char Hash[32]
Definition: dll.hpp:100
unsigned int CtimeLow
Definition: dll.hpp:107
unsigned int PackSizeHigh
Definition: dll.hpp:85
unsigned int HashType
Definition: dll.hpp:99
char ArcName[1024]
Definition: dll.hpp:79
wchar_t ArcNameW[1024]
Definition: dll.hpp:80
unsigned int UnpVer
Definition: dll.hpp:91
unsigned int PackSize
Definition: dll.hpp:84
unsigned int AtimeLow
Definition: dll.hpp:109
unsigned int AtimeHigh
Definition: dll.hpp:110
unsigned int CmtSize
Definition: dll.hpp:96
unsigned int FileCRC
Definition: dll.hpp:89
unsigned int CtimeHigh
Definition: dll.hpp:108
wchar_t FileNameW[1024]
Definition: dll.hpp:82
unsigned int Method
Definition: dll.hpp:92
unsigned int RedirType
Definition: dll.hpp:101
unsigned int Flags
Definition: dll.hpp:83
unsigned int DirTarget
Definition: dll.hpp:104
unsigned int UnpSizeHigh
Definition: dll.hpp:87
unsigned int FileAttr
Definition: dll.hpp:93
wchar_t * RedirName
Definition: dll.hpp:102
unsigned int MtimeLow
Definition: dll.hpp:105
unsigned int HostOS
Definition: dll.hpp:88
char FileName[1024]
Definition: dll.hpp:81
unsigned int RedirNameSize
Definition: dll.hpp:103
unsigned int CmtBufSize
Definition: dll.hpp:95
char * CmtBuf
Definition: dll.hpp:94
unsigned int FileTime
Definition: dll.hpp:90
unsigned int DictSize
Definition: dll.hpp:98
unsigned int CmtBufSize
Definition: dll.hpp:71
unsigned int CmtState
Definition: dll.hpp:73
unsigned int FileTime
Definition: dll.hpp:66
unsigned int PackSize
Definition: dll.hpp:62
unsigned int UnpSize
Definition: dll.hpp:63
unsigned int CmtSize
Definition: dll.hpp:72
unsigned int UnpVer
Definition: dll.hpp:67
char ArcName[260]
Definition: dll.hpp:59
unsigned int FileAttr
Definition: dll.hpp:69
unsigned int FileCRC
Definition: dll.hpp:65
unsigned int HostOS
Definition: dll.hpp:64
char FileName[260]
Definition: dll.hpp:60
unsigned int Method
Definition: dll.hpp:68
char * CmtBuf
Definition: dll.hpp:70
unsigned int Flags
Definition: dll.hpp:61
unsigned int CmtSize
Definition: dll.hpp:148
UNRARCALLBACK Callback
Definition: dll.hpp:151
unsigned int CmtBufSize
Definition: dll.hpp:147
unsigned int Reserved[25]
Definition: dll.hpp:155
unsigned int CmtState
Definition: dll.hpp:149
wchar_t * CmtBufW
Definition: dll.hpp:154
unsigned int OpenResult
Definition: dll.hpp:145
unsigned int OpFlags
Definition: dll.hpp:153
unsigned int OpenMode
Definition: dll.hpp:144
wchar_t * ArcNameW
Definition: dll.hpp:143
unsigned int Flags
Definition: dll.hpp:150
unsigned int CmtBufSize
Definition: dll.hpp:121
unsigned int CmtSize
Definition: dll.hpp:122
char * ArcName
Definition: dll.hpp:117
unsigned int OpenResult
Definition: dll.hpp:119
unsigned int CmtState
Definition: dll.hpp:123
unsigned int OpenMode
Definition: dll.hpp:118
char * CmtBuf
Definition: dll.hpp:120