BUG: An ATL event does not fire when the event is defined with an interface alias in Visual C++ 6.0 (244204)
The information in this article applies to:
- The Microsoft Active Template Library (ATL) 3.0, when used with:
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
This article was previously published under Q244204 SYMPTOMS
When using IDispEventImpl to sink events in an ATL container, the event does not fire and the IDispatch::Invoke call to fire the event returns S_OK. The event actually fails in the call to ITypeInfo2::GetFuncIndexOfMemId with an HRESULT of 0x8002802B within IDispEventSimpleImpl::Invoke.
CAUSE
A dispinterface may be defined by explicitly listing the set of supported methods and properties or by listing a single interface. Both methods are shown here.
[
[attributes]
]
dispinterface dispinterface-name
{
properties:
property-list
methods:
method-list
};
[
[attributes]
]
dispinterface dispinterface-name
{
interface interface-name
};
The symptoms described occur if the event interface that the container is trying to provide a sink for is defined by listing a single interface.
RESOLUTION
Define the event interface, that uses IDispEventImpl to sink events, by listing the individual properties and methods, or derive the sink object from IDispEventSimpleImpl instead of IDispEventImpl.
For more information about how to use IDispEventSimpleImpl, click the following article number to view the article in the Microsoft Knowledge Base:
194179
AtlEvnt.exe sample shows how to create ATL sinks by using the ATL IDispEventImpl and IDispEventSimpleImpl classes
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.
Modification Type: | Major | Last Reviewed: | 9/30/2005 |
---|
Keywords: | kbtshoot kbActivexEvents kbBug kbIDL KB244204 kbAudDeveloper |
---|
|