The information in this article applies to:
SYMPTOMS
When using a class imported from an MFC extension DLL in an MFC application
with full server support for ActiveX documents, various problems may occur
including:
CAUSEThe header file, afxdocob.h, which is only included for full server of ActiveX documents, is missing the following near the end of the file:
RESOLUTIONAdd the above compiler directives after including afxdocob.h, or modify afxdocob.h. STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug has been corrected in Microsoft Visual C++ 5.0. MORE INFORMATION
The default data member packing for structures and classes is 8 bytes. MFC
headers change this to 4 bytes to save memory. Because afxdocob.h is
missing the #pragma pack(pop), all user class declarations compiled after
including this file will be packed with 4-byte alignment. When sharing this
class between an application and an extension DLL, the structure will be
packed differently since the extension DLL doesn't include afxdocob.h.
Subsequent use of this class may result in invalid data or an access
violation, especially when new and delete are called.
Additional query words: kbVC420bug kbDSupport AFXDLL
Keywords : kbole kbATL kbMFC kbServer kbVC kbVC500fix |
Last Reviewed: July 22, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |