When CloseMainWindow() fails: closing an application programmatically

These days I’m working on a custom application updater for our products and I had the need to Close the main Application process from the Updater process. My first implementation involved getting the main application process ID and then use som...