The information in this article applies to:
SYMPTOMSThe sample applications Ddepop1.exe and Showpop1.exe, found in Chapter 17 of "Programming Windows 95" by Charles Petzold, contain errors that prevent them from running properly under 32-bit Windows. When these applications are run together, the client may pop up a message box and may neglect to establish links on all of the requested items. You may also experience memory leakage. CAUSESpecifically, when WM_DDE_ACK messages are pulled off the message queue via calls to PeekMessage(), the author neglects to invoke UnpackDDElParam() prior to using the data referenced by the lParam member of the MSG structure. Depending on the value of the handle returned from PackDDElParam, this may cause a successful ACK to return failure instead. The memory leakage invariably occurs as the calls to GlobalDeleteAtom uniformly fail. This appears to have been a simple oversight when porting the 16-bit samples from the author's previous book. RESOLUTIONReplace the code beginning at line 575 of DDEPOP1.C with the following:
You will also need to substitute the following corrected code for the code
that begins at line 161 of SHOWPOP1.C:
REFERENCES"Programming Windows 95," Charles Petzold, Microsoft Press, 1996. Additional query words:
Keywords : kbcode kbprg kbDDE kbGrpUser kbUser |
Last Reviewed: December 7, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |