Windows Media Rights Manager SDK banner art

WMRMRights.CopyCount

The CopyCount property specifies and retrieves the number of times that content can be copied using the AllowCopy right.

Syntax

WMRMRights.CopyCount = DWORD
DWORD = WMRMRights.CopyCount

Parameters

This property takes no parameters.

Return Values

If the property succeeds, it returns a DWORD indicating the number of times content can be copied. If it fails, it returns E_FAIL.

Remarks

By default, this property is not set.

Valid values include:

  • 0 – 249: The number of copies that can be made from the computer.
  • 250-255: Reserved for future use.

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
    Dim RestrictObj

' 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 = 2

' 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