EcInsertObjectArrayElement function

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.

Syntax


BOOL WINAPI EcInsertObjectArrayElement(
  _In_ EC_OBJECT_ARRAY_PROPERTY_HANDLE ObjectArray,
  _In_ DWORD                           ArrayIndex
);

Parameters

ObjectArray [in]

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.

ArrayIndex [in]

An array index indicating where to insert the object.

Return value

TRUE

The function was successful.

FALSE

The function failed. Use the GetLastError function to obtain the error code.

Remarks

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.

Examples

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

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Header

Evcoll.h

Library

Wecapi.lib

DLL

Wecapi.dll

See also

Windows Event Collector Functions

 

 

Show: