Click here to download this DLL file
?
The function declaration in .NET:
Public static extern int myzip_addfile (String srcfile);
Public static extern int myzip_adddirectory (string srcpath, string zipfile);
Public static extern int myzip_extractfileAll (String Zipfile, String Pathname);
Public static extern int myzip_extractfile (string zipfile, string srcname, string dstname);
?
(Compressed file)
Function myzip_addfile (srcfile, zipfile: pchar): integer; stdcall;
Function: Add file srcfile to the compressed document zipfile
Parameters: SRCFILE ????? to be compressed file (full path)
?????? zipfile ?????? Target file (full path)
Return: <0 ???????????
??????> 0 ??????????? success
Description: The same name file will be automatically replaced (OVERWRITE)
?
2. (Compressed Directory)
Function myzip_adddirectory (srcpath, zipfile: pchar): integer; stdcall;
Function: Add all files (subdirectory) in the directory SRCPATH to the compressed document zipfile
Parameters: srcpath ????? Standby Resistment Directory (full path)
?????? zipfile ?????? Target file (full path)
Return: <0 ???????????
??????> 0 ??????????? success
Description: The same name file will be automatically replaced (OVERWRITE)
?
(Unzipped all files in the shrink)
Function myzip_extractfileAll (zipfile, Pathname: Pchar): integer; stdcall;
Function: Unpack all files contained in ZipFile to folder Pathname
Parameters: zipfile ????? Compressed file (full path)
?????? Pathname ????? file output path (if not, you automatically create this directory)
Return: <0 ???????????
?????? = 0 ??????????? The compressed file is not included in any file
??????> 0? ?????????? Unpacking file number
Description: The same name file will be automatically replaced (OVERWRITE)
?
2. (Unzip the specified file in the zoom)
Function myzip_extractfile (zipfile, srcname, dstname: pchar): integer; stdcall;
Function: Unpack the file specified by srcname from zipfile to the target file specified by Dstname
Parameters: zipfile ????? Compressed file (full path)
?????? srcname ?????? Need to unpack the file (not included with the path)
?????? dstname ?????? Target file (full path)
Return: <0 ???????????
?????? = 0 ??????????? the compressed file is not included in the SRCNAME
??????> 0 ??????????? success
Description: The same name file will be automatically replaced (OVERWRITE)
?
1. (error message)
Function myzip_getlasterror (out msg: shortstring): integer; stdcall;
Function: In the process of compression / decompression, if there is an error occurs, you can immediately call the function to get the relevant error message and return by MSG.
Parameters: MSG ?????????? Used to return related error information
Return: <0 ???????????
??????> 0 ??????????? success
??