Habe diesen Code hier im Forum gefunden:
Delphi-Quellcode:
procedure StatusProc(buffer: Pointer; len, user: DWORD); stdcall;
begin
if (buffer <> nil) and (len = 0) then
Form1.Label5.Caption := PChar(buffer); // display connection status
if (FileNeme = '') then
exit;
if (FileStream = nil) then
FileStream:= TFileStream.Create(FileNeme, fmCreate); // create the file
if (buffer = nil) then
FileStream.Free // finished downloading
else
FileStream.Write(buffer^, len);
end;
FileStream wollte ich in einer anderen procedure createn, deswegen anstatt " FileStream:= TFileStream.Create(FileNeme, fmCreate);" - StopRec