EcSetObjectArrayProperty function

The EcSetObjectArrayProperty function is used to set a property value in an array of property values for the event sources of a subscription.

Syntax


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

Parameters

ObjectArray [in]

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 [in]

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 [in]

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

Flags [in]

Reserved. Must be 0.

PropertyValue [in]

The value of the property.

Return value

Return code/valueDescription
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.

Examples

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

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Redistributable

WinRM v1.1 (Windows Server 2003 R2 or Windows XP with SP2)

Header

Evcoll.h

Library

Wecapi.lib

DLL

Wecapi.dll

 

 

Community Additions

ADD
Show:
© 2014 Microsoft