BUG: AV May Occur When _ATL_DEBUG_INTERFACES Is Defined in ATL Provider (304417)
The information in this article applies to:
- Microsoft Visual Studio, Enterprise Edition 6.0
This article was previously published under Q304417 SYMPTOMS
An access violation (AV) may occur in the OLE DB Services layer whenever the _ATL_DEBUG_INTERFACES macro is defined within an Active Template Library (ATL) provider. When this occurs, the following error message is usually reported from the OLE DB client application:
"catastrophic failure"
CAUSE
Defining _ATL_DEBUG_QI and _ATL_DEBUG_INTERFACES when writing an ATL provider causes a QIThunk object to be created for each interface requested by way of a QueryInterface() call. The code in the OLE DB services causes the QIThunk to be freed prematurely, and any attempt to use that freed object results in an access violation.
RESOLUTION
Remove the _ATL_DEBUG_XXX definitions from any custom ATL provider that uses the OLE DB services.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. REFERENCES
For additional information on using the OLE DB Provider Templates, see the Platform SDK documentation.
| Modification Type: | Minor | Last Reviewed: | 8/15/2005 |
|---|
| Keywords: | kbbug kbpending KB304417 |
|---|
|