Hi,
I have a problem with some pointer. I want to have access to some component of a Form within a thread, and to do so, I initialise the pointer in my Thread to the component of my form. Here's that small part of my code:
// The part from my form where I create, initialise and start my thread
th:=THitRatioThread.Create(true);
th.SendData(qryHitRatio); // Here is the problem
th.resume;
_____________
// The thread where I set my pointer
var
FqryHitRatio : ^TOCIQuery;
procedure THitRatioThread.sendData( var qryHitRatio : TOCIQuery);
begin
new(fQryHitRatio);
fQryHitRatio^:=qryHitRatio;
end;
_____________
When I follow my program, the 'new' method initialise the pointer, but the line 'fQryHitRatio^:=qryHitRatio;' does nothing at all... Anyone knows why?
Thanks a lot,
I have a problem with some pointer. I want to have access to some component of a Form within a thread, and to do so, I initialise the pointer in my Thread to the component of my form. Here's that small part of my code:
// The part from my form where I create, initialise and start my thread
th:=THitRatioThread.Create(true);
th.SendData(qryHitRatio); // Here is the problem
th.resume;
_____________
// The thread where I set my pointer
var
FqryHitRatio : ^TOCIQuery;
procedure THitRatioThread.sendData( var qryHitRatio : TOCIQuery);
begin
new(fQryHitRatio);
fQryHitRatio^:=qryHitRatio;
end;
_____________
When I follow my program, the 'new' method initialise the pointer, but the line 'fQryHitRatio^:=qryHitRatio;' does nothing at all... Anyone knows why?
Thanks a lot,