IDispEventImpl

template <UINT nID, class T, const IID* pdiid = &IID_NULL, const GUID* plibid = &GUID_NULL, WORD wMajor = 0, WORD wMinor = 0, class tihclass = CComTypeInfoHolder>
class ATL_NO_VTABLE IDispEventImpl : public _IDispEventLocator<
nID, pdiid>

Parameters

nID

An identifier, unique to the class, that must match the nID in the SINK_ENTRY or SINK_ENTRY_EX macros in the sink map for the class T. For composite controls, use the resource ID for this parameter.

T

The user's class, which is derived from IDispEventImpl.

pdiid

The pointer to either a GUID, or its dispatch ID, for the dispatch interface of the event interface that this class implements. This interface is defined in the type library pointed to by plibid.

plibid

A pointer to the type library that defines the dispatch interface pointed to by pdiid. If &GUID_NULL, the type library will be loaded from the object sourcing the events.

wMajor

The major version of the type library. The default value is 0.

wMinor

The minor version of the type library. The default value is 0.

tihclass

The class used to manage the type information for T. The default value is a class of type CComTypeInfoHolder; however, you can override this template parameter by providing a class of a type other than CComTypeInfoHolder.

IDispEventImpl provides support for connection points for an ATL COM object. These connection points are mapped with an event sink map, which is provided by your COM object.

When you use IDispEvenImpl, you always use it from within the client, which implements the sink event.

When you implement an event sink using IDispatchImpl, there is no need to sync every event on the interface.

You must provide one IDispEventImpl interface for each object for which you must handle events. The IDispEventImpl parameter nID identifies the object associated with the interface, and, in the case of a composite control, it must match the control's id parameter listed in the SINK_ENTRY macro. The event sink map ensures that event notifications are handled by the proper function.

IDispEventSimplImpl provides the same functionality as IDispEventImpl, except it does not hold the type information.

For more information, see Supporting IDispEventImpl.

#include <atlcom.h>

Class Members

See Also

IDispatchImpl