术语 | setsuspendstate |
释义 | SetSuspendState 语法: C++ BOOLEAN WINAPI SetSuspendState( __in BOOLEAN Hibernate, __in BOOLEAN ForceCritical, __in BOOLEAN DisableWakeEvent ); SetSuspendState功能 挂起的系统关闭电源了。根据Hibernate的参数,系统可以进入挂起(睡眠)状态或休眠状态(四)。 参数 冬眠 [in] 如果此参数为TRUE,系统进入休眠状态。如果该参数为FALSE,系统暂停。 ForceCritical [in] 此参数没有作用。 Windows Server 2003中,Windows XP和Windows 2000的:如果该参数为TRUE,系统立即暂停运作,如果它是假,系统广播一PBT_APMQUERYSUSPEND事件,每个应用程序请求批准暂停运作。 DisableWakeEvent [in] If this parameter is TRUE, the system disables all wake events.如果该参数为FALSE,任何系统的唤醒事件保持启用。 返回值 如果函数成功,返回值为非零。 如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。 备注 调用进程必须有SE_SHUTDOWN_NAME特权。为了使SE_SHUTDOWN_NAME特权,使用AdjustTokenPrivileges功能。有关更多信息,请参阅更改权限的令牌。 应用程序可以使用SetSuspendState过渡的工作状态,从系统到备用(睡眠),或选择,休眠(四)状态。这个功能类似于SetSystemPowerState功能。 有关使用PowrProf.h信息,请参见电源使用方案。有关事件,可以唤醒系统的信息,请参阅系统唤醒事件。 要求: 最低支持:client-Windows 2000专业版 最低支持server-Windows 2000服务器 HeaderPowrProf.h LibraryPowrProf.lib DLLPowrProf.dll 参见 电源管理功能 PBT_APMQUERYSUSPEND PBT_APMSUSPEND 如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com) 生成日期:2009年7月30日 ==英文原文==SetSuspendState Function Suspends the system by shutting power down. Depending on the Hibernate parameter, the system either enters a suspend (sleep) state or hibernation (S4). Syntax C++ BOOLEAN WINAPI SetSuspendState( __in BOOLEAN Hibernate, __in BOOLEAN ForceCritical, __in BOOLEAN DisableWakeEvent ); Parameters Hibernate [in] If this parameter is TRUE, the system hibernates. If the parameter is FALSE, the system is suspended. ForceCritical [in] This parameter has no effect. Windows Server 2003, Windows XP, and Windows 2000: If this parameter is TRUE, the system suspends operation immediately; if it is FALSE, the system broadcasts a PBT_APMQUERYSUSPEND event to each application to request permission to suspend operation. DisableWakeEvent [in] If this parameter is TRUE, the system disables all wake events. If the parameter is FALSE, any system wake events remain enabled. Return Value If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call GetLastError . Remarks The calling process must have the SE_SHUTDOWN_NAME privilege. To enable the SE_SHUTDOWN_NAME privilege, use the AdjustTokenPrivileges function. For more information, see Changing Privileges in a Token . An application may use SetSuspendState to transition the system from the working state to the standby (sleep), or optionally, hibernate (S4) state. This function is similar to the SetSystemPowerState function. For more information on using PowrProf.h, see Power Schemes . For information about events that can wake the system, see System Wake-up Events . Requirements Minimum supported clientWindows 2000 Professional Minimum supported serverWindows 2000 Server HeaderPowrProf.h LibraryPowrProf.lib DLLPowrProf.dll See Also Power Management Functions PBT_APMQUERYSUSPEND PBT_APMSUSPEND Send comments about this topic to Microsoft Build date: 7/30/2009 ==原始网址==http://msdn.microsoft.com/en-us/library/aa373201(VS.85).aspx\n |
随便看 |
|
windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。