Share via


IpcCreateLicenseFromTemplateID function

Returns a handle to a license created from a template. The license can be edited by calling the IpcSetLicenseProperty function.

Syntax

HRESULT WINAPI IpcCreateLicenseFromTemplateID(
  _In_       LPCWSTR             wszTemplateID,
             DWORD               dwFlags,
  _Reserved_ LPVOID              pvReserved,
  _Out_      PIPC_LICENSE_HANDLE phLicense
);

Parameters

wszTemplateID [in]

A template ID obtained from a call to the IpcGetTemplateList function.

dwFlags

This parameter 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

IpcGetTemplateList

IpcSerializeLicense

IpcSetLicenseProperty

Error codes