#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.