Share via


IpcGetSerializedLicenseProperty function

Retrieves the information available from a serialized license. This is functionally equivalent to information that could be gathered from IpcGetLicenseProperty, but it may be performed by the consumer of content who only has the serialized license.

Syntax

HRESULT WINAPI IpcGetSerializedLicenseProperty(
  _In_     PCIPC_BUFFER    pvLicense,
           DWORD           dwPropID,
  _In_opt_ IPC_KEY_HANDLE  hKey,
           LCID            lcid,
  _Out_    LPVOID          *ppvProperty
);

Parameters

pvLicense [in]

A buffer which stores a serialized license. For more information, see AD RMS data types.

dwPropID

ID of the property to query. For more information on valid IDs, see License property types.

When querying for user rights, take note of the setting of cbSize on the IPC_USER_RIGHTS_LIST structure. For more information, see IPC_USER_RIGHTS_LIST.

hKey [in, optional]

Handle to a key object acquired by using the IpcGetKey function.

lcid

For localized properties, lcid contains the locale ID of the descriptor to query. This parameter is ignored unless dwPropID is IPC_LI_DESCRIPTOR.

Note

See the Frequently asked questions section of the Release notes topic for information about the API behavior regarding language ID.

ppvProperty [out]

Pointer to a Pointer of a buffer to hold the license information. The buffer is allocated by the API and must be de-allocated using IpcFreeMemory. The structure returned depends on the value of dwPropID. For more information on valid types, see License property types.

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.

IPCERROR_LOCALE_NOT_FOUND

Meaning: The application specified a nonzero lcid, but no templates were available that had a descriptor in this locale.

Action: For more information about lcid see, the description of IPC_LI_DESCRIPTOR in License Property Types. Also see the Frequently asked questions section of the Release notes topic.

IPCERROR_NEEDS_KEY_PARAMETER

Meaning: The hKey parameter was needed with this call due to the property being accessed by using the dwPropID parameter. For more information about properties needing a key, see License property types.

Action: Provide the hKey parameter acquired by using the IpcGetKey function.

IPCERROR_RIGHT_NOT_GRANTED

Meaning: The user does not have IPC_GENERIC_VIEW_RIGHTS to the license passed in, when trying to reuse a license.

[!Tip]
Consider messaging the user about this absence of rights.

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

AD RMS data types

IPC_USER_RIGHTS_LIST

IpcFreeMemory

IpcGetKey

IpcGetLicenseProperty

IpcSerializeLicense

License property types

Release notes

Error codes