There are now several entry points to the dll.
There is a single "unzipping" entry point of:
int WINAPI Wiz_SingleEntryUnzip(int ifnc, char **ifnv, int xfnc, char **xfnv,
LPDCL lpDCL, LPUSERFUNCTIONS lpUserFunc)
where the arguments are:
ifnc = number of file names being passed. If all files are to be
extracted, then this can be zero.
ifnv = file names to be unarchived. Wildcard patterns are recognized
and expanded. If all files are to be extracted, then this can
be NULL.
xfnc = number of "file names to be excluded from processing" being
passed. If all files are to be extracted, set this to zero.
xfnv = file names to be excluded from the unarchiving process. Wildcard
characters are allowed and expanded. If all files are to be
extracted, set this argument to NULL.
lpDCL = pointer to a structure with the flags for setting the
various options, as well as the zip file name.
lpUserFunc = pointer to a structure that contains pointers to functions
in the calling application, as well as sizes passed back to
the calling application etc. See below for a detailed description
of all the parameters.
The DCL structure is shown below:
typedef struct {
int ExtractOnlyNewer = true for "update" without interaction
(extract only newer/new files, without queries)
int SpaceToUnderscore = true if convert space to underscore
int PromptToOverwrite = true if prompt to overwrite is wanted
int fQuiet = quiet flag:
0 = all messages, 1 = few messages, 2 = no messages
int ncflag = write to stdout if true
int ntflag = test zip file
int nvflag = verbose listing
int nfflag = "freshen" (replace existing files by newer versions)
int nzflag = display zip file comment
int ndflag = controls (sub)directory recreation during extraction
0 = junk paths from filenames
1 = "safe" usage of paths in filenames (skip "../")
2 = allow also unsafe path components (dir traversal)
int noflag = true if you are to always overwrite existing files
int naflag = do end-of-line translation
int nZIflag = get ZipInfo if TRUE
int C_flag = be case insensitive if TRUE
int fPrivilege = 1 => restore ACLs in user mode,
2 => try to use privileges for restoring ACLs
LPSTR lpszZipFN = zip file name
LPSTR lpszExtractDir = directory to extract to. This should be NULL if you
are extracting to the current directory.
} DCL, far * LPDCL;
REMARKS:
The four extract-mode flags ExtractOnlyNewer, nfflag, PromptToOverwrite, and
noflag control which of the selected archive entries are actually processed.
They are mapped to UnZip's command line qualifiers "-u", "-f", "-o", "-n"
according to the following decision matrix:
_____________________________________________________________________
| UnZip 1)|| Extract- | nfflag | noflag | PrompTo- | lpUserFunc |
| options || OnlyNewer | | | Overwrite | ->replape() |
=====================================================================
| none 2) || false | false | false | true |queryfunc() 5)|
| -o || false | false | true | false | N/A |
| -n || false | false | false | false | N/A |
|---------||-----------|--------|--------|-----------|--------------|
| -u || true | false | false | true |queryfunc() 5)|
| -uo || true | false | true | false | N/A |
| -un 3) || true | false | false | false | N/A |
|---------||-----------|--------|--------|-----------|--------------|
| -f || N/A | true | false | true |queryfunc() 5)|
| -fo || N/A | true | true | false | N/A |
| -fn 4) || N/A | true | false | false | N/A |
---------------------------------------------------------------------
Legend: true: integer number <> 0
false: integer number 0
N/A: not applicable, could be set to any value
NOTES:
1) The UnZip options are explained in the generic UnZip manual, see
"unzip.txt" or "man/unzip.1".
2) no options from the set "ufno" are specified.
3) -un is functionally equivalent to -n
4) -fn is functionally equivalent to "do nothing", so this combination
does not make sense.
5) queryfunc() is a callback function provided by the caller of the
unzip dll that may return one of the following result keys:
IDM_REPLACE_NO, IDM_REPLACE_YES,
IDM_REPLACE_ALL, IDM_REPLACE_NONE,
IDM_REPLACE_RENAME
(IDM_REPLACE_TEXT, IDM_REPLACE_HELP are defined but not used)
UnZip's internal code treats a "NULL" lpUserFunc->replace() function
pointer as "{return IDM_REPLACE_NONE}". However, currently, the windll
interface checks for this function pointer to be not NULL and signals
a fatal error if this condition is not fulfilled.
The typedef's for the function pointers in the structure USERFUNCTIONS
are shown immediately below.
typedef unsigned short ush;
typedef int (WINAPI DLLPRNT) (LPSTR, unsigned long);
typedef int (WINAPI DLLPASSWORD) (LPSTR, int, LPCSTR, LPCSTR);
typedef int (WINAPI DLLSERVICE) (LPSTR, unsigned long);
typedef void (WINAPI DLLSND) (void);
typedef int (WINAPI DLLREPLACE)(LPSTR);
typedef void (WINAPI DLLMESSAGE)(unsigned long, unsigned long, unsigned,
unsigned, unsigned, unsigned, unsigned, unsigned,
char, LPSTR, LPSTR, unsigned long, char);
Structure USERFUNCTIONS
typedef struct {
DLLPRNT *print; = a pointer to the application's print routine.
DLLSND *sound; = a pointer to the application's sound routine. This
can be NULL if your application doesn't use
sound.
DLLREPLACE *replace = a pointer to the application's replace routine.
DLLPASSWORD *password = a pointer to the application's password routine.
DLLMESSAGE *SendApplicationMessage = a pointer to the application's routine
for displaying information about specific files
in the archive. Used for listing the contents of
an archive.
DLLSERVICE *ServCallBk = Callback function designed to be used for
allowing the application to process Windows messages,
or canceling the operation, as well as giving the
option of a progress indicator. If this function
returns a non-zero value, then it will terminate
what it is doing. It provides the application with
the name of the name of the archive member it has
just processed, as well as it's original size.
NOTE: The values below are filled in only when listing the contents of an
archive.
unsigned long TotalSizeComp = value to be filled in by the dll for the
compressed total size of the archive. Note this
value does not include the size of the archive
header and central directory list.
unsigned long TotalSize = value to be filled in by the dll for the total
size of all files in the archive.
unsigned long CompFactor = value to be filled in by the dll for the overall
compression factor. This could actually be computed
from the other values, but it is available.
unsigned long NumMembers = total number of files in the archive.
WORD cchComment; = flag to be set if archive has a comment
} USERFUNCTIONS, fa
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
在网上下载了远程监视桌面的VNC源码, 源码过于庞大了,还要安装Direct SDK太麻烦..折腾了一两天,整了一个简洁版;就只保留了windows平台下的 服务端winvnc(被监视端)和客户端vncviewer(监视端)... 也就保留了VS2010工程文件.. 其中有一个静态库需要编译汇编代码, 在网上下载nasm.exe放到vs2010安装目录VC/bin下即可...
资源推荐
资源详情
资源评论



















收起资源包目录





































































































共 674 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7
资源评论



jerry_agle
- 粉丝: 15
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- 【IOS应用源码】很精致的范围选择组件.zip
- 【IOS应用源码】很感恩---samplecode(end)归档 7.zip
- 【IOS应用源码】很炫的抽屉式侧边栏导航效果.zip
- 【IOS应用源码】很炫的底部导航.zip
- 【IOS应用源码】很炫的翻页效果.zip
- 【IOS应用源码】横向滚动的label.zip
- 【IOS应用源码】横条显示滚动的股票动态.zip
- 【IOS应用源码】黄色背景的警告提示弹出条.zip
- 【IOS应用源码】后台运行(Multitasking)以及本地通知(Local Notifications) 有图,有书,有代码,统一打包 BackgroundDemo(Beta4Fixed).zip
- 基于Matlab Simulink的风轮机发电系统多模块建模与仿真研究 v1.2
- 【IOS应用源码】华丽的创意和设计 26款经典iPhone开源应用.zip
- 【IOS应用源码】获取当前硬件可用内存的例子UIDevice.zip
- 【IOS应用源码】获取全球当前所有时区的当前时间TestTimeZone.zip
- 【IOS应用源码】加载器(当下载或加载缓存时候用的进度条).zip
- 【IOS应用源码】记事本界面.zip
- 【IOS应用源码】简单的google应用demo.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制
