I'm trying to make a DLL to use with DllCall. I'm using Dev-cpp. Here is the code: #define EXPORT __declspec(dllexport)
#include <cstdlib>
#include <cstdio>
extern "C"
{
EXPORT int teste(int argumento)
{
return 23;
}
} And a test script calling the function: $retorno = DllCall ("functions.dll","int","teste","int",10)
If @error <> 0 Then
MsgBox(0,"","Error:" & @CRLF & @error)
Else
MsgBox(0,"",$retorno[0])
EndIf It gives a "This program found a problem..." Windows screen. If I call the function without any arguments: $retorno = DllCall ("functions.dll","int","teste") it works and returns the correct value. What am I doing wrong when using arguments? Thanks.