2:System Shutdown Functions The following functions are used with system shutdown. Function Description AbortSystemShutdown Stops a system shutdown started by using the InitiateSystemShutdown function. ExitWindows Logs off the current user. ExitWindowsEx Either logs off the current user, shuts down the system, or shuts down and restarts the system. InitiateSystemShutdown Initiates a shutdown and optional restart of the specified computer. InitiateSystemShutdownEx Initiates a shutdown and optional restart of the specified computer. LockWorkStation Locks the workstation's display, protecting it from unauthorized
是WM_QUERYENDSESSION靠!一不做,二不休,接着贴!Power Management Functions The following functions are used with power management.Function Description GetDevicePowerState Retrieves the current power state of the specified device. GetSystemPowerStatus Retrieves the power status of the system. IsSystemResumeAutomatic Indicates the current state of the computer. RequestWakeupLatency Specifies roughly how quickly the computer should enter the working state. SetSystemPowerState Suspends the system by shutting power down. SetThreadExecutionState Enables applications to inform
The following functions are used with system shutdown. Function Description
AbortSystemShutdown Stops a system shutdown started by using the InitiateSystemShutdown function.
ExitWindows Logs off the current user.
ExitWindowsEx Either logs off the current user, shuts down the system, or shuts down and restarts the system.
InitiateSystemShutdown Initiates a shutdown and optional restart of the specified computer.
InitiateSystemShutdownEx Initiates a shutdown and optional restart of the specified computer.
LockWorkStation Locks the workstation's display, protecting it from unauthorized
The following functions are used with power management.Function Description
GetDevicePowerState Retrieves the current power state of the specified device.
GetSystemPowerStatus Retrieves the power status of the system.
IsSystemResumeAutomatic Indicates the current state of the computer.
RequestWakeupLatency Specifies roughly how quickly the computer should enter the working state.
SetSystemPowerState Suspends the system by shutting power down.
SetThreadExecutionState Enables applications to inform