I_IrmProtector.HrIsProtected Property

Last modified: October 07, 2009

Applies to: SharePoint Foundation 2010

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


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

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.

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.

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.

Show: