Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2006.09.24;
Скачать: 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 вся ветка

Текущий архив: 2006.09.24;
Скачать: CL | DM;

Наверх




Память: 0.46 MB
Время: 0.065 c
4-1148375787
Stanislav
2006-05-23 13:16
2006.09.24
Запуск приложения от имени Администратора


15-1157055376
Torry
2006-09-01 00:16
2006.09.24
ISDEF 2006 Start


2-1157266560
Itoixxx
2006-09-03 10:56
2006.09.24
Работа с филдами в ибКвнри


1-1155634015
pasha_golub
2006-08-15 13:26
2006.09.24
Screen.DataModuleCount = 0 always in Design Time


15-1157368429
REA
2006-09-04 15:13
2006.09.24
Играем в ГИБДД