网站首页  词典首页

请输入您要查询的函数:

 

术语 broadcastsystemmessage
释义 BroadcastSystemMessage
语法:
long BroadcastSystemMessage( DWORD dwFlags,
LPDWORD lpdwRecipients,
UINT uiMessage,
WPARAM wParam,
LPARAM lParam
);
BroadcastSystemMessage功能
该BroadcastSystemMessage函数将消息发送到指定的收件人。受助人可以申请,安装驱动程序,网络驱动器,系统级设备驱动程序,或这些系统组件的组合。
为了获得更多的信息,如果请求的定义,使用BroadcastSystemMessageEx功能。
参数
dwFlags
[in]指定播放选项。此参数可以是一个或多个下列值。
BSF_ALLOWSFW
视窗2000/XP的:使收件人设置前台窗口在处理邮件。
BSF_FLUSHDISK
刷新磁盘每个收件人后处理消息。
BSF_FORCEIFHUNG
继续广播消息,即使超时期间满期或一个收件人没有响应。
BSF_IGNORECURRENTTASK
不将消息发送给窗口属于当前任务。这可以防止自己的消息接收申请。
BSF_NOHANG
强制超时无反应的应用。如果收件人超时一,不要继续广播消息。
BSF_NOTIMEOUTIFNOTHUNG
等待一到消息的反应,只要收件人不被响应。不超时。
BSF_POSTMESSAGE
职位的消息。不要使用与BSF_QUERY组合。
BSF_QUERY
将消息发送到一个收件人一次,发送到后来的收件人,如果目前只有收件人返回TRUE。
BSF_SENDNOTIFYMESSAGE
视窗2000/XP的:发送邮件使用SendNotifyMessage功能。不要使用与BSF_QUERY组合。
lpdwRecipients
[in]指向一个变量,它包含并接收关于该邮件的收件人信息。
当函数返回时,这个变量接收这些确定哪些人实际收到的消息值的组合。
如果该参数为NULL,则函数广播的所有组成部分。
此参数可以是一个或多个下列值。
BSM_ALLCOMPONENTS
广播到所有的系统组件。
BSM_ALLDESKTOPS
Windows NT/2000/XP的:广播到所有的桌面。需要SE_TCB_NAME特权。
BSM_APPLICATIONS
广播应用。
BSM_INSTALLABLEDRIVERS
Windows 95/98/Me中:广播的安装驱动程序。
BSM_NETDRIVER
Windows 95/98/Me中:广播,网络驱动程序。
BSM_VXDS
Windows 95/98/Me中:广播到所有系统级设备驱动程序。
uiMessage
[in]指定要发送的信息。
wParam
[in]指定附加消息的特定信息。
lparam的
[in]指定附加消息的特定信息。
返回值
如果函数成功,返回值是一个积极的价值。
如果函数是无法播放的消息,则返回值为-1。
如果dwFlags参数是BSF_QUERY和至少一个收件人返回BROADCAST_QUERY_DENY相应的信息,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
如果没有指定BSF_QUERY,函数指定的消息发送给所有要求的人,这些人无视返回的值。
该系统不仅为系统消息编组(范围为0至(WM_USER -1))的。其他消息发送(即“= WM_USER)到另一个进程,则必须自定义编组。
Windows 95中:注意BroadcastSystemMessage只有一个版本。
在Windows 95/98/Me:BroadcastSystemMessageW是支持的Unicode(MSLU)微软层。要使用此,您必须将某些文件到您的应用,概述了对Unicode的Microsoft层在Windows 95/98/Me系统。
例如
有关示例,请参阅终止一个进程。
功能信息
最低DLL版本 user32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低操作系统Windows 95,Windows NT 4.0
UnicodeImplemented为Unicode版本。
参见
消息和消息队列概述,BroadcastSystemMessageEx,SendNotifyMessage
==英文原文==BroadcastSystemMessage Function
The BroadcastSystemMessage 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.
To receive additional information if the request is defined, use the BroadcastSystemMessageEx function.
Syntax
long BroadcastSystemMessage( DWORD dwFlags,
LPDWORD lpdwRecipients,
UINT uiMessage,
WPARAM wParam,
LPARAM lParam
);
Parameters
dwFlags
[in] Specifies the broadcast option. This parameter can be one or more of the following values.
BSF_ALLOWSFW
Windows 2000/XP: 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_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_QUERY
Sends the message to one recipient at a time, sending to a subsequent recipient only if the current recipient returns TRUE.
BSF_SENDNOTIFYMESSAGE
Windows 2000/XP: Sends the message using SendNotifyMessage function. Do not use in combination with BSF_QUERY.
lpdwRecipients
[in] 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
Windows NT/2000/XP: Broadcast to all desktops. Requires the SE_TCB_NAME privilege.
BSM_APPLICATIONS
Broadcast to applications.
BSM_INSTALLABLEDRIVERS
Windows 95/98/Me: Broadcast to installable drivers.
BSM_NETDRIVER
Windows 95/98/Me: Broadcast to network drivers.
BSM_VXDS
Windows 95/98/Me: Broadcast to all system-level device drivers.
uiMessage
[in] Specifies the message to be sent.
wParam
[in] Specifies additional message-specific information.
lParam
[in] Specifies additional message-specific information.
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.
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.
Windows 95: Note that BroadcastSystemMessage has only one version.
Windows 95/98/Me: BroadcastSystemMessageW is supported by the Microsoft Layer for Unicode (MSLU). To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems .
Example
For an example, see Terminating a Process .
Function Information
Minimum DLL Versionuser32.dll
HeaderDeclared in Winuser.h, include Windows.h
Import libraryUser32.lib
Minimum operating systemsWindows 95, Windows NT 4.0
UnicodeImplemented as Unicode version.
See Also
Messages and Message Queues Overview , BroadcastSystemMessageEx , SendNotifyMessage
==原始网址==http://msdn.microsoft.com/en-us/library/ms644932(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:28:46