WMRMResponse.AddLicense
Previous | Next |
WMRMResponse.AddLicense
The AddLicense method adds a license to the license response.
Syntax
WMRMResponse .AddLicense( bstrVersion, bstrLicense)
Parameters
bstrVersion
[in] String containing the version of the license to be added. This must be one of the following values.
Value | Description |
0.1.0.0 | Specifies version 1 of Windows Media Rights Manager. |
2.0.0.0 | Specifies Windows Media Rights Manager version 7 or later. |
bstrLicense
[in] String containing the license to be added.
Return Values
If the method succeeds, it returns S_OK. If it fails, it returns E_FAIL, 0x80040005.
Remarks
You must call the AddLicense method before calling the WMRMResponse.GetLicenseResponse method; otherwise, an empty response is delivered.
Example Code
' To send multiple licenses to a client, you must create a WMRMresponse ' object, add each license to the response, and retrieve the response ' string. ' ' For more information about creating licenses, see the WMRMLicGen ' object. ' Declare variables and objects. Dim sLicense() ' Array containing multiple licenses created ' with the WMRMLicGen object. Dim lLicCount ' Long containing the numner of licenses Dim sLicResponse Dim ResponseObj ' Create a WMRMResponse Object. Set ResponseObj = Server.CreateObject("Wmrmobjs.WMRMResponse") ' Add each license to the license response. for i=0 to lLicCount-1 Call ResponseObj.AddLicense("2.0.0.0", sLicense(i)) next ' Retrieve a license response string containing the licenses ' to be sent to the customer. sLicResponse = Response.GetLicenseResponse()
Requirements
Version: Windows Media Rights Manager 7 SDK or later
Reference: wmrmobjs 1.0 Type Library
Library: wmrmobjs.dll
Platform: Windows Server 2003
See Also
Previous | Next |