AutoIT 调用dll

来源:互联网 发布:怎么重装windows xp 编辑:程序博客网 时间:2024/06/10 16:25
AutoIT code:
#cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.8.1 Author:         Tody Guo Script Function:DllCall function test from dll, and the dll file is complied by GCC#ce ----------------------------------------------------------------------------; Script Start - Add your code below here$return=DllCall("dlltest.dll", "str", "pTest");if @error = 0 Then   MsgBox(48, "Ok", $return[0])EndIf


gcc --shared -o dlltest.dll dlltest.c

#include <stdio.h>char *pTest(void){printf("Here comes a good news from dlltest\r\n");return "String from dlltest";}

use SciTE editor complied au3 file.

comes a function invoke is ok.



原创粉丝点击