Autor Beitrag
MrFox
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 208

WIN 2000 Professional, Ubuntu 5.10
D3 Prof, D7 Pers, D2005 Pers, Java (Eclipse)
BeitragVerfasst: Sa 12.11.05 11:45 
Hi Leute,

Ich habe ein kleines Problem.

ausblenden Delphi-Quelltext
1:
2:
hhandle := BeginThread(nil,0,@DoCommands,nil,0,ID);
CloseHandle(hhandle);


Mit diesem Code starte ich eine Thread-Funktion, die diverse Dateioperationen vornimmt und das ganze in einem Fortschrittsdialog anzeigt (also auf die VCL zugreift).
Als Thread läuft das ganze deshalb, damit das Programm währenddessen noch ansprechbar ist.

Beim Beenden des Programms kommt jetzt jedoch eine Fehlermeldung die irgendwas von einem ungültigen Fensterhandle faselt.
Was mache ich bitte falsch?

_________________
Das Leben auf der Erde mag zwar teuer sein, aber eine jährliche Rundreise um die Sonne ist gratis mit dabei.
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Sa 12.11.05 12:46 
Sind die Zugriffe auf die VCL synchronisiert?

Wenn nicht, solltest Du das schnellstmöglich nachholen ...

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
MrFox Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 208

WIN 2000 Professional, Ubuntu 5.10
D3 Prof, D7 Pers, D2005 Pers, Java (Eclipse)
BeitragVerfasst: So 13.11.05 16:22 
Ist das bei BeginThread überhaupt möglich?

_________________
Das Leben auf der Erde mag zwar teuer sein, aber eine jährliche Rundreise um die Sonne ist gratis mit dabei.