ExitWindowsEx()
-
hallo,
#include <stdio.h> #include <windows.h> void main() { ExitWindowsEx(EWX_SHUTDOWN, NULL); printf("%d", GetLastError()); }
ich bekomme immer den Errorcode 1314: "A required privilege is not held by the client."
das ging sonst immer bei mir..?!
-
How to Shut Down the System: http://msdn.microsoft.com/library/en-us/sysinfo/base/how_to_shut_down_the_system.asp
-
ah, ok...
ich hab die funktion bis jetz nur mit logoff benutzt, da gibt es zwar auch einen fehlercode aber es geht trotzdem...
dankesehr