Skip to content

Latest commit

 

History

History
77 lines (63 loc) · 1.98 KB

File metadata and controls

77 lines (63 loc) · 1.98 KB
title COM Map Macros | Microsoft Docs
ms.custom
ms.date 11/04/2016
ms.reviewer
ms.suite
ms.technology
cpp-windows
ms.tgt_pltfrm
ms.topic reference
dev_langs
C++
helpviewer_keywords
COM interfaces, COM map macros
ms.assetid 0f33656d-321f-4996-90cc-9a7f21ab73c3
caps.latest.revision 16
author mikeblome
ms.author mblome
manager ghogen
translation.priority.ht
cs-cz
de-de
es-es
fr-fr
it-it
ja-jp
ko-kr
pl-pl
pt-br
ru-ru
tr-tr
zh-cn
zh-tw

COM Map Macros

These macros define COM interface maps.

BEGIN_COM_MAP Marks the beginning of the COM interface map entries.
END_COM_MAP Marks the end of the COM interface map entries.

Requirements

Header: atlcom.h

BEGIN_COM_MAP

The COM map is the mechanism that exposes interfaces on an object to a client through QueryInterface.

BEGIN_COM_MAP(x)

Parameters

x
[in] The name of the class object you are exposing interfaces on.

Remarks

CComObjectRootEx::InternalQueryInterface only returns pointers for interfaces in the COM map. Start your interface map with the BEGIN_COM_MAP macro, add entries for each of your interfaces with the COM_INTERFACE_ENTRY macro or one of its variants, and complete the map with the END_COM_MAP macro.

Example

From the ATL BEEPER sample:

[!code-cppNVC_ATL_COM#1]

END_COM_MAP

Ends the definition of your COM interface map.

END_COM_MAP()

See Also

Macros
COM Map Global Functions