WMRMChallenge.ClientInfo

banner art

Previous Next

WMRMChallenge.ClientInfo

The ClientInfo property retrieves the consumer information section from a challenge.

Syntax

  String = WMRMChallenge.ClientInfo

Parameters

This property takes no parameters.

Return Values

If the property succeeds, it returns a String containing the client information. 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

This property is read-only. You must pass the string containing client information to the ClientInfo property of the WMRMLicGen object as part of the license generation process. The consumer information section of the challenge contains the following information:

  • An encrypted client ID.
  • The version of Windows Media Rights Manager on the consumer's computer.
  • The individualized version number on the consumer's computer.
  • Information about the secure audio path (SAP) kernel component.

Note   Rather than saving this information about your consumers, you should retrieve the client information each time you receive a license request because the values in the client information can change, for example, when the consumer individualizes their client.

Example Code

' Assume that the content packager has sent encrypted content and 
' a header to a consumer. The consumer's computer determines that 
' a license is needed and posts a challenge to the license issuer.
' The challenge contains the header sent by the content packager,
' actions requested by the client, and information about the client
' computer.
'
' For more information about the header, see the WMRMHeader object.


' Declare variables and objects.

    Dim sHeader, sClientInfo, sPubKey, lResult, dwActionCnt
    Dim sLicRequest, lIndex, sVerClient, sVerSecurity, sAppSecurity
    Dim sAction()
    Dim HeaderObj
    Dim ChallengeObj

' Create objects.

    Set HeaderObj = Server.CreateObject("Wmrmobjs.WMRMHeader")
    Set ChallengeObj = Server.CreateObject("Wmrmobjs.WMRMChallenge")
  
' 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

' 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 has been corrupted.
    end if

' Retrieve the client information section of the challenge.

    sClientInfo = ChallengeObj.ClientInfo

' Retrieve attributes from the client.

    sVerClient = ChallengeObj.ClientAttribute("CLIENTVERSION" )
        ' Perform actions based on the DRM component
        ' version installed on the client computer.

    sVerSecurity = ChallengeObj.ClientAttribute("SECURITYVERSION")
        ' Perform actions based on the security version number.

    sAppSecurity  = ChallengeObj.ClientAttribute("APPSECURITY")
        ' Perform actions based on the security level of the 
        ' application on which the Windows Media file is to
        ' be played.

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.