Windows Media Rights Manager SDK banner art

WMRMRights.GracePeriod

The GracePeriod property specifies and retrieves the number of hours during which protected content can be played on a device after its clock becomes unset.

Syntax

WMRMRights.GracePeriod = DWORD
DWORD = WMRMRights.GracePeriod

Parameters

This property takes no parameters.

Return Values

If the property succeeds, it returns a DWORD indicating the number of hours in the grace period.

Remarks

The default value of this property is 0.

This right specifies the number of hours during which protected content can be played after a device clock becomes unset. If the device supports grace periods and the clock becomes unset, the device makes a "best guess" at the current time by using the value of the last-known secure time. If the current time falls within this grace period, the device plays the content.

Example Code

' Before you can issue a license, you must specify the consumer's
' rights and set them in the WMRMLicGen object.

' Declare objects.
    Dim sRights
    Dim RightsObj
    Dim LicGenObj

' Create objects.
    Set RightsObj = Server.CreateObject("Wmrmobjs.WMRMRights")
    Set LicGenObj = Server.CreateObject("Wmrmobjs.WMRMLicGen")

' Specify the rights that will be granted to the consumer.
    RightsObj.AllowBackupRestore = False
    RightsObj.AllowPlay = True
    RightsObj.AllowCopy = True
    RightsObj.CopyCount = 100
    RightsObj.GracePeriod = 24

' Set copy restrictions.
    Set RestrictObj = Server.CreateObject("WMRMObjs.WMRMRestrictions")
    Call RestrictObj.AddRestriction(6, 400)
    RightsObj.CopyRestrictions = RestrictObj.GetRestrictions

' Retrieve the string containing the rights.
    sRights = RightsObj.GetAllRights()

' Set the rights in the license generator.
    LicGenObj.Rights = sRights

' Continue the license issuing process.

Requirements

Version: Windows Media Rights Manager 10 SDK

Reference: wmrmobjs 1.0 Type Library

Library: wmrmobjs.dll

Platform: Windows Server 2003

See Also