Freigeben über


Windows Media Rights Manager SDK banner art

WMRMChallenge.CheckClientCapability

You can use the CheckClientCapability method to determine the features that are supported by the DRM component of a player. Use this information to choose the type of license to issue, or whether to issue a license at all. For example, if the minimum security level that you require for your content is not supported by the client, you can refuse to issue a license when requested.

Syntax

Boolean = WMRMChallenge.CheckClientCapability(bstrFeatureName)

Parameters

bstrFeatureName

[in] String containing the feature name.

Value Description
ApplicationExclusion Determines whether the player application supports application exclusion (the ability to prevent specified players from playing your packaged files). True indicates the player application is based on Windows Media Format 7.1 SDK or later.
MinimumClientSDKSecurity Determines whether the player application is based on Windows Media Format 7.1 SDK or later.
SAPMode Determines whether the client's operating system supports Secure Audio Path (SAP). Currently, only Windows Millennium Edition (after upgrading Windows Media Player) and Windows XP support SAP.

Return Values

If the method succeeds, it returns a Boolean value indicating whether the client supports the specified feature. If the property fails, it returns a number in the error object.

Return code Description
0xC0042920 The specified feature is not supported by this method.

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
    Dim bAppExcl, bMinSDK, bSAPSupport

' 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

' Verify that the client supports application exclusion and SAP, and
' is based on Windows Media Format SDK 7.1 or later. 

  bAppExcl = ChallengeObj.CheckClientCapability("ApplicationExclusion")
  if (bAppExcl = False) then
      ' Application exclusion is not supported.
  end if

  bMinSDK = ChallengeObj.CheckClientCapability("MinimumClientSDKSecurity")
  if (bMinSDK = False) then
      ' The client is not based on Windows Media Format SDK 7.1 or later.
  end if

  bSAPSupport = ChallengeObj.CheckClientCapability("SAPMode")
  if (bSAPSupport = False) then
      ' SAP is not supported.
  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