WMRMRights.AllowBackupRestore
The AllowBackupRestore property specifies and retrieves a Boolean value that indicates whether the license permits backup and restoration of licenses on the client computer.
Syntax
WMRMRights.AllowBackupRestore = Boolean
Boolean = WMRMRights.AllowBackupRestore
Parameters
This property takes no parameters.
Return Values
If the property succeeds, it returns a Boolean value indicating whether license backup and restoration are permitted. If it fails, it returns E_FAIL.
Remarks
The default value of this property is 0 (false).
The Microsoft License Management Service manages the restoration operation and enforces business rules that prevent a consumer from abusing content and discourage fraudulent use of licenses. Consumers can store licenses on up to four unique computers, meaning they can restore licenses three times (on three computers other than the one to which the license was issued). If an attempt is made to restore licenses to a fifth computer, a Web page is displayed to the consumer describing the limit.
If you allow counted operations in a license, you should not allow this right because restoring the license also restores the original values of the operations. For example, suppose you allow 10 plays. The consumer plays the content nine times, and then backs up and restores the license. The restored license allows an additional 10 plays.
If you want to be able to revoke licenses, you should not allow this right because consumers could restore a license after you revoke it.
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")
' Reset the WMRMRights object.
RightsObj.Reset()
' Specify the rights that will be granted to the consumer.
RightsObj.AllowBackupRestore = True
RightsObj.AllowPlay = True
RightsObj.BeginDate = "#20050101Z#"
RightsObj.ExpirationDate = "#20051231Z#"
RightsObj.DisableOnClockRollback = True
' 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 7 SDK or later
Reference: wmrmobjs 1.0 Type Library
Library: wmrmobjs.dll
Platform: Windows Server 2003
See Also