EcSaveSubscription function

The EcSaveSubscription function saves subscription configuration information. This function should be called whenever new values are added or updated to the subscription by the EcSetSubscriptionProperty method. If the subscription is enabled, the subscription will be activated when it is saved.

Syntax


BOOL WINAPI EcSaveSubscription(
  _In_ EC_HANDLE Subscription,
  _In_ DWORD     Flags
);

Parameters

Subscription [in]

The handle to the subscription object.

Flags [in]

Reserved. Must be NULL.

Return value

TRUE

The function was successful.

FALSE

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

Remarks

To retry a subscription for all the event sources of a subscription, use the EcSaveSubscription function instead of calling EcRetrySubscription on each event source individually.

The subscription will be active only if the collector service is running. The service must be set to automatically start and run after the computer is booted.

Examples

For example code using the EcSaveSubscription function, see Creating a Collector Initiated Subscription or Creating a Source 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: