Condividi tramite


WMRMLicGen.IndividualizedVersion

banner art

Previous Next

WMRMLicGen.IndividualizedVersion

The IndividualizedVersion property specifies the individualization version that a packaged file requires of the DRM component of the consumer's player. This value is initially retrieved from the WMRMHeader.IndividualizedVersion property, and is then put into the WMRMLicGen object to evaluate whether the player meets the individualization requirement.

Syntax

  WMRMLicGen
  .IndividualizedVersion = 
  bstrIndividualizationVersion

Parameters

bstrIndividualizationVersion

[in] String containing the individualization version.

Return Values

This property does not return a value. If the property fails, it returns a number in the error object.

Return code Description
0x80048003 Object initialization error.

Remarks

This property ensures that the DRM component of the player requesting the license meets the individualization requirement specified in the content header. If the DRM component does not meet the individualization requirement, license generation fails. Individualization is usually triggered before license acquisition, so the player will usually meet this requirement, but this method provides an additional level of security in case a license request is tampered with. It is recommended that you use this property if the content header specifies an individualization version. For the latest individualization version information, see the Microsoft Web site.

Note   To set, require, and detect individualization versions greater than 2.10, you must use version 10.1.1 or later of the Windows Media Rights Manager SDK.

If the individualization version was not specified, the string will be empty, so you should check for an empty value and clear the error object.

Example Code

' The client (player) posts a challenge to the license issuer. The 
' challenge contains the packaged file's content header, actions requested
' by the client, and information about the client computer. To determine a
' client application's individualization version, perform the following 
' steps. 

' Declare variables and objects.
    Dim sHeader, lResult, sLicRequest, indiVersion 
    Dim HeaderObj, ChallengeObj, LicGenObj 
    Dim strRevinfo, ContainsRevinfo, strClientCRLs

' Create objects.
    Set HeaderObj = Server.CreateObject("Wmrmobjs.WMRMHeader")
    Set ChallengeObj = Server.CreateObject("Wmrmobjs.WMRMChallenge")
    Set LicGenObj = Server.CreateObject("Wmrmobjs.WMRMLicGen")

' Retrieve the license request from the client computer.
    sLicRequest = request.Form("challenge")

' Set the license request into the WMRMChallenge object.
    ChallengeObj.Challenge = sLicRequest

' Retrieve the header from the challenge.
    sHeader = ChallengeObj.Header

' Check for revocation information.
    strRevinfo = ChallengeObj.RevInfo
    ContainsRevinfo = ChallengeObj.RevInfoPresent

' Set the header into the WMRMHeader object.
    HeaderObj.Header = sHeader

' Verify the header with the public key created by the content
' packager.
    lResult = HeaderObj.Verify(sPubKey)
    if (lResult = 0) then
        ' The header is corrupt.
    end if

' Retrieve the individualization version of the client from the
' WMRMHeader object.
    indiVersion = HeaderObj.IndividualizedVersion

' Individualized version may not exist in the content header.
    err.clear 

' Set the individualization version into the WMRMLicGen object.
    LicGenObj.IndividualizedVersion = indiVersion

    if (err.number <> 0) then
        exit do
    end if 

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

© 2007 Microsoft Corporation. All rights reserved.