DRMGetNameAndDescription function (msdrm.h)

[The AD RMS SDK leveraging functionality exposed by

the client in Msdrm.dll is available for use in Windows Server 2008, Windows Vista, Windows Server 2008 R2, Windows 7, Windows Server 2012, and Windows 8. It may be altered or

unavailable in subsequent versions. Instead, use Active Directory Rights Management Services SDK 2.1,

which leverages functionality exposed by the client in Msipc.dll.]

The DRMGetNameAndDescription function retrieves a language specific name and description from an issuance license.

Syntax

DRMEXPORT HRESULT UDAPICALL DRMGetNameAndDescription(
  [in]      DRMPUBHANDLE hIssuanceLicense,
  [in]      UINT         uIndex,
  [out]     UINT         *pulcid,
  [in, out] UINT         *puNameLength,
  [out]     PWSTR        wszName,
  [in, out] UINT         *puDescriptionLength,
  [out]     PWSTR        wszDescription
);

Parameters

[in] hIssuanceLicense

A handle to the issuance license to get the information from.

[in] uIndex

The zero-based index of the name and description pair to retrieve.

[out] pulcid

A pointer to a UINT that receives the locale ID of the name and description pair.

[in, out] puNameLength

A pointer to a UINT that, on input, contains the length, in characters, of the wszName buffer. This length must include the terminating null character.

After the function returns, this UINT contains the number of characters, including the terminating null character, that were copied to the wszName buffer.

[out] wszName

A pointer to a null-terminated Unicode string that receives the name. The size of this buffer is specified by the puNameLength parameter.

To determine the required size of this buffer, pass NULL for this parameter. The function will place the size, in characters, including the terminating null character, in the puNameLength parameter.

[in, out] puDescriptionLength

A pointer to a UINT that, on input, contains the length, in characters, of the wszDescription buffer. This length must include the terminating null character.

After the function returns, this UINT contains the number of characters, including the terminating null character, that were copied to the wszDescription buffer.

[out] wszDescription

A pointer to a null-terminated Unicode string that receives the description. The size of this buffer is specified by the puDescriptionLength parameter.

To determine the required size of this buffer, pass NULL for this parameter. The function will place the size, in characters, including the terminating null character, in the puDescriptionLength parameter.

Return value

If the function succeeds, the function returns S_OK.

If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following list. For a list of common error codes, see Common HRESULT Values.

Remarks

Note  If, when you enumerate through the Name/Description pairs for locales, you are unable to find the Name/Description pair corresponding with your locale (using the locale ID), you can use the LCID of 0, which is the default value. Take note that an LCID of 0 can be set only for templates and licenses created programmatically on the client. AD RMS server administration does not support setting a default language for Name and Description. For more information about creating an issuance license programmatically, see Creating an Issuance License.
 

Requirements

Requirement Value
Target Platform Windows
Header msdrm.h
Library Msdrm.lib
DLL Msdrm.dll

See also

AD RMS Functions

DRMSetNameAndDescription