PRB: DDE Warning Message: Invalid Value: -32767
PSS ID Number: Q110873
Article last modified on 05-10-1994

3.10

WINDOWS


---------------------------------------------------------------------
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 the MFC. This hook procedure, found in line 408 of the
APPCORE.CPP file of the MFC 1.0 source, incorrectly passes internal DDEML
messages to the CallNextHookEx() function. When the hook procedure receives
a MSGF_DDEMGR message, it should instead return FALSE.

For additional information on processing DDEML messages from a WH_MSGFILTER
hook procedure, please see the following article(s) in the Microsoft
Knowledge Base:

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

RESOLUTION
==========

Although this warning message is generally harmless, one way to keep this
message from coming up 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
Microsoft Knowledge Base article referenced above recommends, and then
rebuild the library.

STATUS
======

Microsoft has confirmed this to be a problem in Microsoft Foundation
Classes version 1.0. We are researching this problem and will post new
information here in the Microsoft Knowledge Base as it becomes available.

Additional reference words: 3.10
KBCategory: Prg
KBSubcategory: UsrDde

=============================================================================

Copyright Microsoft Corporation 1994.
