Shutdown without poweroff - VB5 on Win98 original edition (ATX PC)
Posted on 2003-03-14
I would like to be able to programmatically (not shelling out to another program) shutdown an ATX-enabled PC in Win98 original edition via VB5. The following line using an API call to ExitWindowsEx *should* work as far as I can tell, based on documentation :
ret_val& = ExitWindowsEx(EWX_SHUTDOWN, 0&)
where EWX_SHUTDOWN is a const with value 1.
But this is shutting down PC and powering it off instead. Documentation says that you need to include the EWX_POWEROFF (value = 8) flag to poweroff the system [EWX_SHUTDOWN Or EWX_POWEROFF], but my system is shutting down without it, and that's not what I want.
How can I get the intended result?