Windows Dev Center

WM_GET_LICENSE_DATA structure

The WM_GET_LICENSE_DATA structure contains information about where to acquire a DRM license.

Syntax


typedef struct _WMGetLicenseData {
  DWORD   dwSize;
  HRESULT hr;
  WCHAR   *wszURL;
  WCHAR   *wszLocalFilename;
  BYTE    *pbPostData;
  DWORD   dwPostDataSize;
} WM_GET_LICENSE_DATA;

Members

dwSize

DWORD containing the size of the WM_GET_LICENSE_DATA structure, in bytes.

hr

HRESULT return code.

wszURL

Wide-character null-terminated string containing the license acquisition URL. Use this string and the pbPostData string in non-silent license acquisition.

wszLocalFilename

Wide-character null-terminated string containing a local HTML page that is generated by the DRM component. When this string is loaded into a browser, it automatically redirects the HTTP request to the license acquisition URL, along with the necessary post data. Use of this local URL is now deprecated. The recommended approach is to use the wszURL and pbPostData strings.

pbPostData

Pointer to a byte array containing the data to be posted to the license acquisition URL. You must add the following string to the beginning of the pbPostData string: "nonsilent=1&challenge=". The resulting string should then be appended to wszURL when you form the HTTP request.

dwPostDataSize

DWORD that indicates the size of pbPostData without the "nonsilent=1&challenge=" string referred to in pbPostData.

Remarks

This filled-in structure is returned in the pValue parameter of the IWMStatusCallback::OnStatus method if WMT_STATUS equals WMT_NO_RIGHTS_EX or WMT_ACQUIRE_LICENSE. For WMT_NO_RIGHTS_EX events, the hr member will be NS_E_LICENSE_REQUIRED, NS_E_LICENSE_OUTOFDATE, or NS_E_LICENSE_INCORRECT_RIGHTS. Any of these errors indicates that a new license must be acquired by navigating to the URL in the wszURL member.

For WMT_ACQUIRE_LICENSE events, the hr member will pass the SUCCEEDED macro if a license was successfully acquired. If this event is received after an attempt at silent acquisition, and hr equals NS_E_DRM_LICENSE_NOTACQUIRED, it indicates that only non-silent acquisition is supported by the license server for this license.

The Audioplayer sample application demonstrates how to correctly use the information returned in this structure.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Version

Windows Media Format 7 SDK, or later versions of the SDK

Header

Drmexternals.h

See also

IWMDRMReader::AcquireLicense
Structures

 

 

Community Additions

ADD
Show:
© 2015 Microsoft