Partager via


COM_INTERFACE_ENTRY_CACHED_TEAR_OFF

Saves the interface-specific data for every instance.

COM_INTERFACE_ENTRY_CACHED_TEAR_OFF( iid, x, punk )

Parameters

  • iid
    [in] The GUID of the tear-off interface.

  • x
    [in] The name of the class implementing the interface.

  • punk
    [in] The name of an IUnknown pointer. Must be a member of the class containing the COM map. Should be initialized to NULL in the class object's constructor.

Remarks

If the interface is not used, this lowers the overall instance size of your object.

See COM_INTERFACE_ENTRY Macros for remarks about COM map entries.

Example

BEGIN_COM_MAP(COuter)
   COM_INTERFACE_ENTRY(IOuter)
   COM_INTERFACE_ENTRY_CACHED_TEAR_OFF(IID_ITearOff, CTearOff, punkTearOff)
END_COM_MAP()

Requirements

Header: atlcom.h

See Also

Other Resources

COM Map Macros

ATL Macros