Versuch es mal so: (ungertestet)
Delphi-Quellcode:
type
TERROR = packed Record
Long1 : LongWord;
Long2 : LongWord;
Byte1 : BYTE;
Byte2 : BYTE;
Byte3 : BYTE;
end;
type
ErrorStr = Array[0..1024-1] of AnsiChar;
function Get_Error_Text(var aError: TERROR; aLanguage: PAnsiChar; var aErrStr: ErrorStr): LongWord;stdcall;external 'ExterneDLL.dll';
procedure Button1Click;
Const
ErrLanguage : AnsiString = 'English';
var
ErrClass : LongWord;
ErrStruct : TERROR;
ErrStr : ErrorStr;
myErrorstring : String;
begin
ErrClass := Get_Error_Text(ErrStruct, PansiChar(ErrLanguage), ErrStr);
myErrorstring := String(AnsiString(ErrStr));
ShowMessage( myErrorstring);
end;