3.2.4.2.45.15 EnumRules (Opnum 21)
The EnumRules method returns all the Rules from the List of Persisted Rules (section 3.2.1.6) on the server that have the specified ruleType.
-
[id(FSRM_DISPID_CLASSIFICATION_MANAGER | 0x04)] HRESULT EnumRules( [in] FsrmRuleType ruleType, [in, defaultvalue(FsrmEnumOptions_None)] FsrmEnumOptions options, [out, retval] IFsrmCollection** Rules );
ruleType: Contains the FsrmRuleType (section 2.2.1.2.11) to which to limit the returned collection of Rules.
options: Contains the FsrmEnumOptions (section 2.2.1.2.5) to use when enumerating the Rules.
Rules: Pointer to an IFsrmCollection interface pointer (section 3.2.4.2.1) that upon completion contains pointers to every rule on the server that has the rule type specified by ruleType. A caller MUST release the collection received when the caller is done with it.
Return Values: The method MUST return zero on success, or a nonzero error code on failure.
-
Return value/code
Description
0x80045311
FSRM_E_NOT_SUPPORTED
The options parameter is not a valid FsrmEnumOptions (section 2.2.1.2.5) value.
0x80070057
E_INVALIDARG
This code is returned for the following reasons:
The ruleType parameter is not a valid FsrmRuleType (section 2.2.1.2.11) value.
The Rules parameter is NULL.
Upon receiving this message, the server MUST validate parameters:
If Rules is NULL, server MUST return E_INVALIDARG.
If ruleType contains any value other than specified in section 2.2.1.2.11, server MUST return E_INVALIDARG.
If options contains FsrmEnumOptions_Asynchronous or any value other than what is specified in section 2.2.1.2.5, the server MUST return FSRM_E_NOT_SUPPORTED.
Upon successful validation of parameters, the server MUST perform the following actions:
Create a new List of Non-Persisted Rule Instances (section 3.2.1.6).
Populate the newly created list with Non-Persisted Rule Instances (section 3.2.1.6.3.2) copied from the Persisted Rules (section 3.2.1.6.3.1) in the List of Persisted Rules where each copied instance's Rule Type is equivalent to ruleType.
If options did not include FsrmEnumOptions_IncludeDeprecatedObjects, remove all Non-Persisted Rule Instances that have Rule.Deprecated set to true.
Populate Rules with the IFsrmRule interface pointer (section 3.2.4.2.41) of every Non-Persisted Rule Instance in this List of Non-Persisted Rule Instances.