Share via


AcquireLicense Method

In nonsilent license acquisition, the licensing service must provide a Web page hosting the ActiveX control contained in MSDRMCtrl.dll.

Note   Nonsilent license acquisition is supported only in Rights Management Services client 1.0. Effective with RMS client 1.0 SP1, nonsilent license acquisition is no longer supported, and MSDRMCtrl.dll is not shipped.

The ActiveX object has a class ID of "CLSID:BB1C21F3-DFC3-4E8A-BD80-6CA7592478E0". This object has a single method, AcquireLicense, that initiates license acquisition, and corresponds with the application's callback function automatically. This function is meant to be called by a scripting language, such as Microsoft JScript development software, from the Web page. Here is the syntax of AcquireLicense as it is used in a Web page.

Syntax

retVal = AcquireLicense(
  IssuanceLicense,
  ContentID,
  SKUID,
  UserID,
  LAURL,
  DPURL
)

Parameters

  • IssuanceLicense
    Issuance license to use in the license acquisition.

  • ContentID
    ID of the content to acquire the license for.

  • SKUID
    SKU of the content to acquire the license for.

  • UserID
    E-mail address of the user to acquire the license for.

  • LAURL
    Silent license acquisition URL mentioned in the issuance license.

  • DPURL
    Backup silent license acquisition URL for license acquisition.

The following HTML shows a very simple Web page that hosts the ActiveX object. A similar page would be put up by the license service that provides an online licensing service. In practice, the hosting Web page is responsible for getting the user's Windows or Passport e-mail messages, the license ID and SKU, and LAURLs that match the issuance license's LAURLs, to pass into AcquireLicense, instead of hard-coding them in, as shown here.

<html>
   <head>
      <title>License Acquisition</title>
      <script language="JScript">

<!--Get issuance license, ID, SKU, and e-mail message.-->
function Invoke()
{
<!--Get issuance license, ID, SKU, and e-mail message.-->
   LicAcq.AcquireLicense("issuance license", 
                         "MYID", 
                         "MYSKU1",
                         laform.Email.value,
                         "https://www.contoso.com/_wmcs/licensing", 
                         "https://www.contoso.com/_wmcs/licensing");

   return true;
}
      </script>
   </head>
   <body>
      <OBJECT 
      id="LicAcq" 
      classid="CLSID:BB1C21F3-DFC3-4E8A-BD80-6CA7592478E0" VIEWASTEXT>
      </OBJECT>
      <form id="laform">
         <entity type="nbsp"/>
         <table ID="Table1">
            <tr>
               <td valign="top">Email address:</td>
               <td><textarea name="Email" 
                             rows="1" cols="26" 
                             ID="Textarea2">
                   </textarea>
               </td>
            </tr>
            <tr>
               <td valign="top">Result:</td>
               <td><textarea name="result" 
                             rows="8" 
                             cols="60" 
                             readonly ID="Textarea1">
                   </textarea>
            </td>
            </tr>
         </table>

      </form>
      <input type="button" 
             value="Get License" 
             ID="Submit1" 
             NAME="Submit1" 
             onclick="Invoke()">
   </body>
</html>

Requirements

Product Requires Rights Management Services client 1.0 or later.
DLL

Requires MsdrmCtrl.dll.

See Also

Nonsilent License Acquisition
Active Directory Rights Management Services Reference

Send comments about this topic to Microsoft

Build date: 3/13/2008