放码(⊙_⊙)~~
方法二:
方法一:
//GetCursorPos,WindowFromPoint
POINT point;
if (GetCursorPos(&point))
{
char buf[256];
HWND hwnd = WindowFromPoint(point);
HWND hwnd_tmp = hwnd;
while (hwnd_tmp)
{
hwnd_tmp = GetParent(hwnd_tmp);
if (hwnd_tmp) hwnd = hwnd_tmp;
}
if (GetWindowText(hwnd, buf, 256))
{
for (unsigned int i=0 ;i<strlen(buf); i++)
buf[i] = tolower(buf[i]);
if (strstr(buf, "ollydbg") || strstr(buf, "windbg") || strstr(buf, "ollyice"))
goto FIND;
}
}
方法二:
//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))
{
//Messa