The information in this article applies to:
SYMPTOMSWhen writing a C++ program that uses the Collaboration Data Objects (CDO) library, the reference to a pointer to a folder declared as a VARIANT data type causes a system error in the program. The error that occurs is:
CAUSEThe GetDefaultFolder method returns a value of type variant_t on the stack. This is copied to the VARIANT variable. The default constructor of the VARIANT does not increment the reference counter for the dispval member so that when the temporary variant_t is destroyed, dispatch member of the VARIANT is no longer valid. RESOLUTION
Declare the variable that holds the result of the GetDefaultFolder method
as variant_t rather than VARIANT. The constructor of the variant_t
increments the reference counter for the resulting folder pointer, so that
the dispatch member remains valid.
STATUSMicrosoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. MORE INFORMATIONSteps to Reproduce BehaviorThe following portion of code illustrates the problem:
Additional query words:
Keywords : kbcode kberrmsg kbCDO120 kbVC kbGrpMsg |
Last Reviewed: November 9, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |