I_IrmPolicyInfo.HrGetListGuid Method

Last modified: October 05, 2009

Applies to: SharePoint Foundation 2010

Gets the GUID of the document library in which the requested document is located.


HRESULT HrGetListGuid(
    BSTR*  pbstrListGuid
    )

pbstrListGuid

[out] The GUID of the document library in which the requested document is located.

All I_IrmPolicyInfo Class methods return HRESULT values. A positive OK value indicates that the operation was successful. A negative return value indicates that the function did not succeed.

In general, if an I_IrmPolicyInfo Class method fails, the protector will not be able to recover from the error and will fail as well.

Because Microsoft SharePoint Foundation 2010 requires that the I_IrmProtector.HrUnprotect Method method of the autonomous protector provide the document library GUID when called, the I_IrmProtector.HrProtect Method method should store this document library GUID inside the rights-managed file itself.

In the case of integrated Information Rights Management (IRM) protectors, the document library GUID is stored in the metadata property bag associated with the document’s issuance license, which in turn is stored in the document itself. We recommend that you implement a similar approach for autonomous protectors.

SharePoint Foundation requires the document library GUID from the I_IrmProtector.HrUnprotect Method method to determine if the rights-managed document is being uploaded to the same document library from which it was downloaded. Because rights management is set at the document library level, this helps ensure that users retain the appropriate rights permissions to a file.

For more information on integrated and autonomous protectors, see Custom IRM Protectors.

Show: