Here you work with AnsiChar:
Delphi-Quellcode:
function DIE_scanA(pszFileName, pszOutBuffer: PAnsiChar; nOutBufferSize: Cardinal; nFlags: Cardinal): Integer; stdcall;
external 'diedll.dll' name 'DIE_scanA';
But this is
not Ansi:
Delphi-Quellcode:
var
Buffer: array [0..1023] of Char;
Try this instead
Delphi-Quellcode:
var
Buffer: array [0..1023] of AnsiChar;
but maybe there are other problems.