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


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



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


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


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


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.


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.


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.


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

DRM_LICENSE_STATE_DATA_VAGUEIf set, there may be more licenses that apply to the content.
DRM_LICENSE_STATE_DATA_OPL_PRESENTIf 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_PRESENTIf set, the content must be delivered using secure audio path (SAP).



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.


Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]


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



See also