-
Notifications
You must be signed in to change notification settings - Fork 6
/
unrar.patch
executable file
·72 lines (63 loc) · 3 KB
/
unrar.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
*** unrar/dll.hpp 2007-09-10 04:49:28.000000000 -0700
--- unrar.h 2008-01-17 16:49:31.000000000 -0800
***************
*** 33,38 ****
--- 33,42 ----
#define LONG long
#define HANDLE void *
#define UINT unsigned int
+ #define DLLIMPORT extern
+ #else
+ // Windows
+ #define DLLIMPORT __declspec(dllimport)
#endif
struct RARHeaderData
***************
*** 109,115 ****
UCM_CHANGEVOLUME,UCM_PROCESSDATA,UCM_NEEDPASSWORD
};
! typedef int (CALLBACK *UNRARCALLBACK)(UINT msg,LONG UserData,LONG P1,LONG P2);
typedef int (PASCAL *CHANGEVOLPROC)(char *ArcName,int Mode);
typedef int (PASCAL *PROCESSDATAPROC)(unsigned char *Addr,int Size);
--- 113,119 ----
UCM_CHANGEVOLUME,UCM_PROCESSDATA,UCM_NEEDPASSWORD
};
! typedef int (CALLBACK *UNRARCALLBACK)(UINT msg,void * UserData,size_t P1,size_t P2);
typedef int (PASCAL *CHANGEVOLPROC)(char *ArcName,int Mode);
typedef int (PASCAL *PROCESSDATAPROC)(unsigned char *Addr,int Size);
***************
*** 118,135 ****
extern "C" {
#endif
! HANDLE PASCAL RAROpenArchive(struct RAROpenArchiveData *ArchiveData);
! HANDLE PASCAL RAROpenArchiveEx(struct RAROpenArchiveDataEx *ArchiveData);
! int PASCAL RARCloseArchive(HANDLE hArcData);
! int PASCAL RARReadHeader(HANDLE hArcData,struct RARHeaderData *HeaderData);
! int PASCAL RARReadHeaderEx(HANDLE hArcData,struct RARHeaderDataEx *HeaderData);
! int PASCAL RARProcessFile(HANDLE hArcData,int Operation,char *DestPath,char *DestName);
! int PASCAL RARProcessFileW(HANDLE hArcData,int Operation,wchar_t *DestPath,wchar_t *DestName);
! void PASCAL RARSetCallback(HANDLE hArcData,UNRARCALLBACK Callback,LONG UserData);
! void PASCAL RARSetChangeVolProc(HANDLE hArcData,CHANGEVOLPROC ChangeVolProc);
! void PASCAL RARSetProcessDataProc(HANDLE hArcData,PROCESSDATAPROC ProcessDataProc);
! void PASCAL RARSetPassword(HANDLE hArcData,char *Password);
! int PASCAL RARGetDllVersion();
#ifdef __cplusplus
}
--- 122,140 ----
extern "C" {
#endif
! DLLIMPORT HANDLE PASCAL RAROpenArchive(struct RAROpenArchiveData *ArchiveData);
!
! DLLIMPORT HANDLE PASCAL RAROpenArchiveEx(struct RAROpenArchiveDataEx *ArchiveData);
! DLLIMPORT int PASCAL RARCloseArchive(HANDLE hArcData);
! DLLIMPORT int PASCAL RARReadHeader(HANDLE hArcData,struct RARHeaderData *HeaderData);
! DLLIMPORT int PASCAL RARReadHeaderEx(HANDLE hArcData,struct RARHeaderDataEx *HeaderData);
! DLLIMPORT int PASCAL RARProcessFile(HANDLE hArcData,int Operation,char *DestPath,char *DestName);
! DLLIMPORT int PASCAL RARProcessFileW(HANDLE hArcData,int Operation,wchar_t *DestPath,wchar_t *DestName);
! DLLIMPORT void PASCAL RARSetCallback(HANDLE hArcData,UNRARCALLBACK Callback,void * UserData);
! DLLIMPORT void PASCAL RARSetChangeVolProc(HANDLE hArcData,CHANGEVOLPROC ChangeVolProc);
! DLLIMPORT void PASCAL RARSetProcessDataProc(HANDLE hArcData,PROCESSDATAPROC ProcessDataProc);
! DLLIMPORT void PASCAL RARSetPassword(HANDLE hArcData,char *Password);
! DLLIMPORT int PASCAL RARGetDllVersion();
#ifdef __cplusplus
}