PRB: BroadcastSystemMessageA Not Found in User32.dll on Win 95Last reviewed: March 20, 1998Article ID: Q182809 |
The information in this article applies to:
SYMPTOMSIf you use BroadcastSystemMessage() in an application written with Visual C++ 4.x or 5.x or the Platform SDK, the application fails on Windows 95 with the following error:
BroadcastSystemMessageA not found in User32.dll. CAUSEThe Winuser.h file included with Visual C++ 4.x and 5.x and the Platform SDK defines BroadcastSystemMessage as BroadcastSystemMessageA if UNICODE is not defined. Because Windows NT 4.0 exports BroadcastSystemMessage and BroadcastSystemMessageA as the same ordinal, this works as expected. Because Windows 95 does not export BroadcastSystemMessageA, the run-time bind to User32.dll fails and the application is aborted.
RESOLUTIONIn Winuser.h, change the #define that reads:
#define BroadcastSystemMessage BroadcastSystemMessageAto read:
#define BroadcastSystemMessage BroadcastSystemMessageBecause Windows NT exports both BroadcastSystemMessage and BroadcastSystemMessageA for the same ordinal, this work-around allows the application to work on Windows NT 4.x and Windows 95.
STATUSMicrosoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATIONYou can reproduce this problem by creating a dialog-based MFC application and placing the following code in InitInstance (replacing "TODO: Place code here to handle when the dialog is dismissed with OK"):
BroadcastSystemMessage(BSF_POSTMESSAGE,BSM_ALLCOMPONENTS,WM_NULL,0,0);This sends a harmless message to all components in the system. On a system that demonstrates the problem, the error dialog box appears and the application fails.
|
Additional query words: Win95 NT4 BroadcastSystemMessage User32.dll
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |