User32BroadcastSystemMessage(BroadcastSystemMessageFlags, BroadcastSystemMessageInfo, UInt32, IntPtr, IntPtr) Method
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(BroadcastSystemMessageFlags, BroadcastSystemMessageInfo, WindowMessages, IntPtr, IntPtr, BroadcastSystemMessageExInfo) function.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("User32.dll", ExactSpelling = true, SetLastError = true)]
public static int BroadcastSystemMessage(
BroadcastSystemMessageFlags flags,
ref BroadcastSystemMessageInfo refInfo,
uint msg,
[OptionalAttribute] IntPtr wParam,
[OptionalAttribute] IntPtr lParam
)
<DllImportAttribute("User32.dll", ExactSpelling := true, SetLastError := true>]
Public Shared Function BroadcastSystemMessage (
flags As BroadcastSystemMessageFlags,
ByRef refInfo As BroadcastSystemMessageInfo,
msg As UInteger,
<OptionalAttribute> wParam As IntPtr,
<OptionalAttribute> lParam As IntPtr
) As Integer
Dim flags As BroadcastSystemMessageFlags
Dim refInfo As BroadcastSystemMessageInfo
Dim msg As UInteger
Dim wParam As IntPtr
Dim lParam As IntPtr
Dim returnValue As Integer
returnValue = User32.BroadcastSystemMessage(flags,
refInfo, msg, wParam, lParam)
public:
[DllImportAttribute(L"User32.dll", ExactSpelling = true, SetLastError = true)]
static int BroadcastSystemMessage(
BroadcastSystemMessageFlags flags,
BroadcastSystemMessageInfo% refInfo,
unsigned int msg,
[OptionalAttribute] IntPtr wParam,
[OptionalAttribute] IntPtr lParam
)
[<DllImportAttribute("User32.dll", ExactSpelling = true, SetLastError = true)>]
static member BroadcastSystemMessage :
flags : BroadcastSystemMessageFlags *
refInfo : BroadcastSystemMessageInfo byref *
msg : uint32 *
[<OptionalAttribute>] wParam : IntPtr *
[<OptionalAttribute>] lParam : IntPtr -> int
No code example is currently available or this language may not be supported.
- flags BroadcastSystemMessageFlags
-
The broadcast options.
- refInfo BroadcastSystemMessageInfo
-
A 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.
- msg UInt32
-
The message to be sent. See WindowMessages.
- wParam IntPtr (Optional)
-
Additional message-specific information.
- lParam IntPtr (Optional)
-
Additional message-specific information.
Int32
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
flags parameter is
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
GetLastWin32Error.