I have a console process that continually loops issuing the gethostbyname function. If another process tries to restart Windows by using: invoke ExitWindowsEx, EWX_REBOOT+EWX_FORCE, NULL an error box is shown stating the first process caused an error If I remove EWX_FORCE, everything goes fine and Windows is restarted. Anyone knows why this happens and how it can be fixed? The EWX_FORCE is needed because if there is a DOS app running, it will shut it down without asking which is what I want. TIA
You've got to process messages sent to your app, so it can shut itself down when windows wants it to. (I'm talking about messages sent to the process, not a window)
Yeah, I sort of figured this is what's happenning, but how can it be overcome? How come this doesn't happen when I shut down Windows from the Start button?