打开供 DllCall 函数使用的 DLL 文件.
DllOpen ( "文件名" )
文件名 | 目标 DLL 文件名. |
成功: | 返回目标 DLL 句柄, 用于后面 DLL 函数调用. |
失败: | 返回 -1, 发生错误. |
Local $dll
= DllOpen("user32.dll")
Local $result
= DllCall($dll, "int", "MessageBox", "hwnd", 0, "str", "若干文本", "str", "若干标题", "int", 0)
DllClose($dll)
Local $dll
= DllOpen("user32.dll")
Local $result
= DllCall($dll, "int", "MessageBoxW", "hwnd", 0, "wstr", "1-文本", "wstr", "标题-1", "int", 0)
Local $result
= DllCall($dll, "int", "MessageBoxA", "hwnd", 0, "str", "2-文本", "str", "标题-2", "int", 0)
Local $result
= DllCall($dll, "int", "MessageBox", "hwnd", 0, "str", "3-文本", "str", "标题-3", "int", 0)
DllClose($dll)
provider with jb51.net (unicode) |