Public feed
#602809
; Attribute VB_Name = "AceFnc"
; ================================================================================
; ============--- Part 4: Functions supported by the AceV2.Dll ---===============
; ================================================================================
XIncludeFile "Strucs.pbi"
; ---------------------------------------------------------------------------
;
; AceV2.Dll function support goes beyond UnAceV2.Dll by these functions:
;
; ACEDelete
; ACEAdd
; ACEReadSFXData
; ACERepair
; ACESetComments
; ACEEncryptFiles
; ACEAddSFX
; ACELock
; ACEAddRecoveryRecord
; ACEAddAV (not supported in ACL)
; ACERegister (not supported in ACL)
; ACEShowRegisterDialog (not supported in ACL)
;
; Look up on UNACE.H for information about Dll initialization and function
; return codes!
;
; ---------------------------------------------------------------------------
;
; Contents:
; Part 4.1: TimeSet defines
; Part 4.2: SFX module name defines
; Part 4.3: functions and parameter structures
;
; ---------------------------------------------------------------------------
; ===========================================================================
; =====================--- Part 4.1: TimeSet defines ---===================
; ===========================================================================
; Set the TimeSet fields to one of these values.
; ---------------------------------------------------------------------------
#ACE_SETTIME_MODIFY = 0 ; set archive time to current
; system time
#ACE_SETTIME_KEEP = 1 ; keep archive time
#ACE_SETTIME_L = 2 ; set archive time to time of
; freshest file in archive
; ===========================================================================
; =================--- Part 4.2: SFX module name defines ---===============
; ===========================================================================
; ========================== SFX module defines =========================
; Specify a SFX module name to add an SFX using ACEAddSFX() or ACEAdd().
; (SFX-file name/ACE_SFXMODULE_NONE/ACE_SFXMODULE_DEFAULT)
; (see description of these constants)
; -------------------------------------------------------------------------
#ACE_SFX_NONE = "none" ; do not add an SFX
#ACE_SFX_DEFAULT = "default" ; add defaul SFX (DOS-SFX
; with LFN support)
; ===========================================================================
; ============--- Part 4.3: functions and parameter structures ---==========
; ===========================================================================
; =========================== ACEDelete =================================
; Remove files from archive.
; -------------------------------------------------------------------------
; -----------------------------------------------------------------------
; ACEDelete() parameter structure.
; -----------------------------------------------------------------------
Structure tACEDeleteStruc
Files . tACEFilesStruc ; specifies files to delete;
; see tACEFilesStruc structure
DecryptPassword .l ; Password for decryption (if files
; are encrypted);
; zero-terminated string,
; c.e-sensitive (maxlen=56)
CompressParams . tACECompressParamsStruc ; compression parameters
; needed at solid archives only
; (for repacking of files)
TimeSet .l ; see ACE_SETTIME constants
Reserved.b[64] ; h. to be filled with zeroes
EndStructure
; -----------------------------------------------------------------------
; ACEDelete() function declaration.
; -----------------------------------------------------------------------
; INT __stdcall ACEDelete(LPSTR ArchiveName, pACEDeleteStruc Delete);
; ============================ ACEAdd ===================================
; Add files to an archive. Create new archive if it does not exist.
; If MainCmt is non-zero, then a comment is taken from CmtBuf at
; creation to become the main comment. This function can work in
; different modes: normal add, move, update, fresh
; (See sACEAddStruc.AddMode)
; -------------------------------------------------------------------------
; -----------------------------------------------------------------------
; Tells ACEAdd() how to perform the add operation.
; -----------------------------------------------------------------------
#ACE_ADD_MODE_ADD = 0 ; normal add operation
#ACE_ADD_MODE_MOVE = 1 ; move files to archive
; (delete after add)
#ACE_ADD_MODE_FRESH = 2 ; add modified files only
#ACE_ADD_MODE_UPDATE = 3 ; add modified and new files only
; -----------------------------------------------------------------------
; Volume size defines.
; -----------------------------------------------------------------------
#ACE_VOLUME_NONELO = -1 ; do not create a multi volume
#ACE_VOLUME_NONEHI = -1 ; archive
#ACE_VOLUME_AUTOLO = -2 ; determine volume size by space
#ACE_VOLUME_AUTOHI = -1 ; on destination disk
; -----------------------------------------------------------------------
; Defines how the paths of archived files are stored in the archive.
; ---------------------------------------------------------------------------
#ACE_SAVEPATH_RECURSED = 0 ; do not save the part of the path
; specified in the file list
#ACE_SAVEPATH_NONE = 1 ; do not save any path (exclude)
#ACE_SAVEPATH_FULL = 2 ; save full path without drive
#ACE_SAVEPATH_DRIVE = 3 ; save full path with drive letter
; -----------------------------------------------------------------------
; ACEAdd() parameter structure.
; -----------------------------------------------------------------------
Structure tACEAddStruc
Files . tACEFilesStruc ; specifies files to add;
; see tACEFilesStruc structure
DestinationDir .l ; archive directory to add files to
Mode .l ; see ACE_ADD_MODE defines
SavePath .l ; see ACE_SAVEPATH defines
EncryptPassword .l ; encryption and decryption Passwords,
DecryptPassword .l ; c.e-sensitive (maxlen=56)
CompressParams . tACECompressParamsStruc ; compression parameters
MainComment .l ; add main comment at archive creation
; (use the comment buffer you
; initialized at ACEInitDll())
Solid .l ; create solid archives
Lock .l ; lock archive after creation
RecoveryRecord .l ; add recovery record after creation
AV .l ; add AV to archive (if registered)
; not used in ACL
VolumeSizeLo .l ; ACE_VOLUME_NONE, ACE_VOLUME_AUTO
VolumeSizeHi .l ; or any other value being treated
; . absolute volume size in bytes
SFXName .l ; set SFXName to ACE_SFX_NONE if
; you do not want to add a SFX
TimeSet .l ; see ACE_SETTIME constants
Reserved.b[64] ; h. to be filled with zeroes
EndStructure
; -----------------------------------------------------------------------
; ACEAdd() function declaration.
; -----------------------------------------------------------------------
; INT __stdcall ACEAdd(LPSTR ArchiveName, pACEAddStruc Add);
; ========================= ACEReadSFXData ==============================
; Retrieves information from a SFX module
; (stored in *.SFX files or default SFX).
; -------------------------------------------------------------------------
; -----------------------------------------------------------------------
; Constants to be used for the LanguageIndex field of
; tACEReadSFXDat.truc.
; -----------------------------------------------------------------------
#ACE_READSFXDATA_ENGLISH = 0
#ACE_READSFXDATA_GERMAN = 1
#ACE_READSFXDATA_DUTCH = 2
#ACE_READSFXDATA_SPANISH = 3
#ACE_READSFXDATA_RUSSIAN = 4
#ACE_READSFXDATA_POLISH = 5
#ACE_READSFXDATA_PORTUGUESE = 6
#ACE_READSFXDATA_FINNISH = 7
#ACE_READSFXDATA_ROMANIAN = 8
#ACE_READSFXDATA_CZECH = 9
; -----------------------------------------------------------------------
; ACEReadSFXData() parameter structure.
; -----------------------------------------------------------------------
Structure tACEReadSFXDatastruc
LanguageIndex .l ; specifies which language to read
; out of the SFX Header (titles,
; description)
ShortTitle .l ; returns short title of SFX module
; (maxlen=9)
MediumTitle .l ; returns medium title of SFX module
; (maxlen=23)
LongTitle .l ; returns long title of SFX module
; (maxlen=45)
Description .l ; returns description of SFX module
; (maxlen=513)
Start .l ; returns start of module within the
; file
Size .l ; returns size of the module
Reserved.b[64] ; h. to be filled with zeroes
EndStructure
; -----------------------------------------------------------------------
; ACEReadSFXData() function declaration.
; -----------------------------------------------------------------------
; INT __stdcall ACEReadSFXData(LPSTR SFXName,
; pACEReadSFXDat.truc SFXData);
; ============================ ACERepair ================================
; Recover files of a (broken) archive. If there is a recovery record -
; it is very likely that the archive can be fully repaired.
; -------------------------------------------------------------------------
; -----------------------------------------------------------------------
; ACERepair() parameter structure.
; -----------------------------------------------------------------------
Structure tACERepairStruc
RepairedArchiveName .l ; file name of repaired archive
Reserved.b[64] ; h. to be filled with zeroes
EndStructure
; -----------------------------------------------------------------------
; ACERepair() function declaration.
; -----------------------------------------------------------------------
; INT __stdcall ACERepair(LPSTR ArchiveName, pACERepairStruc Repair);
; ========================= ACESetComments ==============================
; Sets the comment(s) of an archive. If the FileList field h. been set
; to NULL or no file h. been specified, the main comment is going to be
; modified - otherwhise the comments of the specified files.
; The comments may be changed at StateCallbackProc.
; -------------------------------------------------------------------------
; -----------------------------------------------------------------------
; ACESetComments() parameter structure.
; -----------------------------------------------------------------------
Structure tACESetCommentsStruc
Files . tACEFilesStruc ; files to set comments of;
; see tACEFilesStruc structure;
; if Files.FileList is NULL, then the
; main comment will be modified
TimeSet .l ; see ACE_SETTIME constants
Reserved.b[64] ; h. to be filled with zeroes
EndStructure
; -----------------------------------------------------------------------
; ACESetComments() function declaration.
; -----------------------------------------------------------------------
; INT __stdcall ACESetComments(LPSTR ArchiveName,
; pACESetCommentsStruc SetComments);
; ========================= ACEEncryptFiles =============================
; Encrypt specified files of archive using the given Password.
; -------------------------------------------------------------------------
; -----------------------------------------------------------------------
; ACEEncryptFiles() parameter structure.
; -----------------------------------------------------------------------
Structure tACEEncryptFilesStruc
Files . tACEFilesStruc ; files to encrypt/decrypt
; see tACEFilesStruc structure;
EncryptPassword .l ; if empty, the files will be
; decrypted (if they were encrypted)
; (maxlen=56)
DecryptPassword .l ; already encrypted files will have
; to be decrypted before being
; encrypted with the new Password
TimeSet .l ; see ACE_SETTIME constants
Reserved.b[64] ; h. to be filled with zeroes
EndStructure
; -----------------------------------------------------------------------
; ACEEncryptFiles() function declaration.
; -----------------------------------------------------------------------
; INT __stdcall ACEEncryptFiles(LPSTR ArchiveName,
; pACEEncryptFilesStruc EncryptFiles);
; =========================== ACEAddSFX =================================
; Add SFX module to archive.
; -------------------------------------------------------------------------
; -----------------------------------------------------------------------
; ACEAddSFX() parameter structure.
; -----------------------------------------------------------------------
Structure tACEAddSFXStruc
SFXName .l ; set SFXName to ACE_SFX_DEFAULT if
; you want to add the default SFX
; module
SFXArchiveName .l ; returns the new name of the archive
; (should be *.exe)
TimeSet .l ; see ACE_SETTIME constants
Reserved.b[64] ; h. to be filled with zeroes
EndStructure
; -----------------------------------------------------------------------
; ACEAddSFX() function declaration.
; -----------------------------------------------------------------------
; INT __stdcall ACEAddSFX(LPSTR ArchiveName,
; pACEAddSFXStruc AddSFXModule);
; ============================ ACELock ==================================
; Lock archiv, so that it can not be modified any more.
; -------------------------------------------------------------------------
; -----------------------------------------------------------------------
; ACELock() parameter structure.
; -----------------------------------------------------------------------
Structure tACELockStruc
TimeSet .l ; see ACE_SETTIME constants
Reserved.b[64] ; h. to be filled with zeroes
EndStructure
; -----------------------------------------------------------------------
; ACELock() function declaration.
; -----------------------------------------------------------------------
; INT __stdcall ACELock(LPSTR ArchiveName, pACELockStruc Lock);
; ====================== ACEAddRecoveryRecord ===========================
; Adds recovery record to archive.
; -------------------------------------------------------------------------
; -----------------------------------------------------------------------
; ACEAddRecoveryRecord() parameter structure.
; -----------------------------------------------------------------------
Structure tACEAddRecoveryRecordStruc
TimeSet .l ; see ACE_SETTIME constants
Reserved.b[64]
EndStructure
; -----------------------------------------------------------------------
; ACEAddRecoveryRecord() function declaration.
; -----------------------------------------------------------------------
; INT __stdcall ACEAddRecoveryRecord(LPSTR ArchiveName,
; pACEAddRecoveryRecordStruc AddRecoveryRecord);
; ============================ ACEAddAV =================================
; Add AV to archive. (not supported in ACL)
; -------------------------------------------------------------------------
; -----------------------------------------------------------------------
; ACEAddAV() parameter structure.
; -----------------------------------------------------------------------
Structure tACEAddAVStruc
TimeSet .l ; see ACE_SETTIME constants
Reserved.b[64]
EndStructure
; -----------------------------------------------------------------------
; ACEAddAV() function declaration.
; -----------------------------------------------------------------------
; INT __stdcall ACEAddAV(LPSTR ArchiveName, pACEAddAVStruc AddAV);