WsGetPolicyAlternativeCount function
Retrieves the number of alternatives available in the policy object. The alternative count can be used to loop through each alternative using WsMatchPolicyAlternative.
Syntax
HRESULT WINAPI WsGetPolicyAlternativeCount( _In_ WS_POLICY* policy, _Out_ ULONG* count, _In_opt_ WS_ERROR* error );
Parameters
- policy [in]
-
A pointer to the WS_POLICY object from which to count alternatives.
- count [out]
-
A pointer to the number value of alternatives. This may be 0.
- error [in, optional]
-
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
|
Minimum supported client | Windows 7 [desktop apps | Windows Store apps] |
|---|---|
|
Minimum supported server | Windows Server 2008 R2 [desktop apps | Windows Store apps] |
|
Header |
|
|
Library |
|
|
DLL |
|