//GetDesktopWindow
,GetWindow
HWND decwnd = GetDesktopWindow();
if
(enumwindows(decwnd))
goto FIND;
return
0;
BOOLEAN enumwindows( HWND hwnd_ )
{
HWND hwnd = GetWindow(hwnd_, GW_CHILD);
if
(hwnd)
{
char buf[256];
if
(GetWindowText(hwnd, buf, 256))
{
//MessageBox
(NULL, buf,
"god"
, MB_OK);
for
(unsigned int i=0 ;i<strlen(buf); i++)
buf[i] = tolower(buf[i]);
if
(strstr(buf,
"ollydbg"
) || strstr(buf,
"windbg"
) || strstr(buf,
"ollyice"
))
return
TRUE;
}
if
(enumwindows(hwnd))
return
TRUE;
}
//if
hwnd = GetWindow(hwnd_, GW_HWNDNEXT);
if
(hwnd)
{
char buf[256];
if
(GetWindowText(hwnd, buf, 256))
{
//MessageBox
(NULL, buf,
"god"
, MB_OK);
for
(unsigned int i=0 ;i<strlen(buf); i++)
buf[i] = tolower(buf[i]);
if
(strstr(buf,
"ollydbg"
) || strstr(buf,
"windbg"
) || strstr(buf,
"ollyice"
))
return
TRUE;
}
if
(enumwindows(hwnd))
return
TRUE;
}
return
FALSE;
}