![]() |
| ||
|
|
Новости |
Поиск |
FAQ |
Статьи |
Книги |
Новости VCL
| | Форумы ЧАТ |
Орешник |
|
| |||
| |||
« предыдущая ветвь | форум | следующая ветвь »
KOL NewThreadEx( ???? ) [Delphi, Windows]
_Simon_ © (2005-11-27 12:56:00)Как использовать Кол класс PThread без MCK:
У меня не работает такой код
unit Un_my;
interface
uses
kol, windows;
var
Thr:PThread;
function ThrExecute(Sender: PThread): Integer;
implementation
function ThrExecute(Sender: PThread): Integer;
var
i: Integer;
begin
for i:= 0 to 2 do begin
MessageBeep($40);
Sleep(200);
end;
end;
initialization
// Incompatible types:
Thr:=NewThreadEx(ThrExecute); // Metod pointer and regular procedure
// Thr:=NewThreadEx(@ThrExecute); // TOnThreadExecute and pointer
Thr.AutoFree:=false;
Thr.Resume;
finalization
Thr.Free;
end.
Чем отличается
Result.Thread1 := NewThreadEx( Result.Thread1Execute );
из "Unit1_1.inc" генерируемой MCK?
thaddy (2005-11-27 13:42:00) [1]
//declaration
TOnThreadExecute = function(Sender:PThread): Integer of object;
Again, someone forgot the dummy parameter here?
function ThrExecute(Dummy:pointer;Sender: PThread): Integer;