Breyta

Deila með


EventTargetArray Class

Supports the WRL infrastructure and is not intended to be used directly from your code.

Syntax

class EventTargetArray :
    public Microsoft::WRL::RuntimeClass<
        Microsoft::WRL::RuntimeClassFlags<ClassicCom>,
        IUnknown
    >;

Remarks

Represents an array of event handlers.

The event handlers that are associated with an EventSource object are stored in a protected EventTargetArray data member.

Members

Public Constructors

Name Description
EventTargetArray::EventTargetArray Initializes a new instance of the EventTargetArray class.
EventTargetArray::~EventTargetArray Deinitializes the current EventTargetArray class.

Public Methods

Name Description
EventTargetArray::AddTail Appends the specified event handler to the end of the internal array of event handlers.
EventTargetArray::Begin Gets the address of the first element in the internal array of event handlers.
EventTargetArray::End Gets the address of the last element in the internal array of event handlers.
EventTargetArray::Length Gets the current number of elements in the internal array of event handlers.

Inheritance Hierarchy

EventTargetArray

Requirements

Header: event.h

Namespace: Microsoft::WRL::Details

EventTargetArray::~EventTargetArray

Supports the WRL infrastructure and is not intended to be used directly from your code.

~EventTargetArray();

Remarks

Deinitializes the current EventTargetArray class.

EventTargetArray::AddTail

Supports the WRL infrastructure and is not intended to be used directly from your code.

void AddTail(
   _In_ IUnknown* element
);

Parameters

element
Pointer to the event handler to append.

Remarks

Appends the specified event handler to the end of the internal array of event handlers.

AddTail() is intended to be used internally by only the EventSource class.

EventTargetArray::Begin

Supports the WRL infrastructure and is not intended to be used directly from your code.

ComPtr<IUnknown>* Begin();

Return Value

The address of the first element in the internal array of event handlers.

Remarks

Gets the address of the first element in the internal array of event handlers.

EventTargetArray::End

Supports the WRL infrastructure and is not intended to be used directly from your code.

ComPtr<IUnknown>* End();

Return Value

The address of the last element in the internal array of event handlers.

Remarks

Gets the address of the last element in the internal array of event handlers.

EventTargetArray::EventTargetArray

Supports the WRL infrastructure and is not intended to be used directly from your code.

EventTargetArray(
   _Out_ HRESULT* hr,
   size_t items
);

Parameters

hr
After this constructor operations, parameter hr indicates whether allocation of the array succeeded or failed. The following list shows the possible values for hr.

  • S_OK
    The operation succeeded.

  • E_OUTOFMEMORY
    Memory couldn't be allocated for the array.

  • S_FALSE
    Parameter items is less than or equal to zero.

items
The number of array elements to allocate.

Remarks

Initializes a new instance of the EventTargetArray class.

EventTargetArray is used to keep an array of event handlers in an EventSource object.

EventTargetArray::Length

Supports the WRL infrastructure and is not intended to be used directly from your code.

size_t Length();

Return Value

The current number of elements in the internal array of event handlers.

Remarks

Gets the current number of elements in the internal array of event handlers.