Ja ich wollte in C++ ne DLL erstellen die mir einen simplen strings zurückgibt die seiht dan so aus.
C
#include <stdio.h>
#include <conio.h>
#include <vcl.h>
#include <string>
#include <iostream>
using namespace std;
#pragma argsused
int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void* lpReserved)
{
return 1;
}
//---------------------------------------------------------------------------
extern "C" _stdcall string DLLversion ()
{
string DLLversion = "0.0.0.1";
return DLLversion;
}
Alles anzeigen
Der Autoit Aufruf
[autoit]$return = DllCall ( "Project1.dll", "int", "DLLversion")
If @error Then
MsgBox(0,"","Fehlercode : "&@error)
Else
MsgBox(0,"",$return[0])
EndIf
Problem :
Autoit schmiert ab
Windows hat ein fehler festgestellt und muss AutoIT.exe beenden
Kann mir vlt wer sagen worans liegt ?