TIP: Click on subject to list as thread! ANSI
echo: nthelp
to: Tim Boyer
from: Rich
date: 2006-05-26 23:29:22
subject: Re: Registry cleaner

From: "Rich" 

This is a multi-part message in MIME format.

------=_NextPart_000_0172_01C6811C.385304B0
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

   Sounds like you have something installed that is not responding to =
messages which results in hangs in other applications waiting for a =
response.  If a non-responding app has a top level window it may show in =
the task manager applications tab as non-responding.  Otherwise, you can =
try to compile and run the app below.  It sends a message to each window =
and reports how long it takes it to respond.  This finds non-responsive =
windows.

Rich

#include 
#include 

#define STRICT
#define WIN32_LEAN_AND_MEAN
#include "windows.h"



BOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lParam) {
   DWORD dwProcessId;
   DWORD dwThreadId =3D GetWindowThreadProcessId(hwnd, &dwProcessId);

   FILETIME ftStart;

   GetSystemTimeAsFileTime(&ftStart);

   DWORD_PTR dwResult;

   LRESULT l =3D SendMessageTimeout(hwnd,
                                  WM_NULL,
                                  0,               // WPARAM
                                  0,               // LPARAM
                                  SMTO_NORMAL,
                                  5000,            // 5s timeout
                                  &dwResult);

   FILETIME ftStop;

   GetSystemTimeAsFileTime(&ftStop);

   DWORDLONG dwlElapsed =3D *(DWORDLONG *) &ftStop - *(DWORDLONG *) =
&ftStart;

   wprintf(L"HWND %08X: Process=3D%08X(%6u), Thread=3D%08X(%6u), Elapsed =
=3D %7I64u\n",
           hwnd,
           dwProcessId,
           dwProcessId,
           dwThreadId,
           dwThreadId,
           dwlElapsed);

   if (l =3D=3D 0)
   {
      wprintf(L"  SendMessageTimeout failed.  GetLastError() =3D %u\n", =
GetLastError());
   }

   return(TRUE);
}


int wmain(int argc, wchar_t *argv[]) {
   BOOL f =3D EnumWindows(&EnumWindowsProc, 0);

   return(f);
}



  "Tim Boyer"  wrote in message =
news:v9cf72pdenfbl74ku3gm3qq9spq6oul1pp{at}4ax.com...
  XP is starting to get flaky.  Explorer freezes; Outlook stalls after =
sending,
  etc.

  I'm _reasonably_ sure it's not a virus - I've got Vexira installed - =
or spyware
  - Spybot S&D.  Both are kept up to date.

  So.   I'd rather not wipe-and-reinstall, but I will if I have to, of =
course.

  Registry cleaner, or something?  Anyone got any favorites?

  --=20
  tim boyer
  tim{at}denmantire.com
------=_NextPart_000_0172_01C6811C.385304B0
Content-Type: text/html;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable








   Sounds
like you have =
something=20
installed that is not responding to messages which results in hangs in = other=20
applications waiting for a response.  If a non-responding
app = has a=20
top level window it may show in the task manager applications tab as=20
non-responding.  Otherwise, you can try to compile and run the
app=20 below.  It sends a message to each window and reports how
long it = takes it=20
to respond.  This finds non-responsive windows.
 
Rich
 
#include
<stdio.h>#include=20
<stdlib.h>
 
#define STRICT#define=20
WIN32_LEAN_AND_MEAN#include "windows.h"
 
 
 
BOOL CALLBACK EnumWindowsProc(HWND =
hwnd, LPARAM=20
lParam){   DWORD
dwProcessId;   DWORD = dwThreadId=20
=3D GetWindowThreadProcessId(hwnd, &dwProcessId);
 
   FILETIME =
ftStart;
 
  =20
GetSystemTimeAsFileTime(&ftStart);
 
   DWORD_PTR =
dwResult;
 
   LRESULT l =3D=20
SendMessageTimeout(hwnd,       &nb=
sp;           &nbs=
p;            =
; =20
WM_NULL,          &=
nbsp;           &n=
bsp;          =20
0,            =
;  =20
//=20
WPARAM          &nb=
sp;           &nbs=
p;          =20
0,            =
;  =20
//=20
LPARAM          &nb=
sp;           &nbs=
p;          =20
SMTO_NORMAL,         &nb=
sp;           &nbs=
p;           =20
5000,           
=
// 5s=20
timeout          &n=
bsp;           &nb=
sp;          =20
&dwResult);
 
   FILETIME =
ftStop;
 
  =20
GetSystemTimeAsFileTime(&ftStop);
 
   DWORDLONG
dwlElapsed =3D =
*(DWORDLONG *)=20
&ftStop - *(DWORDLONG *) &ftStart;
 
  
wprintf(L"HWND %08X:=20
Process=3D%08X(%6u), Thread=3D%08X(%6u), Elapsed =3D=20
%7I64u\n",          =
;=20
hwnd,          =20
dwProcessId,         &nb=
sp;=20
dwProcessId,         &nb=
sp;=20
dwThreadId,         &nbs=
p;=20
dwThreadId,         &nbs=
p;=20
dwlElapsed);
 
   if (l =3D=3D =
0)  =20
{     
wprintf(L"  SendMessageTimeout=20
failed.  GetLastError() =3D %u\n",
GetLastError());   =

}
 
   =
return(TRUE);}
 
int wmain(int argc, wchar_t
*argv[]){   BOOL =
f =3D=20
EnumWindows(&EnumWindowsProc, 0);
 
  
return(f);}
 
 

  "Tim Boyer" <tim{at}denmantire.com>">mailto:tim{at}denmantire.com">tim{at}denmantire.com>
wrote in =
message=20
  news:v9cf72pdenf=
bl74ku3gm3qq9spq6oul1pp{at}4ax.com...XP=20
  is starting to get flaky.  Explorer freezes; Outlook stalls after =

  sending,etc.I'm _reasonably_ sure it's not
a virus - I've =
got=20
  Vexira installed - or spyware- Spybot S&D. 
Both are kept =
up to=20
  date.So.   I'd rather not
wipe-and-reinstall, but I =
will if=20
  I have to, of course.Registry cleaner, or
something?  =
Anyone got=20
  any favorites?-- tim boyertim{at}denmantire.commailto:tim{at}denmantire.com">tim{at}denmantire.com
ODY>

------=_NextPart_000_0172_01C6811C.385304B0--

--- BBBS/NT v4.01 Flag-5
* Origin: Barktopia BBS Site http://HarborWebs.com:8081 (1:379/45)
SEEN-BY: 633/267 270 5030/786
@PATH: 379/45 1 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.