----- Original Message -----
Sent: Tuesday, February 27, 2001
04:13
Subject: [DUG]: C Header conversion
problems.
I have a DLL written in C which is an
interface for Citrix Metaframe.
The DLL cam with a C header file, which I
have converted (using Dr Bobs header converter and some tweaking) to Delphi
but I have problems.
how about if you do it like this:
procedure TForm1.Button1Click(Sender:
TObject);
var
pProcessInfo: PWF_PROCESS_INFO;
LCount:
DWord;
begin
if EnsureWFAPIDLLLoaded then
begin
if
WFEnumerateProcessesA(WF_CURRENT_SERVER_HANDLE,
0, // reserved
1, // version
1
pProcessInfo,
LCount) then begin
WFFreeMemory(pProcessInfo);
end;
end;
end;
you can still use [] with pProcessinfo just as you are
now
doing with the array.
but (I think) dynamic arrays use Delphi reference
counting
stuff and pointers don't, and that may be the
problem.
i'd be interested to hear if this also has the leak
behaviour.
-ns