Nicht Funktionierendes Beispiel:
AutoIt:
Code:
$string="h"
$Returned=DllCall("Dll-Test.dll","char:cdecl","string","char",$string)
MsgBox(0,"DLL-Test",$Returned)
Code:
extern "C"
{
std::string __declspec (dllexport) MyString (string a)
{
return a;
}
}
Funktionierendes Beispiel:
AutoIt:
Code:
$a=10
$b=5
$add=DllCall("DLLTutorial.dll","double:cdecl","add","double",$a, "double", $b)
MsgBox(0,"DLL-Test",$a&"+"&$b& " is:"&$add[0])
Code:
extern "C" double __declspec(dllexport) add (double a, double b)
{
return a+b;
}
Lg







