WMRMHeader.AddUplink

banner art

Previous Next

The AddUplink method adds the key ID to the content header.

Syntax

  
    
  
  .AddUplink(
  uplinkKid
  )

Parameters

uplinkKid

[in] String containing a key ID of the root license element in the license chain.

Return Values

This method does not return a value.

Remarks

Use this method to add the key ID identifying the root license in the license chain. The WMRMHeader.KeyID method specifies the key ID of the leaf license. For more information, see Issuing Chained Licenses.

Example Code

Dim KeyObj                   ' WMRMKeys object
Dim RootKID                  ' Key ID of the root license
Dim LeafKID                  ' Key ID of the leaf license
Dim LKSeed                   ' License key seed
Dim ContentKey               ' Key of the leaf license

'Generate root and leaf key IDs.
Set KeyObj = Server.CreateObject("WMRMObjs.WMRMKeys")

RootKID = KeyObj.GenerateKeyID()
LeafKID = KeyObj.GenerateKeyID()

' Generate the content key for the leaf license. 
KeyObj.Seed = LKSeed
KeyObj.KeyID = LeafKID
ContentKey = KeyObj.GenerateKey()

' Set values into the content header and sign it.
Set HeaderObj = Server.CreateObject("WMRMObjs.WMRMHeader")
HeaderObj.KeyID = LeafKID
HeaderObj.LicenseAcqURL = LicURL

' Add the root key ID to the license to indicate a chain.
HeaderObj.AddUplink(RootKid)

' Continue protecting the content.

Requirements

Version: Windows Media Rights Manager 10 SDK or later

Reference: wmrmobjs 1.0 Type Library

Library: wmrmobjs.dll

Platform: Windows Server 2003

See Also

Previous Next

© 2007 Microsoft Corporation. All rights reserved.