 |
|
|  |  |
 |
BroadcastSystemMessage Add comment W32 Constants Translate this page |
 |
 |
|
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. |
 |  | | Code examples: |  | |
|
 |  | | Declaration: |  |  |
long BroadcastSystemMessage(
DWORD dwFlags,
LPDWORD lpdwRecipients,
UINT uiMessage,
WPARAM wParam,
LPARAM lParam
);
|
 |  |  | | FoxPro declaration: |  |  |
DECLARE INTEGER BroadcastSystemMessage IN user32;
INTEGER dwFlags,;
INTEGER @ lpdwRecipients,;
INTEGER uiMessage,;
INTEGER wParam,;
INTEGER lParam
|
 |  |  | | Parameters: |  | dwFlags
[in] Specifies the broadcast option.
lpdwRecipients
[in] Pointer to a variable that contains and receives information about the recipients of the message.
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. |
 |  | | My comment: |  | As an example, you can carefully try this code:
LOCAL nRecipients
nRecipients = BSM_APPLICATIONS
= BroadcastSystemMessage(BSF_POSTMESSAGE,;
@nRecipients, WM_CLOSE, 0, 0)
Most likely, it will close all open windows including the taskbar window, leaving you with a bare empty desktop. So before running this code make sure that all critical applications are closed.
Note that nRecipients is initialized and then passed to the function by reference. For me, that does not make much sense, since the documentation for this function describes this parameter as input only. Who knows, it could be important for some modes, say for BSF_QUERY mode.
In another example we may try to minimize all reachable windows:
= BroadcastSystemMessage(BSF_POSTMESSAGE,;
@nRecipients, WM_SYSCOMMAND, SC_MINIMIZE, 0)
The function goes far beyond of what you could expect. Everything gets minimized, including system windows and windows that were initially hidden. So be ready to restart your computer right after you try the second example. |
 |  | | Word Index links for the BroadcastSystemMessage : |  | |
|
 |  | | Translate this page: |  | |  |  | | • |  | | Created: | 2005-04-28 16:42:06 | | Modified: | 2005-04-28 17:01:46 | Visited in last 7 days: 14 |
|
 |
 |
 |
 |
Copyright © 2001-2013
News2News, Inc.
Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use.
The information on this page is presented AS IS, meaning that you may use it at your own risk.
Microsoft Visual FoxPro
and Windows are trade marks
of Microsoft Corp.
All other trademarks are the property of their respective owners.
Privacy policy
|
 |
 |
 |
Credits: PHP (4.4.9), an HTML-embedded scripting language,
MySQL (5.1.55-log), the Open Source standard SQL database,
AceHTML Freeware
Version 4, freeware HTML Editor of choice. Hosted by Korax Online Inc. |
 |
 |
|
 |