CreateActivityCoordinatorPolicy function (activitycoordinator.h)

Allocates a new policy and pre-populates fields based on the supplied policy template enumeration. The caller can customize the policy further using SetActivityCoordinatorPolicyResourceCondition.

Syntax

HRESULT CreateActivityCoordinatorPolicy(
  ACTIVITY_COORDINATOR_POLICY_TEMPLATE policyTemplate,
  ACTIVITY_COORDINATOR_POLICY          *policy
);

Parameters

policyTemplate

Supplies a policy template enumeration value.

policy

Supplies a pointer to an ACTIVITY_COORDINATOR_POLICY handle that receives the created policy handle.

Return value

Returns an HRESULT.

Remarks

The caller should subscribe to the policy to receive coordination notifications using SubscribeActivityCoordinatorPolicy. When no longer needed, the caller should destroy the policy using DestroyActivityCoordinatorPolicy.

Requirements

   
Header activitycoordinator.h

See also

GetActivityCoordinatorPolicyResourceCondition

SetActivityCoordinatorPolicyResourceCondition

SubscribeActivityCoordinatorPolicy

DestroyActivityCoordinatorPolicy

ACTIVITY_COORDINATOR_POLICY_TEMPLATE