IFsrmClassifierModuleImplementation::OnBeginFile method

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

Syntax


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

Parameters

propertyBag [in]

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

arrayRuleIds [in]

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.

S_OK

Success.

FSRM_E_FILE_ENCRYPTED

The module will not process the specified file because it is encrypted.

FSRM_E_INCOMPATIBLE_FORMAT

The module will not process the specified file because it is unable to determine a compatible file format.

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

Minimum supported client

None supported

Minimum supported server

Windows Server 2008 R2

DLL

SrmSvc.dll

IID

IID_IFsrmClassifierModuleImplementation is defined as 4c968fc6-6edb-4051-9c18-73b7291ae106

See also

IFsrmClassifierModuleImplementation

 

 

Show: