Export (0) Print
Expand All
Expand Minimize

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

From the ATL sample COMMAP:

BEGIN_COM_MAP(COuter)
   ...
   COM_INTERFACE_ENTRY_CACHED_TEAR_OFF(IID_ITearOff2, 
      CTearOff2, m_pUnkTearOff2.p)
   ...
END_COM_MAP()

See Also

COM Map Macros | ATL Macros

Show:
© 2014 Microsoft