The information in this article applies to:
SYMPTOMSAn Access Violation may occur in GetAmbientDisplayName if the BSTR parameter passed to it is uninitialized. This is most likely to occur if the BSTR was declared as a local variable. CAUSEIn Visual C++ 6.0, the ATL implementation of GetAmbientDisplayName assumes that all non-NULL BSTRs are initialized, and passes them to ::SysFreeString. This assumption can cause problems because any uninitialized BSTR declared inside a function could be non-NULL. RESOLUTIONSet any uninitialized BSTRs to NULL before calling GetAmbientDisplayName. STATUSThis behavior is by design. MORE INFORMATION
The ATL implementation of GetAmbientDisplayName in Visual C++ 5.0 assumes
all BSTRs are uninitialized and does not free memory before using them,
which can cause leaks. Also, no memory is allocated for the BSTR and the
value of the BSTR is set to memory that is then freed, which can cause
access violations. Additional query words:
Keywords : kbnokeyword kbCOMt kbVC600 kbATL300 kbGrpMFCATL |
Last Reviewed: November 23, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |