how can i shut down i computer with c code?
how can i shut down i computer with c code?
Hi,
have a look here:
http://www.computer-mentors.co.uk/ww...sages/592.html
and here:
http://www.computer-mentors.co.uk/wwwboard/c/
i have pasted the code below:
you can use
BOOL ExitWindowEx(UINT uOptions, DWORD dwRes)
uOptions are
EWX_FORCE
EWX_LOGOFF
EWX_POWEROFF
EWX_REBOOT
EWX_SHUTDOWN
for more info refer to MSDN etc.
or
BOOL ExitWindows()
e.g
BOOL bok = ExitWindows(0,0)
to abort shutdown process use
BOOL AbortSystemShutdown(LPCTSTR pMachine)
e.g
BOOL bok = AbortSystemShutdown(0)
If this doesnt work try out freecode.com
Kendals
Can you paste a sample code pls? I don't know which header files to include and stuff.....
thnx
Set all i,o registers to 0 and call dosx86() with those IO values.
where i,o are unions. (union REGS i,o)
--vaspro
Hi,
You're making me even more confused...WHy need to use unions and stuff like dosx86()? I don't know how to use them.