CSC_SynchronizationConfig enumeration (comsvcs.h)

Indicates how synchronization is configured for CServiceConfig.

Syntax

typedef enum tagCSC_SynchronizationConfig {
  CSC_NoSynchronization = 0,
  CSC_IfContainerIsSynchronized,
  CSC_NewSynchronizationIfNecessary,
  CSC_NewSynchronization
} CSC_SynchronizationConfig;

Constants

 
CSC_NoSynchronization
Value: 0
The code is forced to run unsynchronized. This is the default synchronization setting for CServiceConfig when CSC_InheritanceConfig is set to CSC_Ignore.
CSC_IfContainerIsSynchronized
The code runs in the containing synchronization domain if one exists. This is the default synchronization setting for CServiceConfig when CSC_InheritanceConfig is set to CSC_Inherit.
CSC_NewSynchronizationIfNecessary
Synchronization is always used. The existing synchronization domain is used, or if the enclosed context does not already use synchronization, a new synchronization domain is created.
CSC_NewSynchronization
A new synchronization domain is always created.

Remarks

This enumeration is used to configure synchronization through CServiceConfig for either the work submitted through the activity created by CoCreateActivity or the work that is enclosed between calls to CoEnterServiceDomain and CoLeaveServiceDomain.

Synchronization can affect the components created by the contained code even if it has no immediate impact on the contained code itself. For example, if the same code is running on two different threads and this code calls CoEnterServiceDomain asking for synchronization services, each thread is contained in its own synchronization domain.

If it is incompatible with the transaction setting from CSC_TransactionConfig, the synchronization setting is increased to the minimum that is required for the transaction.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Header comsvcs.h

See also

COM+ Synchronization

CServiceConfig

CoCreateActivity

CoEnterServiceDomain

IServiceSynchronizationConfig::ConfigureSynchronization