WsMatchPolicyAlternative function (webservices.h)
Verifies that a Policy Alternative is compatible with the specified Policy Constraint. If the alternative is compatible the constraint structures are populated with Policy information.
HRESULT WsMatchPolicyAlternative( WS_POLICY *policy, ULONG alternativeIndex, WS_POLICY_CONSTRAINTS *policyConstraints, BOOL matchRequired, WS_HEAP *heap, WS_ERROR *error );
A pointer to a WS_POLICY object containing the alternative.
Specifies the zero-based index that identifies the alternative to use within the policy object. The number of alternatives present in the policy object can be obtained using WsGetPolicyAlternativeCount.
A pointer to the constraints that specify policies to match along with the fields to populate if the function returns NOERROR.
See WS_POLICY_CONSTRAINTS for more information.
Indicates whether a match is required or not.
If the value of this parameter is TRUE a match is required, and if the policy does not match, the function returns an error.
A pointer to a Heap object used to store any data requiring allocation beyond the specified constraint.
A pointer to a WS_ERROR object where additional information about the error should be stored if the function fails.
This function can return one of these values.
||One or more arguments are invalid.|
The policy alternative does not meet the specified constraints and matchRequired was set to TRUE.
The policy or other metadata was in an invalid format.
||The policy alternative does not meet the specified constraints and matchRequired was set to FALSE.|
||The policy alternative meets the specific constraints. The out fields of the constraints structures have been filled with values from the policy.|
Each of these data types contain a struct field called "out".
The policy object may delay some processing until this function is called. If the processing fails the policy object is set to WS_POLICY_STATE_FAULTED.
|Minimum supported client||Windows 7 [desktop apps | UWP apps]|
|Minimum supported server||Windows Server 2008 R2 [desktop apps | UWP apps]|