Поделиться через


WMRMRights.PlayRestrictions

banner art

Previous Next

WMRMRights.PlayRestrictions

The PlayRestrictions property specifies and retrieves a string that indicates which technologies can or cannot be used to play protected content.

Syntax

  WMRMRights.PlayRestrictions = String
String = WMRMRights.PlayRestrictions

Parameters

This property takes no parameters.

Return Values

If the property succeeds, it returns a String containing the play restrictions. If it fails, it returns a number in the error object.

Remarks

You can use the WMRMRestrictions object to specify the technologies to require, include, or exclude for playing protected content. For example, you can require that all digital audio content be played back on applications and devices with at least obfuscation technology (a protection level of 200). By default, playback restrictions are not set.

For information about current output protection levels, see the document WMRM SDK Compliance Rules that accompanied your license agreement from Microsoft.

Example Code

' Set playback and copy restrictions.
Dim RestrictObj              ' WMRMRestrictions object
Dim PlayRestrictions         ' Playback restrictions
Dim CopyRestrictions         ' Copy restrictions

Set RestrictObj = Server.CreateObject("WMRMObjs.WMRMRestrictions")

' Set output protection levels for playback.  
Call RestrictObj.AddRestriction(1, 300)  ' Uncompressed digital video
Call RestrictObj.AddRestriction(2, 500)  ' Compressed digital video
Call RestrictObj.AddRestriction(3, 200)  ' Analog video
Call RestrictObj.AddRestriction(4, 200)  ' Compressed digital audio
Call RestrictObj.AddRestriction(5, 200)  ' Uncompressed digital audio

' Add an extended technology for playing analog video.
Call RestrictObj.AddExtension("{C3FD11C6-F8B7-4d20-B008-1DB17D61F2DA}", 1)

' Get the playback restrictions string.
PlayRestrictions = RestrictObj.GetRestrictions

' Set output protection levels for copying.  
Set RestrictObj = Nothing
Set RestrictObj = Server.CreateObject("WMRMObjs.WMRMRestrictions")

Call RestrictObj.AddRestriction(6, 400)    ' Copied output.

' Get the copy restrictions string.
CopyRestrictions = RestrictObj.GetRestrictions

' Set the restrictions in the WMRMRights object.
RightsObj.PlayRestrictions = PlayRestrictions
RightsObj.CopyRestrictions = CopyRestrictions

Requirements

Version: Windows Media Rights Manager 10 SDK or later

Reference: wmrmobjs 1.0 Type Library

Library: wmrmobjs.dll

Platform: Windows Server 2003

See Also

Previous Next

© 2007 Microsoft Corporation. All rights reserved.