I_IrmProtector.HrIsProtected Property

Applies to: SharePoint Foundation 2010

Returns whether the specified file is a rights-managed file.

HRESULT HrIsProtected(
    ILockBytes *pilbInput,
    DWORD *pdwResult
) PURE;

Parameters

pilbInput

[in] A byte stream representing a file of a type associated with the Information Rights Management (IRM) protector.

pdwResult

[out] The results of the protector checking the specified file for IRM protection. Possible values are:

MSOIPI_RESULT_UNKNOWN

The protector could not determine if the file was IRM protected. For example, it might have been unable to read the file, or the file might not be of the correct type.

MSOIPI_RESULT_PROTECTED

Data was found in the file at the location where IRM-protected data is stored.

MSOIPI_RESULT_UNPROTECTED

No IRM-protected data was found in the file.

Return Value

The protector methods return typical HRESULT values. In general, the protector should return a positive OK value for success or a negative FAIL value when unsuccessful.

Remarks

In general, implementations of this method merely check for the existence of data in the location that IRM content should be stored in the file. The method does not validate ownership or the integrity of the encrypted data.

See Also

Reference

I_IrmProtector Interface

I_IrmPolicyInfoRMS Class

I_IrmPolicyInfo Class

Concepts

Information Rights Management in SharePoint Foundation

Custom IRM Protectors