WMRMRights.PMRights
The PMRights property specifies and retrieves the rights that govern content use with a portable license.
This right has been deprecated. All rights now apply to all licenses.
Syntax
WMRMRights.PMRights = DWORD
DWORD = WMRMRights.PMRights
Parameters
This property takes no parameters.
Return Values
If the property succeeds, it returns a DWORD containing the bit settings that identify which rights have been enabled. If it fails, it returns E_FAIL, 0x80004005.
Remarks
The following table identifies the bits in the DWORD that correspond to rights.
Bit | Right | Settings |
1 | Play on a device. | 0 Do not allow playback.
1 Allow playback. |
2 | Transfer non-SDMI content to a device. | 0 Do not allow transfer.
1 Allow transfer. |
8 | Copy to a CD. | 0 Do not allow copying to a CD.
1 Allow copying to a CD. |
16 | Transfer SDMI content to a device. | 0 Do not allow transfer.
1 Allow transfer. |
By default, the return value is 1. This indicates that the content can be played and transferred to media and devices an unlimited number of times.
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.AllowTransferToSDMI = True
RightsObj.AllowTransferToNonSDMI = False
RightsObj.TransferCount = 10
' Allow transfer to SDMI devices and play on PC from devices
RightsObj.PMRights = 17
' 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