Windows Media Rights Manager SDK banner art

WMRMRights.TransferCount

The TransferCount property specifies and retrieves the number of times the content can be transferred to portable devices or portable media using the AllowTransferToSDMI and AllowTransferToNonSDMI rights.

Syntax

WMRMRights.TransferCount = DWORD
DWORD = WMRMRights.TransferCount

Parameters

This property takes no parameters.

Return Values

If the property succeeds, it returns a DWORD containing the number of transfers that the license permits. If it fails, it returns E_FAIL, 0x80004005.

Remarks

When a Windows Media file is transferred to a portable device or portable media, the license for it is stored in the content header. Some portable devices and portable media also have the ability to store licenses separately from the Windows Media files. If the Windows Media file is transferred to such a device, the TransferCount is decremented only the first time the file is transferred to it (assuming the license storage is not deleted or removed). For those portable devices and portable media that do not store licenses separately, the TransferCount is decremented every time the file is transferred. By default, this property is not set.

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 = True
    RightsObj.TransferCount = 10
    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