Partager via


CComDynamicUnkArray Class

This class stores an array of IUnknown pointers.

class CComDynamicUnkArray

Members

Public Constructors

Name

Description

CComDynamicUnkArray::CComDynamicUnkArray

Constructor. Initializes the collection values to NULL and the collection size to zero.

CComDynamicUnkArray::~CComDynamicUnkArray

The destructor.

Public Methods

Name

Description

CComDynamicUnkArray::Add

Call this method to add an IUnknown pointer to the array.

CComDynamicUnkArray::begin

Returns a pointer to the first IUnknown pointer in the collection.

CComDynamicUnkArray::clear

Empties the array.

CComDynamicUnkArray::end

Returns a pointer to one past the last IUnknown pointer in the collection.

CComDynamicUnkArray::GetAt

Retrieves the element at the specified index.

CComDynamicUnkArray::GetCookie

Call this method to get the cookie associated with a given IUnknown pointer.

CComDynamicUnkArray::GetSize

Returns the length of an array.

CComDynamicUnkArray::GetUnknown

Call this method to get the IUnknown pointer associated with a given cookie.

CComDynamicUnkArray::Remove

Call this method to remove an IUnknown pointer from the array.

Remarks

CComDynamicUnkArray holds a dynamically allocated array of IUnknown pointers, each an interface on a connection point. CComDynamicUnkArray can be used as a parameter to the IConnectionPointImpl template class.

The CComDynamicUnkArray methods begin and end can be used to loop through all connection points (for example, when an event is fired).

See Adding Connection Points to an Object for details on automating creation of connection point proxies.

Note

Note   The class CComDynamicUnkArray is used by the Add Class wizard when creating a control which has Connection Points. If you wish to specify the number of Connection Points manually, change the reference from CComDynamicUnkArray to CComUnkArray< n >, where n is the number of connection points required.

Requirements

Header: atlcom.h

See Also

Reference

CComUnkArray Class

Other Resources

ATL Class Overview