网站首页  词典首页

请输入您要查询的函数:

 

术语 registerpowersettingnotification
释义 RegisterPowerSettingNotification
语法:
C++
HPOWERNOTIFY WINAPI RegisterPowerSettingNotification(
__in HANDLE hRecipient,
__in LPCGUID PowerSettingGuid,
__in DWORD Flags
);
RegisterPowerSettingNotification功能
登记申请接收功率设置为特定的设定权的事件通知。
参数
hRecipient [in]
在处理指示的权力设置的通知应发送。交互式应用,标志参数应为零,hRecipient参数应该是一个窗口句柄。在服务方面,旗参数应之一,hRecipient参数应该是一个SERVICE_STATUS_HANDLE从RegisterServiceCtrlHandlerEx返回。
PowerSettingGuid [in]
该通知的设置要发送功率的GUID。欲了解更多信息,请注册的电力事件。
标志 [in]
ValueMeaning
DEVICE_NOTIFY_WINDOW_HANDLE
0Notifications发送使用的是PBT_POWERSETTINGCHANGE wParam参数WM_POWERBROADCAST消息。
DEVICE_NOTIFY_SERVICE_HANDLE
1Notifications被发送到HandlerEx回调函数的参数的SERVICE_CONTROL_POWEREVENT dwControl和PBT_POWERSETTINGCHANGE dwEventType。
返回值
返回通知办理注销通知的权力。
要求:
client最低支持Vista
server最低支持 Windows Server 2008
HeaderWinUser.h(头文件:winuser.h)
LibraryUser32.lib
DLLUser32.dll
参见
电源管理功能
注册电力事件
UnregisterPowerSettingNotification
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月30日
==英文原文==RegisterPowerSettingNotification Function
Registers the application to receive power setting notifications for the specific power setting event.
Syntax
C++
HPOWERNOTIFY WINAPI RegisterPowerSettingNotification(
__in HANDLE hRecipient,
__in LPCGUID PowerSettingGuid,
__in DWORD Flags
);
Parameters
hRecipient [in]
Handle indicating where the power setting notifications are to be sent. For interactive applications, the Flags parameter should be zero, and the hRecipient parameter should be a window handle. For services, the Flags parameter should be one, and the hRecipient parameter should be a SERVICE_STATUS_HANDLE as returned from RegisterServiceCtrlHandlerEx .
PowerSettingGuid [in]
The GUID of the power setting for which notifications are to be sent. For more information see Registering for Power Events .
Flags [in]
ValueMeaning
DEVICE_NOTIFY_WINDOW_HANDLE
0Notifications are sent using WM_POWERBROADCAST messages with a wParam parameter of PBT_POWERSETTINGCHANGE .
DEVICE_NOTIFY_SERVICE_HANDLE
1Notifications are sent to the HandlerEx callback function with a dwControl parameter of SERVICE_CONTROL_POWEREVENT and a dwEventType of PBT_POWERSETTINGCHANGE.

Return Value
Returns a notification handle for unregistering for power notifications.
Requirements
Minimum supported clientWindows Vista
Minimum supported serverWindows Server 2008
HeaderWinUser.h (include Windows.h)
LibraryUser32.lib
DLLUser32.dll
See Also
Power Management Functions
Registering for Power Events
UnregisterPowerSettingNotification
Send comments about this topic to Microsoft
Build date: 7/30/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa373196(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:32:22