3.2.4.2.45.24 EnumFileProperties (Opnum 30)
The EnumFileProperties method enumerates the Property Definition Instances of the specified file or folder.
-
[id(FSRM_DISPID_CLASSIFICATION_MANAGER | 0x0D)] HRESULT EnumFileProperties( [in] BSTR filePath, [in, defaultvalue(FsrmGetFilePropertyOptions_None)] FsrmGetFilePropertyOptions options, [out, retval] IFsrmCollection** fileProperties );
filePath: The file or folder that contains the Property Definition Instances that you want to enumerate. You can specify an absolute or relative path to the file or folder. You cannot specify a file share.
options: Contains the options to use for enumerating the file's Property Definition Instances. For possible values, see the FsrmGetFilePropertyOptions (section 2.2.2.5.1.2) enumeration.
fileProperties: Pointer to IFsrmCollection interface pointer (section 3.2.4.2.1) that contains a collection of file Property Definition Instances. Each item in the collection is a VARIANT of type VT_DISPATCH. Query the pdispVal member of the variant for the IFsrmProperty interface (section 3.2.4.2.40).
Return Values: The method MUST return zero on success or a nonzero error code on failure.
-
Return value/code
Description
0x80045305
FSRM_S_PARTIAL_CLASSIFICATION
The enumerated properties could not be completely classified because a failure occurred while loading or classifying the file properties.
0x80045353
FSRM_E_ENUM_PROPERTIES_FAILED
The properties could not be enumerated because a failure occurred while loading or classifying the file properties.
0x80070057
E_INVALIDARG
This code is returned for the following reasons:
The options parameter is not a valid FsrmGetFilePropertyOptions (section 2.2.2.5.1.2) value.
The fileProperties parameter is NULL.
The filePath parameter is NULL.
Upon receiving this message, the server MUST validate parameters:
Verify that filePath is not NULL.
Verify that fileProperties is not NULL.
Verify that options contains valid FsrmGetFilePropertyOptions values. If options contains FsrmGetFilePropertyOptions_None, FSRM reruns classification on the file to ensure the correct value is returned.
If any validation fails, the server MUST terminate processing and return a nonzero error code.
The server MUST perform the following steps in sequence or return a nonzero error code:
Perform retrieve stored classification properties for the file.
If options does not contain FsrmGetFilePropertyOptions_NoRuleEvaluation, perform the Generate new classification properties action for the file given the list of Property Definition Instances from the previous action. If the property definition instance.flags of any of the resulting Property Definition Instances contains FsrmPropertyFlags_SetByClassifier, add the file to the Report item list.
If options contains FsrmGetFilePropertyOptions_Persistent, perform the Store classification properties action for the file given the List of Property Definition Instances from the previous actions.
If options contains FsrmGetFilePropertyOptions_SkipOrphaned, any of the Property Definition Instance objects in the List of Property Definition Instances for which there is not a Property Definition.Name in the List of Persisted Property Definitions that matches the Property Definition.Name of the Property Definition Instance SHOULD be removed from the List of Property Definition Instances.<71>
The server MUST populate fileProperties with the IFsrmProperty interface pointer of every Property Definition Instance in the List of Property Definition Instances.
If options contains FsrmGetFilePropertyOptions_FailOnPersistErrors and any of the property definition instance.flags of the Property Definition Instances in the list of Property Definition Instances contains the flag FsrmPropertyFlags_FailedSavingProperties, the server MUST return FSRM_S_PARTIAL_CLASSIFICATION.