DRM_LICENSE_STATE_DATA structure (Drmexternals.h)

[The feature associated with this page, Windows Media Format 11 SDK, is a legacy feature. It has been superseded by Source Reader and Sink Writer. Source Reader and Sink Writer have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use Source Reader and Sink Writer instead of Windows Media Format 11 SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The DRM_LICENSE_STATE_DATA structure contains license information about a specified DRM right.

Syntax

typedef struct DRM_LICENSE_STATE_DATA {
  DWORD                      dwStreamId;
  DRM_LICENSE_STATE_CATEGORY dwCategory;
  DWORD                      dwNumCounts;
  DWORD                      dwCount[4];
  DWORD                      dwNumDates;
  FILETIME                   datetime[4];
  DWORD                      dwVague;
} ;

Members

dwStreamId

Stream number to which the license applies. Must be 0, which indicates that the license applies to all streams in the file.

dwCategory

Category of string to be displayed. See DRM_LICENSE_STATE_CATEGORY for possible values and their meaning.

dwNumCounts

Number of items supplied in dwCount. This value is typically 0 or 1.

dwCount[4]

An array of 0 or 1 or more DWORDs that represent the number of times the action specified in dwCategory may be performed. See remarks.

dwNumDates

Number of items supplied in datetime. Typically no more than two dates are used, for example, with a license that is valid from one date until another date.

datetime[4]

An array of one or more FILETIME structures representing one or more dates in the license. The meaning of a particular date depends on the value of dwCategory.

dwVague

Zero or more of the following flags combined with a bitwise OR:

Flag Description
DRM_LICENSE_STATE_DATA_VAGUE If set, there may be more licenses that apply to the content.
DRM_LICENSE_STATE_DATA_OPL_PRESENT If set, the license includes output protection levels (OPLs) that must be retrieved and checked against the destination of your application's output.
DRM_LICENSE_STATE_DATA_SAP_PRESENT If set, the content must be delivered using secure audio path (SAP).

Remarks

This structure is returned (encapsulated in a WM_LICENSE_STATE_DATA structure) from a call to IWMDRMReader::GetDRMProperty when you specify one of the DRM license state properties. These properties are:

If dwCategory is WM_DRM_LICENSE_STATE_COUNT_FROM_UNTIL, then the datetime array will typically contain two dates, a "from" date and an "until" date. Two date pairs may also be specified to create more complex licenses.

The elements of the dwCount array correspond to the dates or date ranges specified in the datetime array. If dwCategory is WM_DRM_LICENSE_STATE_COUNT_FROM_UNTIL and datetime contains one pair of dates, then dwCount will contain one element. If datetime contains two date pairs (four elements), then dwCount should contain two elements, one for each date pair.

In some cases, users may have been issued more than one license for a file. For example, they might have acquired a license that allowed five plays until the end of the month, and later acquired a second license for unlimited rights. In such a case, the DRM_LICENSE_STATE_DATA_VAGUE flag is set in dwVague (dwVague & DRM_LICENSE_STATE_DATA_VAGUE != 0) and the DRM component will use an algorithm to determine the most likely set of rights that have been applied. When one license expires, the DRM component will examine the remaining license(s), and so on until all licenses have expired.

Requirements

Requirement Value
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

Structures