IFsrmClassifierModuleImplementation::OnBeginFile method (fsrmpipeline.h)

Instructs the classifier to prepare for processing a file with the specified property bag.

Syntax

HRESULT OnBeginFile(
  [in] IFsrmPropertyBag *propertyBag,
  [in] SAFEARRAY        *arrayRuleIds
);

Parameters

[in] propertyBag

The property bag that corresponds to the file to be processed.

[in] arrayRuleIds

A SAFEARRAY of variants that contains one or more strings listing the identifiers of rules that will be processed. Each identifier corresponds to a rule object that is in the rule collection passed in by a previous call to the IFsrmClassifierModuleImplementation::UseRulesAndDefinitions method. The rule object can also be obtained by using this identifier in a call to the IFsrmCollection::GetById method on this collection.

Return value

The method returns the following return values. Implementers should return an HRESULT error code for any other errors.

Remarks

The classifier is not allowed to directly call IFsrmPropertyBag::SetFileProperty on the property bag that is passed in. The classifier instead provides property values when the IFsrmClassifierModuleImplementation::DoesPropertyValueApply method or the IFsrmClassifierModuleImplementation::GetPropertyValueToApply method is called by FSRM.

Each of the calls to the IFsrmClassifierModuleImplementation::DoesPropertyValueApply method or the IFsrmClassifierModuleImplementation::GetPropertyValueToApply method is associated with a rule, the identifiers of which are passed in through the arrayRuleIds parameter. As an optimization, the classifier may optionally pre-compute the responses for the IFsrmClassifierModuleImplementation::DoesPropertyValueApply method or the IFsrmClassifierModuleImplementation::GetPropertyValueToApply method during the OnBeginFile method call using the rule identifiers passed in through the arrayRuleIds parameter.

If FSRM_E_INCOMPATIBLE_FORMAT or FSRM_E_FILE_ENCRYPTED is returned, FSRM will not indicate that the file has failed classification. If any other error value is returned, FSRM will indicate that the file has failed classification.

Requirements

Requirement Value
Minimum supported client None supported
Minimum supported server Windows Server 2008 R2
Target Platform Windows
Header fsrmpipeline.h
DLL SrmSvc.dll

See also

IFsrmClassifierModuleImplementation