FIX: CComQIPtr operator= Causes an Access ViolationLast reviewed: December 1, 1997Article ID: Q174891 |
The information in this article applies to:
SYMPTOMSWhen a CComQIPtr is assigned a NULL pointer, an access violation occurs.
CAUSEWhen a CComQIPtr is assigned a NULL pointer, no check is done, and a QueryInterface is attempted with the NULL pointer. This behavior causes the access violation.
RESOLUTIONDo not assign NULL pointer to a CComQIPtr object.
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug has been fixed in Visual Studio 97 Service Pack 3. For more information, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q170365 TITLE : INFO: Visual Studio 97 Service Packs - What, Where, and Why MORE INFORMATION
Steps to Reproduce Behavior
CComQIPtr<IMyInterface, IID_IMyInterface> ptr; IUnknown* pUnk = NULL; ptr = pUnk;(c) Microsoft Corporation 1997, All Rights Reserved. Contributions by Chuck Bell, Microsoft Corporation Keywords : AtlIss VS97FixlistSP3 Version : WINDOWS:2.0,2.1 Platform : WINDOWS Issue type : kbbug Solution Type : kbfix kbservicepack |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |