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 File Reference

Go to the source code of this file.

Classes

struct  RARHeaderData
 
struct  RARHeaderDataEx
 
struct  RAROpenArchiveData
 
struct  RAROpenArchiveDataEx
 

Macros

#define ERAR_SUCCESS   0
 
#define ERAR_END_ARCHIVE   10
 
#define ERAR_NO_MEMORY   11
 
#define ERAR_BAD_DATA   12
 
#define ERAR_BAD_ARCHIVE   13
 
#define ERAR_UNKNOWN_FORMAT   14
 
#define ERAR_EOPEN   15
 
#define ERAR_ECREATE   16
 
#define ERAR_ECLOSE   17
 
#define ERAR_EREAD   18
 
#define ERAR_EWRITE   19
 
#define ERAR_SMALL_BUF   20
 
#define ERAR_UNKNOWN   21
 
#define ERAR_MISSING_PASSWORD   22
 
#define ERAR_EREFERENCE   23
 
#define ERAR_BAD_PASSWORD   24
 
#define RAR_OM_LIST   0
 
#define RAR_OM_EXTRACT   1
 
#define RAR_OM_LIST_INCSPLIT   2
 
#define RAR_SKIP   0
 
#define RAR_TEST   1
 
#define RAR_EXTRACT   2
 
#define RAR_VOL_ASK   0
 
#define RAR_VOL_NOTIFY   1
 
#define RAR_DLL_VERSION   8
 
#define RAR_HASH_NONE   0
 
#define RAR_HASH_CRC32   1
 
#define RAR_HASH_BLAKE2   2
 
#define RHDF_SPLITBEFORE   0x01
 
#define RHDF_SPLITAFTER   0x02
 
#define RHDF_ENCRYPTED   0x04
 
#define RHDF_SOLID   0x10
 
#define RHDF_DIRECTORY   0x20
 
#define ROADF_VOLUME   0x0001
 
#define ROADF_COMMENT   0x0002
 
#define ROADF_LOCK   0x0004
 
#define ROADF_SOLID   0x0008
 
#define ROADF_NEWNUMBERING   0x0010
 
#define ROADF_SIGNED   0x0020
 
#define ROADF_RECOVERY   0x0040
 
#define ROADF_ENCHEADERS   0x0080
 
#define ROADF_FIRSTVOLUME   0x0100
 
#define ROADOF_KEEPBROKEN   0x0001
 

Typedefs

typedef int(CALLBACK * UNRARCALLBACK) (UINT msg, LPARAM UserData, LPARAM P1, LPARAM P2)
 
typedef int(PASCAL * CHANGEVOLPROC) (char *ArcName, int Mode)
 
typedef int(PASCAL * PROCESSDATAPROC) (unsigned char *Addr, int Size)
 

Enumerations

enum  UNRARCALLBACK_MESSAGES {
  UCM_CHANGEVOLUME , UCM_PROCESSDATA , UCM_NEEDPASSWORD , UCM_CHANGEVOLUMEW ,
  UCM_NEEDPASSWORDW
}
 

Functions

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, LPARAM 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 ()
 

Macro Definition Documentation

◆ ERAR_BAD_ARCHIVE

#define ERAR_BAD_ARCHIVE   13

Definition at line 10 of file dll.hpp.

◆ ERAR_BAD_DATA

#define ERAR_BAD_DATA   12

Definition at line 9 of file dll.hpp.

◆ ERAR_BAD_PASSWORD

#define ERAR_BAD_PASSWORD   24

Definition at line 21 of file dll.hpp.

◆ ERAR_ECLOSE

#define ERAR_ECLOSE   17

Definition at line 14 of file dll.hpp.

◆ ERAR_ECREATE

#define ERAR_ECREATE   16

Definition at line 13 of file dll.hpp.

◆ ERAR_END_ARCHIVE

#define ERAR_END_ARCHIVE   10

Definition at line 7 of file dll.hpp.

◆ ERAR_EOPEN

#define ERAR_EOPEN   15

Definition at line 12 of file dll.hpp.

◆ ERAR_EREAD

#define ERAR_EREAD   18

Definition at line 15 of file dll.hpp.

◆ ERAR_EREFERENCE

#define ERAR_EREFERENCE   23

Definition at line 20 of file dll.hpp.

◆ ERAR_EWRITE

#define ERAR_EWRITE   19

Definition at line 16 of file dll.hpp.

◆ ERAR_MISSING_PASSWORD

#define ERAR_MISSING_PASSWORD   22

Definition at line 19 of file dll.hpp.

◆ ERAR_NO_MEMORY

#define ERAR_NO_MEMORY   11

Definition at line 8 of file dll.hpp.

◆ ERAR_SMALL_BUF

#define ERAR_SMALL_BUF   20

Definition at line 17 of file dll.hpp.

◆ ERAR_SUCCESS

#define ERAR_SUCCESS   0

Definition at line 6 of file dll.hpp.

◆ ERAR_UNKNOWN

#define ERAR_UNKNOWN   21

Definition at line 18 of file dll.hpp.

◆ ERAR_UNKNOWN_FORMAT

#define ERAR_UNKNOWN_FORMAT   14

Definition at line 11 of file dll.hpp.

◆ RAR_DLL_VERSION

#define RAR_DLL_VERSION   8

Definition at line 34 of file dll.hpp.

◆ RAR_EXTRACT

#define RAR_EXTRACT   2

Definition at line 29 of file dll.hpp.

◆ RAR_HASH_BLAKE2

#define RAR_HASH_BLAKE2   2

Definition at line 38 of file dll.hpp.

◆ RAR_HASH_CRC32

#define RAR_HASH_CRC32   1

Definition at line 37 of file dll.hpp.

◆ RAR_HASH_NONE

#define RAR_HASH_NONE   0

Definition at line 36 of file dll.hpp.

◆ RAR_OM_EXTRACT

#define RAR_OM_EXTRACT   1

Definition at line 24 of file dll.hpp.

◆ RAR_OM_LIST

#define RAR_OM_LIST   0

Definition at line 23 of file dll.hpp.

◆ RAR_OM_LIST_INCSPLIT

#define RAR_OM_LIST_INCSPLIT   2

Definition at line 25 of file dll.hpp.

◆ RAR_SKIP

#define RAR_SKIP   0

Definition at line 27 of file dll.hpp.

◆ RAR_TEST

#define RAR_TEST   1

Definition at line 28 of file dll.hpp.

◆ RAR_VOL_ASK

#define RAR_VOL_ASK   0

Definition at line 31 of file dll.hpp.

◆ RAR_VOL_NOTIFY

#define RAR_VOL_NOTIFY   1

Definition at line 32 of file dll.hpp.

◆ RHDF_DIRECTORY

#define RHDF_DIRECTORY   0x20

Definition at line 54 of file dll.hpp.

◆ RHDF_ENCRYPTED

#define RHDF_ENCRYPTED   0x04

Definition at line 52 of file dll.hpp.

◆ RHDF_SOLID

#define RHDF_SOLID   0x10

Definition at line 53 of file dll.hpp.

◆ RHDF_SPLITAFTER

#define RHDF_SPLITAFTER   0x02

Definition at line 51 of file dll.hpp.

◆ RHDF_SPLITBEFORE

#define RHDF_SPLITBEFORE   0x01

Definition at line 50 of file dll.hpp.

◆ ROADF_COMMENT

#define ROADF_COMMENT   0x0002

Definition at line 129 of file dll.hpp.

◆ ROADF_ENCHEADERS

#define ROADF_ENCHEADERS   0x0080

Definition at line 135 of file dll.hpp.

◆ ROADF_FIRSTVOLUME

#define ROADF_FIRSTVOLUME   0x0100

Definition at line 136 of file dll.hpp.

◆ ROADF_LOCK

#define ROADF_LOCK   0x0004

Definition at line 130 of file dll.hpp.

◆ ROADF_NEWNUMBERING

#define ROADF_NEWNUMBERING   0x0010

Definition at line 132 of file dll.hpp.

◆ ROADF_RECOVERY

#define ROADF_RECOVERY   0x0040

Definition at line 134 of file dll.hpp.

◆ ROADF_SIGNED

#define ROADF_SIGNED   0x0020

Definition at line 133 of file dll.hpp.

◆ ROADF_SOLID

#define ROADF_SOLID   0x0008

Definition at line 131 of file dll.hpp.

◆ ROADF_VOLUME

#define ROADF_VOLUME   0x0001

Definition at line 128 of file dll.hpp.

◆ ROADOF_KEEPBROKEN

#define ROADOF_KEEPBROKEN   0x0001

Definition at line 138 of file dll.hpp.

Typedef Documentation

◆ CHANGEVOLPROC

typedef int(PASCAL * CHANGEVOLPROC) (char *ArcName, int Mode)

Definition at line 163 of file dll.hpp.

◆ PROCESSDATAPROC

typedef int(PASCAL * PROCESSDATAPROC) (unsigned char *Addr, int Size)

Definition at line 164 of file dll.hpp.

◆ UNRARCALLBACK

typedef int(CALLBACK * UNRARCALLBACK) (UINT msg, LPARAM UserData, LPARAM P1, LPARAM P2)

Definition at line 126 of file dll.hpp.

Enumeration Type Documentation

◆ UNRARCALLBACK_MESSAGES

Enumerator
UCM_CHANGEVOLUME 
UCM_PROCESSDATA 
UCM_NEEDPASSWORD 
UCM_CHANGEVOLUMEW 
UCM_NEEDPASSWORDW 

Definition at line 158 of file dll.hpp.

Function Documentation

◆ RARCloseArchive()

int PASCAL RARCloseArchive ( HANDLE  hArcData)

Definition at line 168 of file dll.cpp.

References DataSet::Arc, File::Close(), DataSet::Cmd, ERAR_ECLOSE, ERAR_SUCCESS, and RarErrorToDll().

◆ RARGetDllVersion()

int PASCAL RARGetDllVersion ( )

Definition at line 466 of file dll.cpp.

References RAR_DLL_VERSION.

◆ RAROpenArchive()

◆ RAROpenArchiveEx()

HANDLE PASCAL RAROpenArchiveEx ( struct RAROpenArchiveDataEx ArchiveData)

◆ RARProcessFile()

int PASCAL RARProcessFile ( HANDLE  hArcData,
int  Operation,
char *  DestPath,
char *  DestName 
)

Definition at line 420 of file dll.cpp.

References ProcessFile().

Referenced by RARReadHeaderEx().

◆ RARProcessFileW()

int PASCAL RARProcessFileW ( HANDLE  hArcData,
int  Operation,
wchar_t *  DestPath,
wchar_t *  DestName 
)

Definition at line 426 of file dll.cpp.

References ProcessFile().

◆ RARReadHeader()

◆ RARReadHeaderEx()

int PASCAL RARReadHeaderEx ( HANDLE  hArcData,
struct RARHeaderDataEx HeaderData 
)

Definition at line 209 of file dll.cpp.

References DataSet::Arc, RARHeaderDataEx::ArcName, RARHeaderDataEx::ArcNameW, ASIZE, FileHeader::atime, RARHeaderDataEx::AtimeHigh, RARHeaderDataEx::AtimeLow, BLAKE2_DIGEST_SIZE, Archive::BrokenHeader, DataSet::Cmd, RARHeaderDataEx::CmtSize, RARHeaderDataEx::CmtState, HashValue::CRC32, FileHeader::ctime, RARHeaderDataEx::CtimeHigh, RARHeaderDataEx::CtimeLow, Archive::CurBlockPos, RARHeaderDataEx::DictSize, HashValue::Digest, FileHeader::Dir, RARHeaderDataEx::DirTarget, FileHeader::DirTarget, FileHeader::Encrypted, Archive::EndArcHead, ERAR_BAD_DATA, ERAR_BAD_PASSWORD, ERAR_END_ARCHIVE, ERAR_EOPEN, ERAR_SUCCESS, Archive::FailedHeaderDecryption, RARHeaderDataEx::FileAttr, FileHeader::FileAttr, RARHeaderDataEx::FileCRC, FileHeader::FileHash, Archive::FileHead, RARHeaderDataEx::FileName, File::FileName, FileHeader::FileName, RARHeaderDataEx::FileNameW, RARHeaderDataEx::FileTime, RARHeaderDataEx::Flags, FSREDIR_NONE, RarTime::GetDos(), Archive::GetHeaderType(), RarTime::GetWin(), RARHeaderDataEx::Hash, HASH_BLAKE2, HASH_CRC32, HASH_RAR14, RARHeaderDataEx::HashType, HEAD_ENDARC, HEAD_FILE, DataSet::HeaderSize, HOST_UNIX, HOST_WIN32, RARHeaderDataEx::HostOS, FileHeader::HSType, HSYS_WINDOWS, MergeArchive(), RARHeaderDataEx::Method, FileHeader::Method, FileHeader::mtime, RARHeaderDataEx::MtimeHigh, RARHeaderDataEx::MtimeLow, EndArcHeader::NextVolume, DataSet::OpenMode, RARHeaderDataEx::PackSize, FileHeader::PackSize, RARHeaderDataEx::PackSizeHigh, RAR_HASH_BLAKE2, RAR_HASH_CRC32, RAR_HASH_NONE, RAR_OM_LIST, RAR_SKIP, RarErrorToDll(), RARProcessFile(), RARReadHeaderEx(), RARHeaderDataEx::RedirName, FileHeader::RedirName, RARHeaderDataEx::RedirNameSize, RARHeaderDataEx::RedirType, FileHeader::RedirType, RHDF_DIRECTORY, RHDF_ENCRYPTED, RHDF_SOLID, RHDF_SPLITAFTER, RHDF_SPLITBEFORE, Archive::SearchBlock(), File::Seek(), FileHeader::Solid, FileHeader::SplitAfter, FileHeader::SplitBefore, HashValue::Type, RARHeaderDataEx::UnpSize, FileHeader::UnpSize, RARHeaderDataEx::UnpSizeHigh, RARHeaderDataEx::UnpVer, FileHeader::UnpVer, Archive::Volume, wcsncpyz(), WideToChar(), and FileHeader::WinSize.

Referenced by RARReadHeader(), and RARReadHeaderEx().

◆ RARSetCallback()

void PASCAL RARSetCallback ( HANDLE  hArcData,
UNRARCALLBACK  Callback,
LPARAM  UserData 
)

Definition at line 439 of file dll.cpp.

References DataSet::Cmd.

◆ RARSetChangeVolProc()

void PASCAL RARSetChangeVolProc ( HANDLE  hArcData,
CHANGEVOLPROC  ChangeVolProc 
)

Definition at line 432 of file dll.cpp.

References DataSet::Cmd.

◆ RARSetPassword()

void PASCAL RARSetPassword ( HANDLE  hArcData,
char *  Password 
)

◆ RARSetProcessDataProc()

void PASCAL RARSetProcessDataProc ( HANDLE  hArcData,
PROCESSDATAPROC  ProcessDataProc 
)

Definition at line 447 of file dll.cpp.

References DataSet::Cmd.