From 5501f127dfc371f3163aab8bd822966564b4ef86 Mon Sep 17 00:00:00 2001 From: Aric Stewart Date: Fri, 16 Aug 2002 23:29:48 +0000 Subject: [PATCH] Very partial implementation of BroadcastSystemMessageA. --- include/winuser.h | 19 +++++++++++++++++++ windows/message.c | 22 ++++++++++++++++------ 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/include/winuser.h b/include/winuser.h index 8a3208f0763..3cbd01fa7e1 100644 --- a/include/winuser.h +++ b/include/winuser.h @@ -1539,6 +1539,25 @@ typedef struct #define GCW_ATOM (-32) #define GCL_HICONSM (-34) +/* BroadcastSystemMessage flags */ +#define BSM_ALLCOMPONENTS 0x00000000 +#define BSM_VXDS 0x00000001 +#define BSM_NETDRIVER 0x00000002 +#define BSM_INSTALLABLEDRIVERS 0x00000004 +#define BSM_APPLICATIONS 0x00000008 + +#define BSF_QUERY 0x00000001 +#define BSF_IGNORECURRENTTASK 0x00000002 +#define BSF_FLUSHDISK 0x00000004 +#define BSF_NOHANG 0x00000008 +#define BSF_POSTMESSAGE 0x00000010 +#define BSF_FORCEIFHUNG 0x00000020 +#define BSF_NOTIMEOUTIFNOTHUNG 0x00000040 +#define BSF_ALLOWSFW 0x00000080 +#define BSF_SENDNOTIFYMESSAGE 0x00000100 +#define BSF_RETURNHDESK 0x00000200 +#define BSF_LUID 0x00000400 + /***** Window hooks *****/ diff --git a/windows/message.c b/windows/message.c index de494f7953f..f668a378d12 100644 --- a/windows/message.c +++ b/windows/message.c @@ -1201,10 +1201,20 @@ WORD WINAPI RegisterWindowMessageW( LPCWSTR str ) */ LONG WINAPI BroadcastSystemMessage( DWORD dwFlags,LPDWORD recipients,UINT uMessage,WPARAM wParam, - LPARAM lParam -) { - FIXME("(%08lx,%08lx,%08x,%08x,%08lx): stub!\n", - dwFlags,*recipients,uMessage,wParam,lParam - ); - return 0; + LPARAM lParam ) +{ + if ((*recipients & BSM_APPLICATIONS)|| + (*recipients == BSM_ALLCOMPONENTS)) + { + FIXME("(%08lx,%08lx,%08x,%08x,%08lx): semi-stub!\n", + dwFlags,*recipients,uMessage,wParam,lParam); + PostMessageA(HWND_BROADCAST,uMessage,wParam,lParam); + return 1; + } + else + { + FIXME("(%08lx,%08lx,%08x,%08x,%08lx): stub!\n", + dwFlags,*recipients,uMessage,wParam,lParam); + return -1; + } }