Вниз
Скачать: CL | DM;

KOL NewThreadEx( ???? )   Найти похожие ветки 

← →
_Simon_   (2005-11-27 12:56) [0]

Как использовать Кол класс 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) [1]


 //declaration
 TOnThreadExecute = function(Sender:PThread): Integer of object;
   
                 
Again, someone forgot the dummy parameter here?


function ThrExecute(Dummy:pointer;Sender: PThread): Integer;



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.025 c
15-1156351224
Новый_Игрок
2006-08-23 20:40
2006.09.24
Вот нашёл...IF игры


15-1156957163
Chort
2006-08-30 20:59
2006.09.24
Проблема с Рабочим столом!


2-1157458352
barakuda
2006-09-05 16:12
2006.09.24
Запрос чегото, нетого ...


3-1153899026
SergP.
2006-07-26 11:30
2006.09.24
проблема с запросом (count(*)+group by)


15-1157536144
Андрей Пазик
2006-09-06 13:49
2006.09.24
Когда будет rss на сайте?




   Наверх