I_IrmPolicyInfo.HrSetListGuid Method

Last modified: October 07, 2009

Applies to: SharePoint Foundation 2010

Sets the GUID of the document library from which the document was downloaded.

HRESULT HrSetListGuid(
    BSTR  bstrListGuid


[in] The GUID of the document library from which the document was downloaded.

All I_IrmPolicyInfo Class methods return HRESULT values. A positive OK value indicates 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.

The I_IrmProtector.HrUnprotect Method method of autonomous protectors must extract the document library GUID from the rights-managed document and pass that value to the I_IrmPolicyInfo.HrSetListGuid Method method.

SharePoint Foundation then compares this GUID to the GUID of the document library to which the user is attempting to upload the rights-managed document. If the two GUIDs do not match, SharePoint Foundation cancels the document upload. Because rights permissions are set at the document library level, this helps ensure that users retain the appropriate rights permissions to the file.

The I_IrmProtector.HrProtect Method method of the autonomous protector should have stored the document library GUID in the rights-managed file.

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