EcGetSubscriptionProperty function

The EcGetSubscriptionProperty function retrieves a specific property value from a subscription object. The subscription object is specified by the handle passed into the Subscription parameter.

Syntax


BOOL WINAPI EcGetSubscriptionProperty(
  _In_  EC_HANDLE                   Subscription,
  _In_  EC_SUBSCRIPTION_PROPERTY_ID PropertyId,
  _In_  DWORD                       Flags,
  _In_  DWORD                       PropertyValueBufferSize,
  _In_  PEC_VARIANT                 PropertyValueBuffer,
  _Out_ PDWORD                      PropertyValueBufferUsed
);

Parameters

Subscription [in]

The handle to the subscription object.

PropertyId [in]

An identifier that specifies which property of the subscription to get. Specify a value from the EC_SUBSCRIPTION_PROPERTY_ID enumeration. If you specify the EcSubscriptionEventSources value, then a handle to an array (EC_OBJECT_ARRAY_PROPERTY_HANDLE) will be returned. You can then use the EcGetObjectArrayProperty and EcSetObjectArrayProperty functions to get and set the Address, Enabled, UserName, and Password properties in the array.

Flags [in]

Reserved. Must be NULL.

PropertyValueBufferSize [in]

The size of the user-supplied buffer to store the property value into.

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 function fails with ERROR_INSUFFICIENT_BUFFER.

Return value

TRUE

The function was successful.

FALSE

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

Examples

For example code using the EcGetSubscriptionProperty function, see Displaying the Properties of an Event Collector 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: