Expand Minimize

DRMGetRightInfo function

[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.0, which leverages functionality exposed by the client in Msipc.dll.]

The DRMGetRightInfo function obtains information about a previously created right.

Syntax


HRESULT DRMGetRightInfo(
  _In_     DRMPUBHANDLE hRight,
  _Inout_  UINT *puRightNameLength,
  _Out_    PWSTR wszRightName,
  _Out_    SYSTEMTIME *pstFrom,
  _Out_    SYSTEMTIME *pstUntil
);

Parameters

hRight [in]

The handle of the right to retrieve information from.

puRightNameLength [in, out]

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.

wszRightName [out]

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.

pstFrom [out]

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.

pstUntil [out]

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 table. For a list of common error codes, see Common HRESULT Values.

Return codeDescription
E_DRM_INSUFFICIENT_BUFFER

An insufficient buffer size was passed in to puRightNameLength.

 

Requirements

Product

Rights Management Services client 1.0 SP2 or later

Header

Msdrm.h

Library

Msdrm.lib

DLL

Msdrm.dll

See also

AD RMS Functions
DRMCreateIssuanceLicense
DRMCreateRight

 

 

Show:
© 2014 Microsoft