Using the Sample Pages
Using the Sample Pages
Sample pages (ASP and Visual Basic Scripting Edition) are included in the Windows Media Rights Manager SDK to demonstrate different ways to use the Windows Media Rights Manager objects to package Windows Media files and issue licenses . Comments appear throughout the code in each of the sample pages to describe the process in detail.
The sample pages in Windows Media Rights Manager 10.1.2 SDK are installed by default in C:\WMSDK\WMRM10.1\Samples. Before you set up the sample pages, you must complete the steps in the Setting Up Windows Media Rights Manager 10.1.2 SDK section to set up a certificate. To set up the sample pages, you can either put all the samples in one directory on your Web server, or put them in two directories (one for issuing licenses, the other for batch packaging). For example, copy these files to C:\Inetpub\Wwwroot\Wm.
Before using these sample pages, you must set up a Global.asa file, which acts as a database for some of the sample pages. For more information about setting up the Global.asa file, see Setting Up the Global.asa File.
The following table describes the samples included with this SDK.
|Simple License Generation||Demonstrates silent and nonsilent license delivery.|
|Complex License Generation||Demonstrates license delivery for combinations of licenses with rights you select.|
|Predelivering a License By Using the GetLicenseFromURL Method||Demonstrates predelivery of licenses by using the GetLicenseFromURL method.|
|Predelivering a License By Using the GetSystemInfo Method||Demonstrates predelivery of licenses by using the GetSystemInfo method.|
|Packaging a Batch of Windows Media Files||Demonstrates how to package multiple Windows Media files from one directory.|
|Packaging a Batch of Windows Media Files and Specifying the Rights||Demonstrates how to package multiple Windows Media files and include the rights as an attribute in the content header.|
|Ch_head.vbs||Changes content headers in packaged Windows Media files.|
|Importv1.vbs||Enables you to install the certificate from Windows Media Rights Manager version 1 to run Windows Media License Service . For more information, see Using the Version 1 Certificates to Run Windows Media License Service.|
For additional information and sample code, see the Technical Articles on the Digital Rights Management page at the Microsoft Web site.