ISyncProviderRegistration::SetSyncProviderState method (syncregistration.h)

Sets the state of the specified synchronization provider.

Syntax

HRESULT SetSyncProviderState(
  [in] LPCGUID pguidInstanceId,
  [in] DWORD   dwStateFlagsMask,
  [in] DWORD   dwStateFlags
);

Parameters

[in] pguidInstanceId

The unique instance ID of the synchronization provider.

[in] dwStateFlagsMask

A synchronization provider state flag that can be used to mask (preserve or remove) the existing state. If this parameter is set to zero, all synchronization provider states will be enumerated. See the dwStateFlags parameter description for a list of flags.

[in] dwStateFlags

One of the following flags that represent the synchronization provider state.

  • SYNC_PROVIDER_STATE_ENABLED ((DWORD)0x00000001)The provider is enabled and available for synchronization.
  • SYNC_PROVIDER_STATE_DIRTY ((DWORD)0x00000002)The active provider has been updated and has new data to synchronize.
If this parameter is set to zero, all synchronization provider states will be enumerated.

Return value

The possible return codes include, but are not limited to, the values shown in the following table.

Return code Description
S_OK
The method succeeded.
E_POINTER
Invalid pointer.
SYNC_E_REGISTRATION_NOTREGISTERED
A synchronization provider with the specified instance ID was not registered.

Remarks

To get the synchronization provider state, call the GetSyncProviderState method.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header syncregistration.h

See also

ISyncProviderRegistration Interface