BOOL WINAPI
IsHungAppWindow(HWND hwnd)
{
+ PWND Window;
UNICODE_STRING ClassName;
WCHAR szClass[16];
static const UNICODE_STRING GhostClass = RTL_CONSTANT_STRING(L"Ghost");
/* Ghost is a hung window */
RtlInitEmptyUnicodeString(&ClassName, szClass, sizeof(szClass));
- if (NtUserGetClassName(hwnd, FALSE, &ClassName) &&
+ Window = ValidateHwnd(hwnd);
+ if (Window && Window->fnid == FNID_GHOST &&
+ NtUserGetClassName(hwnd, FALSE, &ClassName) &&
RtlEqualUnicodeString(&ClassName, &GhostClass, TRUE))
{
return TRUE;