So I was thinking of a way to go about writing a program that closes all instances开发者_C百科 of internet explorer. Would it be better to terminate all iexplore.exe processes using the windows API or enumerate the internet explorer windows and close it that way? (using enumwindows).
I know it's late, but:
https://blogs.msdn.microsoft.com/oldnewthing/20040720-00/?p=38393/
You will only need the first 2 IFs from method RecalcText(). Paste there this code:
HWND hwndWBA;
pwba->get_HWND((LONG_PTR*)&hwndWBA);
InvalidateRect(hwndWBA, NULL, TRUE);
pwba->Quit();
pwba->Release();
It will close all explorers. Not only Internet Explorers, but also folder explorers. Works on desktop (tested on Windows 7).
精彩评论