I'm using SendMessage with WM_CLOSE to close some Firefox windows. I have several Firefox windows open concurrently and it's easier to do it like this than by closing the windows manually. But, while SendMessage closes the windows, it doesn't actually seem to shut Firefox down. Firefox continues to be shown in the Task Manager. This leads to errors when I want to reopen Firefox.
How do I ensure that Firefox closes when I close all of its windows?
How do I ensure that Firefox closes when I close all of its windows?