Search code examples
windowsvisual-studio-2010winapivisual-c++win32-process

How to shut a Win app from another app without reboot?


Hi I want to make a small test window app that can force IE to save its data and shutdown upon a button click and restart with same tabs when another button is clicked?? I am fairly new to Win32 programming can anyone help me out here.?? Any leads will be appriciated??


Solution

  • Try to find one of each browser class with EnumChildWindows then you save the text(current link) of each one, and send a WM_CLOSE message to the program, if you debug the IE you'll probably see a CALL to the function to open a new window, when you find it, you can call it again and with the new browser class you put the text you got from the one that was opened