I_IrmProtector.HrInit Method

Applies to: SharePoint Foundation 2010

Initializes an Information Rights Management (IRM) protector.

HRESULT HrInit(
    BSTR  *pbstrProduct,
    DWORD *pdwVersion,
    BSTR  *pbstrExtentions
    BOOL  *pfuseRMS
) PURE;

Parameters

pbstrProduct

[out] The name of the IRM protector.

pdwVersion

[out] The internal version number of the protector.

pbstrExtensions

[out] A comma-delimited list of the file extensions for the file types that this IRM protector can process.

pfuseRMS

[out] Whether the protector is an integrated or autonomous protector. True for an integrated protector; False for an autonomous protector.

Return Value

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

Remarks

SharePoint Foundation calls this function once for each front-end Web server when initializing the protector.

This method informs SharePoint Foundation of whether the IRM protector is an integrated or autonomous protector. For more information about integrated and autonomous protectors, see Custom IRM Protectors.

This method also returns data about the name of the protector, its version, and the file types that the protector can protect. We recommended placing this information in the registry in such a way that this function can access that data.

In addition, you can use this method to initialize and load global data to the server, as well as other statically-defined data that each protect/unprotect request will use. This can increase performance for each download/upload process. For example, for integrated protectors, document templates can be loaded here and used during each I_IrmProtector.HrProtect Method and I_IrmProtector.HrUnprotect Method method call.

For information about IRM protector registry keys, see How to: Register an IRM Protector.

For autonomous protectors:

In addition to the functionality listed above, you should include the following functionality in the HrInit method of an autonomous protector:

  • Initialize the rights management environment that the autonomous protector will use. For example, this might involve acquiring certificates for the server, or other typical rights management tasks.

  • Configure global settings for the front-end Web server, as necessary. For example, configure and maintain the pointer to the rights management server that the autonomous protector will use, if there is one.

  • If multiple autonomous protectors use the same rights management platform, you could include a method to enable I_IrmProtector.HrInit Method functions from multiple autonomous protectors to integrate with each other.

See Also

Reference

I_IrmProtector Interface

I_IrmPolicyInfoRMS Class

I_IrmPolicyInfo Class

Concepts

Information Rights Management in SharePoint Foundation

Custom IRM Protectors