Ich hätte wohl doch den Deklarationsteil bzw. Kopf der Methode nicht weglassen sollen *seufz*:
Delphi-Quellcode:
procedure TDosThread.FExecute;
const
MaxBufSize = 1024;
var
pBuf: ^TCharBuffer; //i/o buffer
iBufSize: Cardinal;
app_spawn: PChar;
si: STARTUPINFO;
sa: PSECURITYATTRIBUTES; //security information for pipes
sd: PSECURITY_DESCRIPTOR;
pi: PROCESS_INFORMATION;
newstdin, newstdout, read_stdout, write_stdin: THandle; //pipe handles
Exit_Code: LongWord; //process exit code
bread: LongWord; //bytes read
avail: LongWord; //bytes available
Str, Last: string;
I, II: LongWord;
LineBeginned: Boolean;
Davon abgesehen wird pBuf^ in genau der Art schon verwendet. Wenn ich pBuf statt pBuf^ als Paramter in die Funktion OemToChar() schreibe, dann meckert der Compiler, das passt also schon so. Und funktionieren tut es ja auch, aber eben nicht zuverlässig.
MfG Dalai