Reply To: problem with winpkfilter

Home Forums Discussions Support Portal problem with winpkfilter Reply To: problem with winpkfilter

#5492

PLY
Participant

i think your winpkfilter can work on GUI app but problem is the example code of winpkfilter. i try copy two example code (passthru and packetsniffer) to GUI app and problem still occure when other application try call SendMessage or GetMessage for broadcast windows message. so the other application will not respond because SendMessage and GetMessage wait for return message from process and i think the problem are few line of code (i use delphi )

while counter <> 0 do begin
WaitForSingleObject ( hEvent,INFINITE);
ResetEvent(hEvent);
while (ReadPacket (hFilt, @ReadRequest) <> 0) do begin
Dec (counter);
…..
end;
end;

i think because we use 2 while loop and WaitForSingleObject. if we don’t exit 2 while loop, the app can’t process any win message and also WaitForSingleObject , Can WaitForSingleObject not use INFINITE? or Can we use other method instead WaitForSingleObject?

Please Help