FIX: Registered Message in a USRDLL May Cause a GPF

Last reviewed: September 18, 1997
Article ID: Q116303
1.00 WINDOWS kbprg kbfixlist kbbuglist

The information in this article applies to:

  • The Microsoft Foundation Classes (MFC), included with: Microsoft Visual C++ for Windows, version 1.0

SYMPTOMS

Using a registered message in a USRDLL may cause a general protection fault (GPF).

CAUSE

The CWnd::WindowProc() function does not calculate the address of the registered message correctly.

RESOLUTION

To avoid the problem, do one of the following:

  • Upgrade to Visual C++ for Windows, version 1.5, since this problem was fixed in the MFC library, version 2.5.

    -or-

  • Modify the CWnd::WindowProc() function in the MFC library source code and rebuild the USRDLL version of the library. To do this, change line 908 of the file WINCORE.CPP from

           #ifndef _WINDLL
    

    to

           #ifndef _AFXDLL
    

    After making this change, rebuild the USRDLL version of the MFC library by following the procedure outlined on page 303 of Appendix B in the "Class Library User's Guide."

STATUS

Microsoft has confirmed this to be a problem in Visual C++ for Windows, version 1.0. This problem was corrected in Visual C++ for Windows, version 1.5. This is not a problem in Visual C++ 32-bit Edition.


Additional reference words: 1.00 2.00
KBCategory: kbprg kbfixlist kbbuglist
KBSubcategory: MfcDLL
Keywords : kb16bitonly MfcDLL kbbuglist kbfixlist kbprg
Technology : kbMfc
Version : 1.00
Platform : WINDOWS
Solution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 18, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.