description | title | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | |||
---|---|---|---|---|---|---|---|---|
Learn more about: COM Map Global Functions |
COM Map Global Functions |
11/04/2016 |
|
|
b9612d30-eb23-46ef-8093-d56f237d3cf1 |
These functions provide support for COM Map IUnknown
implementations.
Function | Description |
---|---|
AtlInternalQueryInterface | Delegates to the IUnknown of a nonaggregated object. |
InlineIsEqualIUnknown | Generates efficient code for comparing interfaces against IUnknown . |
Header: atlbase.h
Retrieves a pointer to the requested interface.
HRESULT AtlInternalQueryInterface(
void* pThis,
const _ATL_INTMAP_ENTRY* pEntries,
REFIID iid,
void** ppvObject);
pThis
[in] A pointer to the object that contains the COM map of interfaces exposed to QueryInterface
.
pEntries
[in] An array of _ATL_INTMAP_ENTRY
structures that access a map of available interfaces.
iid
[in] The GUID of the interface being requested.
ppvObject
[out] A pointer to the interface pointer specified in iid, or NULL if the interface is not found.
One of the standard HRESULT values.
AtlInternalQueryInterface
only handles interfaces in the COM map table. If your object is aggregated, AtlInternalQueryInterface
does not delegate to the outer unknown. You can enter interfaces into the COM map table with the macro COM_INTERFACE_ENTRY or one of its variants.
[!code-cppNVC_ATL_Windowing#94]
Call this function, for the special case of testing for IUnknown
.
BOOL InlineIsEqualUnknown(REFGUID rguid1);
rguid1
[in] The GUID to compare to IID_IUnknown
.