Aracılığıyla paylaş


IpcRegisterLicense function

Used to register the license with server. This function is used for content tracking purposes.

[!Important]

An application needs to use this API to register the PL of every protected document with the server. If this step is missed, the document will not be tracked.

For more information on content tracking and the use of this function, see Tracking Content.

Syntax

HRESULT WINAPI IpcRegisterLicense(
  _In_       PCIPC_BUFFER     pvLicenseWithMetadata,
  _Reserved_ LPVOID           pvReserved,
  _In_opt_   PCIPC_PROMPT_CTX pContext,
  _In_opt_   LPCWSTR          wszContentName,
             BOOL             fSendRegistrationMail
);

Parameters

pvLicenseWithMetadata [in]

Pointer to the serialized license with the metadata information added.

pvReserved

This is a reserved. The parameter must be set to NULL.

pContext [in, optional]

Optional pointer to information that helps the IPC Client decide what the user prompt behavior should be.

This parameter can be used in cases where authentication prompts are not desirable or when an application wants to control the modal behavior of prompt dialogs.

wszContentName [in, optional]

If pvLicenseWithMetadata does not specify a content name, the server will use this parameter, otherwise it will be ignored.

fSendRegistrationMail

Set to TRUE to notify the publisher via email of the tracking portal URL to manage the document, or FALSE to not send the notification.

Return value

If the function succeeds, the return value is S_OK. If the function fails, it returns an HRESULT value that indicates the error.

For more information, see Error codes for a description of all RMS SDK 2.1 return values.

Possible values include, but are not limited to, those in the following list.

E_INVALIDARG

IPCERROR_NEEDS_ONLINE

Requirements

Minimum supported client
Windows Vista with SP2
Minimum supported server
Windows Server 2008
Header
Ipcprot.h (include Msipc.h)
Library
Msipc.lib
DLL
Msipc.dll

See also

License metadata property types

Notification preference

Notification type

IpcCreateLicenseMetadataHandle

IpcSetLicenseMetadataProperty

IpcSerializeLicenseWithMetadata

IpcfEncryptFileWithMetadata

IpcfEncryptFileStreamWithMetadata

IpcRegisterLicense