Hi,
so wie es aussieht benutzt du XP:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/exitwindowsex.asp
EWX_REBOOT:
Shuts down the system and then restarts the system.
The calling process must have the SE_SHUTDOWN_NAME privilege. For more information, see the following Remarks section.
============================================
EWX_SHUTDOWN:
Shuts down the system to a point at which it is safe to turn off the power. All file buffers have been flushed to disk, and all running processes have stopped.
The calling process must have the SE_SHUTDOWN_NAME privilege. For more information, see the following Remarks section.
Specifying this flag will not shut down the power to the system even if it supports the power-off feature. You must specify EWX_POWEROFF to do this.
Mehr Infos über System Shutdown Reason Codes hier:
http://msdn.microsoft.com/library/en-us/sysinfo/base/system_shutdown_reason_codes.asp
Gruß,
Patrick, der grade am neuen Workshop codet ;D