The SetSAPMode method specifies the secure audio path (SAP) mode required for a license.
The SAP mode is set automatically when you specify a protection level of 300 or 400 for digital audio output. For more information, see Output Protection Levels for Playback.
[in] Variant indicating whether the license permits digital output.
Set this parameter to False to disable digital output on the audio card while your content is being played. If this parameter is set to True, a consumer can make a digital copy of your content by using the digital output from the sound card.
[in] Variant indicating whether the license requires the DRM kernel component to verify that all drivers in the audio stack have been certified by Microsoft as SAP-compliant.
Set this parameter to True if you want your content to be played only with audio drivers that have been certified by Microsoft as SAP-compliant. If this parameter is set to False, your content can be played with non-certified audio drivers.
[in] Variant indicating the minimum driver security level that SAP requires for playback.
This parameter specifies the minimum security level for SAP-compliant audio drivers that can access your content. The security level of all SAP-compliant audio drivers for Windows Millennium Edition is set to 1100. The security level of all SAP-compliant audio drivers for Windows XP is set to 1200.
This method does not return a value. If the method succeeds, it sets S_OK in the error object. Otherwise, it sets 0x80020005 in the error object.
For high-security content, it is recommended that you set varAllowDigitalOut to False and varCheckDriverCerts to True. However, not all audio drivers for Windows Millennium Edition are certified as SAP-compliant. If having your content reach a broader audience is more important than security, you can allow non SAP-compliant drivers to play your content by setting varAllowDigitalOut to False and varCheckDriverCerts to False. In this case, the DRM components still use SAP to protect your content until it reaches the audio kernel. However, the DRM components cannot ensure that your content remains protected in the kernel when you allow the use of non SAP-compliant audio drivers.
Secure Audio Path (SAP) is supported only on Windows Millennium Edition and Windows XP. Therefore, this method should be called only when delivering a license to a computer that is running one of these operating systems.
Note Windows Vista does not support SAP. However, if you require SAP for your content, users of Windows Vista can play it only with an application that is based on the Microsoft Media Foundation SDK, which then uses the Protected User Mode Audio (PUMA) feature.
' 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") ' Reset the WMRMRights object. RightsObj.Reset() ' Specify the rights that will be granted to the consumer. RightsObj.AllowBackupRestore = True RightsObj.BeginDate = "#20050101Z#" RightsObj.ExpirationDate = "#20051231Z#" RightsObj.DisableOnClockRollback = True ' Require SAP-certified drivers,disable digital output, allow playback on Windows Me and Windows XP RightsObj.SetSAPMode(False,True,1100) ' Retrieve the string containing the rights. sRights = RightsObj.GetAllRights() ' Set the rights in the license generator. LicGenObj.Rights = sRights ' Continue the license issuing process.
Version: Windows Media Rights Manager 7 SDK or later
Reference: wmrmobjs 1.0 Type Library
Platform: Windows Server 2003