Einzelnen Beitrag anzeigen

Benutzerbild von Dalai
Dalai

Registriert seit: 9. Apr 2006
1.680 Beiträge
 
Delphi 5 Professional
 
#11

Re: CMD-Ausgabe von chkdsk, wget usw. ordentlich?

  Alt 2. Jun 2009, 01:33
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
  Mit Zitat antworten Zitat