EcInsertObjectArrayElement function (evcoll.h)

The EcInsertObjectArrayElement function inserts an empty object into an array of property values for the event sources of a subscription. The object is inserted at a specified array index.


BOOL EcInsertObjectArrayElement(
  [in] DWORD                           ArrayIndex


[in] ObjectArray

A handle to the array in which the object is inserted into. The array contains property values for the event sources of a subscription. The array handle is returned by the EcGetSubscriptionProperty method when the EcSubscriptionEventSources value is passed into the Subscription parameter.

[in] ArrayIndex

An array index indicating where to insert the object.

Return value

This function returns BOOL.


Arrays are zero-based, so the index for the first item in the array is 0.

Use the EcSetObjectArrayProperty to set individual properties of an empty object inserted into the array specified in the ObjectArray parameter.


For example code using the EcInsertObjectArrayElement function, see Adding an Event Source to a Collector Initiated Subscription.


Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header evcoll.h
Library Wecapi.lib
DLL Wecapi.dll

See also

Windows Event Collector Functions