다음을 통해 공유


DIFsrmClassificationEvents::OnFile event

The OnFile event handler method receives properties of files that are returned in a call to ClassifyFiles.

Syntax

HRESULT OnFile(
  [in]                   BSTR            filePath,
  [in]                   HRESULT         result,
  [in]                   BSTR            fileMessages,
  [in, optional, unique] IFsrmCollection *fileProperties,
  [out, retval]          VARIANT_BOOL    *ret
);

Parameters

filePath [in]

Path of file.

result [in]

Return value for the specific file. If this value is an error code then the fileProperties parameter may be NULL.

fileMessages [in]

Message specific to any error.

fileProperties [in, optional]

Address of a IFsrmCollection that contains the set of properties set on the file.

ret [out, retval]

Address of a VARIANT_BOOL. Set this to VARIANT_FALSE to cancel the classification. ClassifyFiles will then fail with FSRM_E_CLASSIFICATION_CANCELED.

Return value

The event handler method returns S_OK if there were no errors processing the event. Any error values will cancel the operation and be passed to ClassifyFiles. The error should indicate the source of the failure (for example E_OUTOFMEMORY if an allocation failed.) For a list of common error codes, see COM Error Codes (Generic).

Examples

For an example that demonstrates this method see Classifying Files.

Requirements

Minimum supported client
Windows 8
Minimum supported server
Windows Server 2012
Type library
Srm.dll
DLL
SrmSvc.dll
IID
DIID_DIFsrmClassificationEvents is defined as 26942db0-dabf-41d8-bbdd-b129a9f70424

See also

DIFsrmClassificationEvents

IFsrmClassificationManager2::ClassifyFiles