次の方法で共有


Windows Media Rights Manager SDK banner art

RMGetLicense.StoreLicense

The StoreLicense method stores a license on the consumer's computer.

Syntax

GetLicense.StoreLicense (bstrLicenseResponse)

Parameters

bstrLicenseResponse

[in] String containing the license response, with one or more licenses, returned from Response.GetLicenseResponse.

Return Values

If the method succeeds, it returns S_OK. If it fails, it returns a number in the error object.

Remarks

For player applications based on the Windows Media Format 7 SDK, there is a limitation to the number of licenses you can deliver by using this method. If more than approximately 10 licenses are issued with one call, the player application stops responding, and a stack overflow error appears if a debugger is used. The exact number depends on the size of your licenses. Because the error appears at the client and not the server, you should determine the license limit before you issue licenses to consumers. You can either test the process yourself or simply issue one license with each call to this method. This limitation does not occur in players based on Windows Media Format 9 Series SDK or later.

Example Code

<html>
<head>
<script Language="JavaScript">
function StoreV7License(hr)
{
   GetLicenseObj.StoreLicense( "<%= LicenseResponse %>" );
}
</script>
</head>
<body onload="StoreV7License()">
<object classid="clsid:A9FC132B-096D-460B-B7D5-1DB0FAE0C062" height="0"
id="GetLicenseObj" width="0">
  <embed mayscript type="application/x-drm-v2" hidden="true">
</object>
You have received a license for this song. Click Play.
</body>
</html>

Requirements

Version: Windows Media Rights Manager 7 SDK or later

Reference: msnetobj 1.0 Type Library

Library: msnetobj.dll

Platform: Windows Server 2003

See Also