[python-win32] IsHungAppWindow or equivalent

Tim Roberts timr at probo.com
Mon Apr 14 20:14:39 CEST 2008


Dahlstrom, Roger wrote:
>
> I am trying to determine whether an application is reporting "Not 
> Responding" (like what the task manager shows).  I'm not married to 
> the IsHungAppWindow method, it was just suggested to me, and seemed 
> like the right path to go down.
>

It is the same API that Task Manager uses.

> My questions are:
>
> 1.  Are there any win32 Python extensions that expose this?  If so, 
> which ones?
>

I doubt it; it's not available prior to Windows 2000, and MSDN says they 
might decide to change it later.

> 2.  If there are not extensions, does anyone know what the user32 .dll 
> in windows is expecting as a parameter (using ctypes)?
>

Really?  The very first Google hit is the MSDN page, which shows the 
parameters.  It wants a window handle -- an HWND.  That is a 32-bit 
integer on Win32, and a 64-bit integer on Win64.

> I've tried all the ints to no avail.
>

What do you mean by "to no avail"?  Where did you get the window 
handle?  What happened when you tried it?

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the python-win32 mailing list