Ciao a tutti

praticamente devo controllare se un'applicazione non risponde..

sto usando questa procedura..

codice:
function TfrmMain.ifprocessExist(app: string; index : integer):string;
var
 H : THandle;
 lngReturnValue : longint;
 DWResult : DWORD;
 processname : string;
begin
 H := JclSysInfo.GetPidFromProcessName(ExtractFileName(app));//FindWindow('ScanWeb', nil);
 processname := JclSysInfo.GetProcessNameFromPid(H);
 if (H <> 0) and (processname <> '') then
  begin
    lngReturnValue := SendMessageTimeout(H, WM_NULL, 0,
      0, SMTO_ABORTIFHUNG Or SMTO_BLOCK, 1000, DWResult);

    if lngReturnValue >= 0 then
     lvFile.Items[index].SubItems[0] := 'Responding'
      else
      begin
       lvFile.Items[index].SubItems[0] := 'Not responding';
       lvFile.Items[index].SubItems[1] := DateTimeToStr(Now);
      end;
  end
   else
   begin
     lvFile.Items[index].SubItems[0] := 'Application not found';
     lvFile.Items[index].SubItems[1] := DateTimeToStr(Now);
   end;
end;
Riesco a capire se l'applicazione è chiusa.. ma no se NON RISPONDE..
mi ritorna sempre come funzionante..!!!

qualcuno sa come posso fare?
ciao