WMRMResponse.GetLicenseResponse
The GetLicenseResponse method retrieves a string containing the license response.
Syntax
String = WMRMResponse.GetLicenseResponse()
Parameters
This method takes no parameters.
Return Values
If the method succeeds, it returns a String containing the license response. If it fails, it returns a number in the error object.
Return code | Description |
0x80004005 | An unspecified error occurred. |
0x80070057 | The specified parameter is not valid. |
Remarks
You must call WMRMResponse.AddLicense before calling GetLicenseResponse.
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
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