Re: [問題] jmp ffff:0 不能用了

看板Programming作者 (purpose)時間14年前 (2011/10/09 00:36), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
※ 引述《whitefox (八十萬定存宅男)》之銘言: : 以前舊的windows系統可以用這方式關掉dos 視窗 : 現在的win7會跳出ntvdm.exe錯誤的訊息 : 而不會直接關掉cmd.exe的視窗 : 有可以取代的方法嗎 #include <windows.h> #pragma comment(lib, "user32") int main() { HWND hp = GetForegroundWindow(); DWORD pid; char str[256]; GetWindowThreadProcessId(hp, &pid); printf("hp = %x, pid = %d\n", hp, pid); sprintf(str, "hp = %x, pid = %d\n", hp, pid); MessageBoxA(NULL, str, "", MB_OK); sprintf(str, "taskkill /pid %d", pid); system(str); return 0; } 在 Windows XP 可以用 taskkill 透過這個碗糕 PID 關掉 cmd.exe。 Windows 7 的話,那要等我買新電腦才能測。 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 124.8.136.77
文章代碼(AID): #1Ea7lp3Y (Programming)
討論串 (同標題文章)
文章代碼(AID): #1Ea7lp3Y (Programming)