Ja, sorry das stimmt. Da war ich mit den Gedanken wo anders...
So sollte das aussehen:
Delphi-Quellcode:
type
TThreadParams =
record
URL:
String;
...
end;
PThreadParams = ^TThreadParams;
var
ThreadParams: PThreadParams;
ThreadID: Cardinal;
function ThreadFunction(p: PThreadParams): Integer;
var
OpenUrl:
String;
...
begin
// Hier kommt das was der Thread machen soll
end;
procedure ...
begin
New(ThreadParams);
ThreadParams.URL:= EditX.Text;
BeginThread(
nil, 0, @ThreadFunction, ThreadParams, 0, ThreadID);
end;
BeginThread