EcGetObjectArrayProperty function
The EcGetObjectArrayProperty function is used to get property values from a handle to an array of event source properties. The array contains property values for the event sources of a subscription.
Syntax
BOOL WINAPI EcGetObjectArrayProperty( _In_ EC_OBJECT_ARRAY_PROPERTY_HANDLE ObjectArray, _In_ EC_SUBSCRIPTION_PROPERTY_ID PropertyId, _In_ DWORD ArrayIndex, _In_ DWORD Flags, _In_ DWORD PropertyValueBufferSize, _In_ PEC_VARIANT PropertyValueBuffer, _Out_ PDWORD PropertyValueBufferUsed );
Parameters
- ObjectArray [in]
-
A handle to an array of properties for the event sources for a subscription. An array handle that is returned by the EcGetSubscriptionProperty method when the EcSubscriptionEventSources value is passed into the PropertyId parameter.
- PropertyId [in]
-
The property identifier for properties in the array. Specify a value from the EC_SUBSCRIPTION_PROPERTY_ID enumeration. Get 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 array that specifies which event source to get the property from.
- Flags [in]
-
Reserved. Must be 0.
- PropertyValueBufferSize [in]
-
The size of the buffer that contains the value of the property. The size must be at least the size of an EC_VARIANT value.
- PropertyValueBuffer [in]
-
The user-supplied buffer to store property value into.
- PropertyValueBufferUsed [out]
-
The size of the user-supplied buffer that is used by the function on successful return, or the size that is necessary to store the property value when the function fails with ERROR_INSUFFICIENT_BUFFER.
Return value
| Return code/value | Description |
|---|---|
|
The function was successful. |
|
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.
The Password property for an event source or the subscription cannot be retrieved. For security reasons, an empty string is returned for the property value and the last error will be set to ERROR_ACCESS_DENIED.
A subscription can have multiple event sources, and each source can have an Address, Enabled, UserName, and Password property.
Examples
For example code using the EcGetObjectArrayProperty function, see Displaying the Properties of an Event Collector 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 |
|
|
Library |
|
|
DLL |
|
Send comments about this topic to Microsoft
Build date: 11/21/2012
