WsGetPolicyAlternativeCount function (webservices.h)
Retrieves the number of alternatives available in the policy object. The alternative count can be used to loop through each alternative using WsMatchPolicyAlternative.
Note The policy object may delay some processing until this function is called. If the
processing fails, then the policy object will be set to
WS_POLICY_STATE_FAULTED state.
Syntax
HRESULT WsGetPolicyAlternativeCount(
[in] WS_POLICY *policy,
[out] ULONG *count,
[in, optional] WS_ERROR *error
);
Parameters
[in] policy
A pointer to the WS_POLICY object from which to count alternatives.
[out] count
A pointer to the number value of alternatives. This may be 0.
[in, optional] error
A pointer to a WS_ERROR object where additional information about the error should be stored if the function fails.
Return value
This function can return one of these values.
Return code | Description |
---|---|
|
The property id was not supported for this object or the specified buffer was not large enough for the value. |
|
Ran out of memory. |
|
This function may return other errors not listed above. |
Remarks
Note that each alternative is not guaranteed to be unique within the policy (there may be duplicates).
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 7 [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2008 R2 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | webservices.h |
Library | WebServices.lib |
DLL | WebServices.dll |