Someone know about any API to Shutdown the Computer?
Thanks
This is a discussion on API WIndows within the C Programming forums, part of the General Programming Boards category; Someone know about any API to Shutdown the Computer? Thanks...
Someone know about any API to Shutdown the Computer?
Thanks
ExitWindowsEx, see MSDN.
For information on how to enable C++11 on your compiler, look here.
よく聞くがいい!私は天才だからね! ^_^
Hopefully you're not trying to write some sort of malware. Are you?
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.
No, i'm not wrinting a malware...
I'm just writing a RAT (Remote Administration Tool), that can be used by a trojan, but is not my intention.
Besides, how can i Kill a Windows Process?
Thanks
TerminateProcess.
Not recommended, however, since the process will not be allowed to complete a shutdown.
Instead, you should find its main window and close it. It's the preferred way. If possible.
For information on how to enable C++11 on your compiler, look here.
よく聞くがいい!私は天才だからね! ^_^
You could try searching. I don't do Windows programming, but I think I may have found what you're looking for: http://msdn.microsoft.com/en-us/libr...ll(VS.80).aspx
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.
That's dotNet, C#, C++/CLI, VB dotNet and not C. And certainly not standard C++ either.
For information on how to enable C++11 on your compiler, look here.
よく聞くがいい!私は天才だからね! ^_^