Home › Forums › Discussions › Support › WinpkFilter wwwcensor in Delphi problem › Re: Re: WinpkFilter wwwcensor in Delphi problem
May 19, 2010 at 5:59 pm
#6940
-1 means WAIT_FAILED and the problem is in hEvent[0] value which is NULL
You defined hEvent array indexed from 0, as below
hEvent: array[0..255] of THANDLE;
But you fill it with event handles starting from index 1 (see below), so for index 0 you have an invalid event handle.
for dwAdIndex := 1 to AdList.m_nAdapterCount do
begin
...
hEvent[dwAdIndex] := CreateEvent(nil, TRUE, FALSE, nil);