WMRMRestrictions.GetRestrictions
Previous | Next |
WMRMRestrictions.GetRestrictions
The GetRestrictions method retrieves a string representing the playback and copying restrictions you have defined.
Syntax
String = WMRMRestrictions.GetRestrictions
Parameters
This method takes no parameters.
Return Values
If this method succeeds, it returns a String containing the restriction settings. If it fails, it returns a number in the error object.
Remarks
After you have defined the restriction settings for playback or copying, such as output protection levels or excluded technologies, set them in the license by using the WMRMRights.PlayRestrictions or WMRMRights.CopyRestrictions property.
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
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 |