Partager via


IpcCreateLicenseFromScratch function

Returns a handle to a license created from scratch. The license can be edited by calling IpcSetLicenseProperty.

Syntax

HRESULT WINAPI IpcCreateLicenseFromScratch(
  _In_       PCIPC_TEMPLATE_ISSUER pTemplateIssuer,
             DWORD                 dwFlags,
  _Reserved_ LPVOID                pvReserved,
  _Out_      PIPC_LICENSE_HANDLE   phLicense
);

Parameters

pTemplateIssuer [in]

A pointer to a IPC_TEMPLATE_ISSUER structure returned by a call to IpcGetTemplateIssuerList.

The license created will be protected to the AD RMS server pointed to by the connectionInfo member of this IPC_TEMPLATE_ISSUER structure.

dwFlags

Must be 0.

pvReserved

This parameter is reserved and must be NULL.

phLicense [out]

A pointer to a variable that receives a handle to the created license.

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.

Remarks

When you have finished using the license handle created with this function, close it by using the IpcCloseHandle function.

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

IPC_TEMPLATE_ISSUER

IpcGetLicenseProperty

IpcGetTemplateIssuerList

IpcSerializeLicense

IpcSetLicenseProperty

Error codes