I_IrmPolicyInfoRMS.HrGetEULs Method

Applies to: SharePoint Foundation 2010

Gets the end-user licenses (EULs) that the Information Rights Management (IRM) protector should include in the protected document.

HRESULT HrGetEULs(
    BSTR *rgbstrEUL,
    BSTR *rgbstrId,
    UINT *pcbEULs
) PURE;

Parameters

rgbstrEUL

[out] The EULs that the IRM protector should add to the document.

rgbstrId

[out] The IDs of the owners of the EULs to be included in the document.

This parameter uses the same indexes as rgbstrEUL. For example, the owner of the EUL at rgbstrEUL[2] is contained at rgbstrId[2].

pcEUL

[out] The number of elements in rgbstrEUL and rgbstrId.

Return Value

All I_IrmPolicyInfoRMS methods return HRESULT values. A positive OK value indicates the operation succeeded. A negative return value indicates that the function did not succeed.

In general, if an I_IrmPolicyInfoRMS method fails, the protector cannot recover from the error and also fails.

Remarks

Currently, this method passes only the server EUL.

To use this method correctly, the integrated IRM protector must call it twice. The first time, the protector should pass NULL as the argument for the rgbstrEUL and rgbstrId parameters; the method then returns a value in pcEUL that represents the number of EULs. The protector can then allocate the appropriate memory and call the method again. The protector is responsible for releasing any memory used in this process.

The integrated protector need not read or understand the EUL; it simply has to store the data inside the protected file. SharePoint Foundation already applied the Rights Management Services (RMS) public key to the EUL, so the EUL is already signed and can be stored in the file by the protector without modification or encryption.

Storing the EUL in the document itself prevents the server from having to recontact the RMS server when trying to decrypt the document.

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

See Also

Reference

I_IrmProtector Interface

I_IrmPolicyInfoRMS Class

I_IrmPolicyInfo Class

Concepts

Information Rights Management in SharePoint Foundation

Custom IRM Protectors