EcSetObjectArrayProperty function

The EcSetObjectArrayProperty function sets a property value in an array of property values for the event sources of a subscription.

Syntax

BOOL EcSetObjectArrayProperty(
  EC_OBJECT_ARRAY_PROPERTY_HANDLE ObjectArray,
  EC_SUBSCRIPTION_PROPERTY_ID     PropertyId,
  DWORD                           ArrayIndex,
  DWORD                           Flags,
  PEC_VARIANT                     PropertyValue
);

Parameters

ObjectArray

A handle to the array that contains the property value to set. 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.

PropertyId

An identifier that specifies which property to set. Specify a value from the EC_SUBSCRIPTION_PROPERTY_ID enumeration. Set the Address, Enabled, UserName, and Password properties in the array by specifying the EcSubscriptionEventSourceAddress, EcSubscriptionEventSourceEnabled, EcSubscriptionEventSourceUserName, or EcSubscriptionEventSourcePassword values.

ArrayIndex

The index of the object in the array to set a property value on.

Flags

Reserved. Must be 0.

PropertyValue

The value of the property.

Return Value

This function returns BOOL.

Remarks

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

Examples

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

Requirements

   
Windows version Windows Vista Windows Server 2008
Target Platform Windows
Header evcoll.h
Library Wecapi.lib
DLL Wecapi.dll

See Also

Windows Event Collector Functions