FIX: DDE Warning Message: Invalid Value: -32767

Last reviewed: October 29, 1997
Article ID: Q111013
3.10 WINDOWS kbprg kbfixlist kbbuglist

The information in this article applies to:

  • Microsoft Windows Software Development Kit (SDK) for Windows version 3.1

SYMPTOMS

When executing a call to DdeClientTransaction() from a Microsoft Foundation Class (MFC) Library application in the debug version of Windows 3.1, the following warning message is displayed in the debug monitor:

   wn  CLIENTAPP  CallNextHookEx + 2C: Invalid value: -32767"

CAUSE

This error message is caused by the _AfxMsgFilterHook hook procedure installed by MFC. This hook procedure, found in line 408 of the file APPCORE.CPP of the MFC source, incorrectly passes internal DDEML messages to the CallNextHookEx() function. When the hook procedure receives a MSGF_DDEMGR message, it should return FALSE instead.

For additional information, please see the following article(s) in the Microsoft Knowledge Base:

   ARTICLE-ID: Q89828
   TITLE     : Do Not Forward DDEML Messages from a Hook Procedure

RESOLUTION

Although this warning message is generally harmless, one way to prevent this message is to modify the _AfxMsgFilterHook function in the APPCORE.CPP file (found in \MSVC\MFC\SRC directory for Microsoft Visual C++ version 1.0) to return FALSE if (code == MSGF_DDEMGR), as the KB article above recommends, and then rebuild the library.

STATUS

Microsoft has confirmed this to be a bug in Microsoft Foundation Classes (MFC) versions 1.0, 2.0, 2.5, 2.51, and 2.52. This problem was corrected in MFC version 2.53, which was included with Visual C++ for Windows version 1.53.


Additional reference words: 1.00 2.00 2.50 3.10
KBCategory: kbprg kbfixlist kbbuglist
KBSubcategory: UsrDde
Technology : kbMfc
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: October 29, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.