DRMGetRightInfo 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 DRMGetRightInfo function obtains information about a previously created right.

Syntax

DRMEXPORT HRESULT UDAPICALL DRMGetRightInfo(
  [in]      DRMPUBHANDLE hRight,
  [in, out] UINT         *puRightNameLength,
  [out]     PWSTR        wszRightName,
  [out]     SYSTEMTIME   *pstFrom,
  [out]     SYSTEMTIME   *pstUntil
);

Parameters

[in] hRight

The handle of the right to retrieve information from.

[in, out] puRightNameLength

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

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

[out] wszRightName

A pointer to a null-terminated Unicode string that receives the name of the right. The size of this buffer is specified by the puRightNameLength parameter. If this information is not required, set this parameter to NULL.

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 puRightNameLength value.

[out] pstFrom

A pointer to a SYSTEMTIME structure that receives the starting validity time, in UTC time, of the right. If this information is not required, set this parameter to NULL.

[out] pstUntil

A pointer to a SYSTEMTIME structure that receives the ending validity time, in UTC time, of the right. If this information is not required, set this parameter to NULL.

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.

Requirements

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

See also

AD RMS Functions

DRMCreateIssuanceLicense

DRMCreateRight