函数参考


DllClose

关闭此前打开的DLL文件.

DllClose ( dll句柄 )

参数

dll句柄 目标 DLL 的句柄,可由此前调用 DllOpen 函数的返回值获得.

返回值

None.

注意/说明

在脚本程序终止运行时,AutoIt 会自动关闭所有由脚本打开的 DLL 文件;当然了,显式调用 DllClose 函数来关闭 DLL 文件始终是推荐方式.

相关

DllCall, DllOpen

示例/演示


Local $dll = DllOpen("user32.dll")
Local $result
$result = DllCall($dll, "int", "MessageBoxW", "hwnd", 0, "wstr", "若干文本", "wstr", "若干标题", "int", 0)
$result = DllCall($dll, "int", "MessageBoxA", "hwnd", 0, "str", "若干文本", "str", "若干标题", "int", 0)
$result = DllCall($dll, "int", "MessageBox", "hwnd", 0, "str", "若干文本", "str", "若干标题", "int", 0)
DllClose($dll)