易语言MPQ文件操作源码
系统结构:停止拖放支持,开始拖放支持,WindowProc,DropFiles,创建多级目录,取短路径,API_MakeSureDirectoryPathExists,API_GetShortPathNameA,CallWindowProc,DragAcceptFiles,DragQueryFile,DragFinish,SetWindowLong,SF打开MPQ文件,SF检测MPQ里的文件是否存在,SF打开MPQ里的文件,SF读取MPQ里的文件大小,SF读取MPQ里的文件内容,SF直接读取MPQ里的文件,SF关闭MPQ文件,SF关闭MPQ里的文件,Storm_SFileOpenArchive,Storm_SFileCloseArchive,Storm_SFileOpenFileEx,Storm_SFileFileExistsEx,Storm_SFileCloseFile,Storm_SFileGetFileSize,Storm_SFileReadFile,Storm_SFileDestroy,
======程序集1
| |
| |------ _启动子程序
| |
| |------ 停止拖放支持
| |
| |------ 开始拖放支持
| |
| |------ WindowProc
| |
| |------ DropFiles
| |
| |
======窗口程序集1
| |
| |------ _窗口1_创建完毕
| |
| |------ _窗口1_将被销毁
| |
| |------ _窗口1_可否被关闭
| |
| |------ _窗口1_尺寸被改变
| |
| |------ _打开_被选择
| |
| |------ _关闭_被选择
| |
| |------ _退出_被选择
| |
| |------ _扫描文件_被选择
| |
| |------ _解压缩_被选择
| |
| |------ _关于_被选择
| |
| |------ _导出列表_被选择
| |
| |------ _列表框_文件_列表项被选择
| |
| |------ _列表框_文件_鼠标右键被按下
| |
| |------ _按钮_全选_被单击
| |
| |------ _按钮_过滤_被单击
| |
| |------ 创建多级目录
| |
| |------ 取短路径
| |
| |
======调用的Dll
| |
| |---[dll]------ API_MakeSureDirectoryPathExists
| |
| |---[dll]------ API_GetShortPathNameA
| |
| |---[dll]------ CallWindowProc
| |
| |---[dll]------ DragAcceptFiles
| |
| |---[dll]------ DragQueryFile
| |
| |---[dll]------ DragFinish
| |
| |---[dll]------ SetWindowLong
======程序集1
| |
| |------ _启动子程序
| |
| |------ _临时子程序
| |
| |------ SF打开MPQ文件
| |
| |------ SF检测MPQ里的文件是否存在
| |
| |------ SF打开MPQ里的文件
| |
| |------ SF读取MPQ里的文件大小
| |
| |------ SF读取MPQ里的文件内容
| |
| |------ SF直接读取MPQ里的文件
| |
| |------ SF关闭MPQ文件
| |
| |------ SF关闭MPQ里的文件
| |
| |
======调用的Dll
| |
| |---[dll]------ Storm_SFileOpenArchive
| |
| |---[dll]------ Storm_SFileCloseArchive
| |
| |---[dll]------ Storm_SFileOpenFileEx
| |
| |---[dll]------ Storm_SFileFileExistsEx
| |
| |---[dll]------ Storm_SFileCloseFile
| |
| |---[dll]------ Storm_SFileGetFileSize
| |
| |---[dll]------ Storm_SFileReadFile
| |
| |---[dll]------ Storm_SFileDestroy
调用的DLL命令:
.DLL命令 API_MakeSureDirectoryPathExists, 整数型, "IMAGEHLP.DLL", "MakeSureDirectoryPathExists", , 创建多级目录,DirPath完整路径的最后一个字符必须是\
.参数 DirPath, 文本型, , 最后一个目录要以\结尾,例如 D:\123\322\332\22231\
.DLL命令 API_GetShortPathNameA, 整数型, "kernel32", "GetShortPathNameA", , 获取指定文件的短路径名 装载到lpszShortPath缓冲区的字符数量。如lpszShortPath的长度不足,不能容下文件名,就返回需要的缓冲区长度
.参数 路径, 文本型, , 指定欲获取短路径名的那个文件的名字。可以是个完整路径,或者由当前目录决定
.参数 缓冲区, 文本型, , 指定一个缓冲区,用于装载文件的短路径和文件名
.参数 缓冲区长度, 整数型, , lpszShortPath缓冲区长度;
.DLL命令 CallWindowProc, 整数型, "user32", "CallWindowProcA"
.参数 lpPrevWndFunc, 子程序指针
.参数 hWnd, 整数型
.参数 Msg, 整数型
.参数 wParam, 整数型
.参数 lParam, 整数型
.DLL命令 DragAcceptFiles, 整数型, "shell32.dll", "DragAcceptFiles"
.参数 hwnd, 整数型
.参数 fAccept, 整数型
.DLL命令 DragQueryFile, 整数型, "shell32.dll", "DragQueryFileA"
.参数 hDrop, 整数型
.参数 iFile, 整数型
.参数 lpszFile, 字节集
.参数 cch, 整数型
.DLL命令 DragFinish, 整数型, "shell32.dll", "DragFinish"
.参数 hDrop, 整数型
.DLL命令 SetWindowLong, 子程序指针, "user32", "SetWindowLongA"
.参数 hwnd, 整数型
.参数 nIndex, 整数型
.参数 dwNewLong, 子程序指针
调用的DLL命令:
.DLL命令 Storm_SFileOpenArchive, 逻辑型, "Storm.dll", "#266"
.参数 lpFileName, 文本型
.参数 dwPriority, 整数型, , 0
.参数 dwFlags, 整数型, , 0
.参数 hMPQ, 整数型, 传址, 返回句柄
.DLL命令 Storm_SFileCloseArchive, 逻辑型, "Storm.dll", "#252", , 关闭MPQ文件
.参数 hMPQ, 整数型
.DLL命令 Storm_SFileOpenFileEx, 逻辑型, "Storm.dll", "#268"
.参数 hMPQ, 整数型
.参数 lpFileName, 文本型
.参数 dwSearchScope, 整数型, , 0
.参数 hFile, 整数型, 传址, 返回打开句柄
.DLL命令 Storm_SFileFileExistsEx, 整数型, "Storm.dll", "#289", , 文件是否存在,失败返回0
.参数 hMPQ, 整数型
.参数 lpszFileName, 文本型
.参数 grfSearchScope, 整数型, , 0
.DLL命令 Storm_SFileCloseFile, 逻辑型, "Storm.dll", "#253", , 关闭已经打开的MPQ里面的文件
.参数 hFile, 整数型
.DLL命令 Storm_SFileGetFileSize, 整数型, "Storm.dll", "#265", , 取文件大小
.参数 hFile, 整数型
.参数 lpFileSizeHigh, 整数型, , 0
.DLL命令 Storm_SFileReadFile, 逻辑型, "Storm.dll", "#269", , 读取文件
.参数 hFile, 整数型
.参数 lpBuffer, 字节集, 传址, 存放读取的内容,需分配空间
.参数 nNumberOfBytesToRead, 整数型, , 要读取的字节数,SFileGetFileSize取得
.参数 lpNumberOfBytesRead, 整数型, 传址, 实际读取字节数,跟前面一样
.参数 lpOverlapped, 整数型, , 0
.DLL命令 Storm_SFileDestroy, 逻辑型, "Storm.dll", "#262", , 初始化,放在最前面
注:本站源码主要来源于网络收集。如有侵犯您的利益,请联系我们,我们将及时删除!
部分源码可能含有危险代码,(如关机、格式化磁盘等),请看清代码在运行。
由此产生的一切后果本站均不负责。源码仅用于学习使用,如需运用到商业场景请咨询原作者。
使用本站源码开发的产品均与本站无任何关系,请大家遵守国家相关法律。