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
|
- [DUG]: C Header conversion problems. Stacey Verner
- Re: [DUG]: C Header conversion problems. Paul Spain
- RE: [DUG]: C Header conversion problems. Nello Sestini
- RE: [DUG]: C Header conversion problems. Stacey Verner
- RE: [DUG]: C Header conversion problems. Stacey Verner