DRMGetMetaData 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 DRMGetMetaData function retrieves metadata from an issuance license.
Syntax
DRMEXPORT HRESULT UDAPICALL DRMGetMetaData(
[in] DRMPUBHANDLE hIssuanceLicense,
[in, out] UINT *puContentIdLength,
[out, optional] PWSTR wszContentId,
[in, out] UINT *puContentIdTypeLength,
[out, optional] PWSTR wszContentIdType,
[in, out, optional] UINT *puSKUIdLength,
[out, optional] PWSTR wszSKUId,
[in, out, optional] UINT *puSKUIdTypeLength,
[out, optional] PWSTR wszSKUIdType,
[in, out, optional] UINT *puContentTypeLength,
[out, optional] PWSTR wszContentType,
[in, out, optional] UINT *puContentNameLength,
[out, optional] PWSTR wszContentName
);
Parameters
[in] hIssuanceLicense
A handle to the issuance license to get the metadata from.
[in, out] puContentIdLength
A pointer to a UINT value that, on entry, contains the length, in characters, of the wszContentId buffer (required). 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 wszContentId buffer.
[out, optional] wszContentId
A pointer to a null-terminated Unicode string that receives the GUID that identifies the content. The size of this buffer is specified by the puContentIdLength 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 puContentIdLength value.
[in, out] puContentIdTypeLength
A pointer to a UINT value that, on entry, contains the length, in characters, of the wszContentIdType buffer (required). 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 wszContentIdType buffer.
[out, optional] wszContentIdType
A pointer to a null-terminated Unicode string that receives the type of GUID used to identify the content. The size of this buffer is specified by the puContentIdTypeLength 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 puContentIdTypeLength value.
[in, out, optional] puSKUIdLength
A pointer to a UINT value that, on entry, contains the length, in characters, of the wszSKUId 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 wszSKUId buffer.
[out, optional] wszSKUId
A pointer to a null-terminated Unicode string that receives the GUID that identifies the SKU of the content. The size of this buffer is specified by the puSKUIdLength 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 puSKUIdLength value.
[in, out, optional] puSKUIdTypeLength
A pointer to a UINT value that, on entry, contains the length, in characters, of the wszSKUIdType 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 wszSKUIdType buffer.
[out, optional] wszSKUIdType
A pointer to a null-terminated Unicode string that receives the type of SKU ID used to identify content. The size of this buffer is specified by the puSKUIdTypeLength 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 puSKUIdTypeLength value.
[in, out, optional] puContentTypeLength
A pointer to a UINT value that, on entry, contains the length, in characters, of the wszContentType 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 wszContentType buffer.
[out, optional] wszContentType
A pointer to a null-terminated Unicode string that receives the Multipurpose Internet Mail Extensions (MIME) type of the content. The size of this buffer is specified by the puContentTypeLength 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 puContentTypeLength value.
[in, out, optional] puContentNameLength
A pointer to a UINT value that, on entry, contains the length, in characters, of the wszContentName 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 wszContentName buffer.
[out, optional] wszContentName
A pointer to a null-terminated Unicode string that receives the name of the content. The size of this buffer is specified by the puContentNameLength 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 puContentNameLength value.
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 |