网站首页  词典首页

请输入您要查询的函数:

 

术语 broadcastsystemmessageex
释义 BroadcastSystemMessageEx
语法:
long BroadcastSystemMessageEx( DWORD dwFlags,
LPDWORD lpdwRecipients,
UINT uiMessage,
WPARAM wParam,
LPARAM lParam,
PBSMINFO pBSMInfo
);
BroadcastSystemMessageEx功能
该BroadcastSystemMessageEx函数将消息发送到指定的收件人。受助人可以申请,安装驱动程序,网络驱动器,系统级设备驱动程序,或这些系统组件的组合。
这个功能类似于BroadcastSystemMessage除了这个函数可以返回的人更多的信息。
参数
dwFlags
[in]指定播放选项。此参数可以是一个或多个下列值。
BSF_ALLOWSFW
启用收件人设置前台窗口在处理邮件。
BSF_FLUSHDISK
刷新磁盘每个收件人后处理消息。
BSF_FORCEIFHUNG
继续广播消息,即使超时期间满期或一个收件人没有响应。
BSF_IGNORECURRENTTASK
不将消息发送给窗口属于当前任务。这可以防止自己的消息接收申请。
BSF_LUID
Windows XP:如果BSF_LUID设置,邮件发送到窗口具有相同的LUID作为在BSMINFO结构的LUID成员中指定。
BSF_NOHANG
强制超时无反应的应用。如果收件人超时一,不要继续广播消息。
BSF_NOTIMEOUTIFNOTHUNG
等待一到消息的反应,只要收件人不被响应。不超时。
BSF_POSTMESSAGE
职位的消息。不要使用与BSF_QUERY组合。
BSF_RETURNHDESK
Windows XP:如果访问被拒绝,都这一点,BSF_QUERY设置,BSMINFO同时返回桌面句柄和窗口句柄。如果访问被拒绝,只有BSF_QUERY设置,只有窗口句柄返回BSMINFO。
BSF_QUERY
将消息发送到一个收件人一次,发送到后来的收件人,如果目前只有收件人返回TRUE。
BSF_SENDNOTIFYMESSAGE
发送邮件使用SendNotifyMessage功能。不要使用与BSF_QUERY组合。
lpdwRecipients
[中,out]指向一个变量,它包含并接收关于该邮件的收件人信息。
当函数返回时,这个变量接收这些确定哪些人实际收到的消息值的组合。
如果该参数为NULL,则函数广播的所有组成部分。
此参数可以是一个或多个下列值。
BSM_ALLCOMPONENTS
广播到所有的系统组件。
BSM_ALLDESKTOPS
广播到所有的桌面。需要SE_TCB_NAME特权。
BSM_APPLICATIONS
广播应用。
uiMessage
[in]指定要发送的信息。
wParam
[in]指定附加消息的特定信息。
lparam的
[in]指定附加消息的特定信息。
pBSMInfo
[out]指向1 BSMINFO结构,它包含更多的信息,如果申请被拒绝,并dwFlags设置为BSF_QUERY。
返回值
如果函数成功,返回值是一个积极的价值。
如果函数是无法播放的消息,则返回值为-1。
如果dwFlags参数是BSF_QUERY和至少一个收件人返回BROADCAST_QUERY_DENY相应的信息,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
如果没有指定BSF_QUERY,函数指定的消息发送给所有要求的人,这些人无视返回的值。
如果调用的线程比在桌面上的窗口,拒绝了这一要求,其他是,调用者必须调用SetThreadDesktop(hdesk)对这个窗口查询的事情。此外,调用者必须调用返回hdesk处理CloseDesktop。
该系统不仅为系统消息编组(范围为0至(WM_USER -1))的。其他消息发送(即“= WM_USER)到另一个进程,则必须自定义编组。
功能信息
最低DLL版本 user32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
XP的最低经营systemsWindows
UnicodeImplemented为ANSI和Unicode版本。
参见
消息和消息队列概述,BroadcastSystemMessage,BSMINFO,SendNotifyMessage
==英文原文==BroadcastSystemMessageEx Function
The BroadcastSystemMessageEx function sends a message to the specified recipients. The recipients can be applications, installable drivers, network drivers, system-level device drivers, or any combination of these system components.
This function is similar to BroadcastSystemMessage except that this function can return more information from the recipients.
Syntax
long BroadcastSystemMessageEx( DWORD dwFlags,
LPDWORD lpdwRecipients,
UINT uiMessage,
WPARAM wParam,
LPARAM lParam,
PBSMINFO pBSMInfo
);
Parameters
dwFlags
[in] Specifies the broadcast option. This parameter can be one or more of the following values.
BSF_ALLOWSFW
Enables the recipient to set the foreground window while processing the message.
BSF_FLUSHDISK
Flushes the disk after each recipient processes the message.
BSF_FORCEIFHUNG
Continues to broadcast the message, even if the time-out period elapses or one of the recipients is not responding.
BSF_IGNORECURRENTTASK
Does not send the message to windows that belong to the current task. This prevents an application from receiving its own message.
BSF_LUID
Windows XP: If BSF_LUID is set, the message is sent to the window that has the same LUID as specified in the luid member of the BSMINFO structure.
BSF_NOHANG
Forces a nonresponsive application to time out. If one of the recipients times out, do not continue broadcasting the message.
BSF_NOTIMEOUTIFNOTHUNG
Waits for a response to the message, as long as the recipient is not being unresponsive. Does not time out.
BSF_POSTMESSAGE
Posts the message. Do not use in combination with BSF_QUERY.
BSF_RETURNHDESK
Windows XP: If access is denied and both this and BSF_QUERY are set, BSMINFO returns both the desktop handle and the window handle. If access is denied and only BSF_QUERY is set, only the window handle is returned by BSMINFO.
BSF_QUERY
Sends the message to one recipient at a time, sending to a subsequent recipient only if the current recipient returns TRUE.
BSF_SENDNOTIFYMESSAGE
Sends the message using SendNotifyMessage function. Do not use in combination with BSF_QUERY.
lpdwRecipients
[in, out] Pointer to a variable that contains and receives information about the recipients of the message.
When the function returns, this variable receives a combination of these values identifying which recipients actually received the message.
If this parameter is NULL, the function broadcasts to all components.
This parameter can be one or more of the following values.
BSM_ALLCOMPONENTS
Broadcast to all system components.
BSM_ALLDESKTOPS
Broadcast to all desktops. Requires the SE_TCB_NAME privilege.
BSM_APPLICATIONS
Broadcast to applications.
uiMessage
[in] Specifies the message to be sent.
wParam
[in] Specifies additional message-specific information.
lParam
[in] Specifies additional message-specific information.
pBSMInfo
[out] Pointer to a BSMINFO structure that contains additional information if the request is denied and dwFlags is set to BSF_QUERY.
Return Value
If the function succeeds, the return value is a positive value.
If the function is unable to broadcast the message, the return value is –1.
If the dwFlags parameter is BSF_QUERY and at least one recipient returned BROADCAST_QUERY_DENY to the corresponding message, the return value is zero. To get extended error information, call GetLastError .
Remarks
If BSF_QUERY is not specified, the function sends the specified message to all requested recipients, ignoring values returned by those recipients.
If the caller's thread is on a desktop other than that of the window that denied the request, the caller must call SetThreadDesktop (hdesk) to query anything on that window. Also, the caller must call CloseDesktop on the returned hdesk handle.
The system only does marshalling for system messages (those in the range 0 to ( WM_USER -1)). To send other messages (those >= WM_USER) to another process, you must do custom marshalling.
Function Information
Minimum DLL Versionuser32.dll
HeaderDeclared in Winuser.h, include Windows.h
Import libraryUser32.lib
Minimum operating systemsWindows XP
UnicodeImplemented as ANSI and Unicode versions.
See Also
Messages and Message Queues Overview , BroadcastSystemMessage , BSMINFO , SendNotifyMessage
==原始网址==http://msdn.microsoft.com/en-us/library/ms644933(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:25:16