PlayReadyStatics.CheckSupportedHardware(PlayReadyHardwareDRMFeatures) Method

Definition

Queries whether the specified hardware digital rights management (DRM) feature is supported on the system.

public:
 static bool CheckSupportedHardware(PlayReadyHardwareDRMFeatures hwdrmFeature);
 static bool CheckSupportedHardware(PlayReadyHardwareDRMFeatures const& hwdrmFeature);
public static bool CheckSupportedHardware(PlayReadyHardwareDRMFeatures hwdrmFeature);
function checkSupportedHardware(hwdrmFeature)
Public Shared Function CheckSupportedHardware (hwdrmFeature As PlayReadyHardwareDRMFeatures) As Boolean

Parameters

hwdrmFeature
PlayReadyHardwareDRMFeatures

The hardware DRM feature to query.

Returns

Boolean

bool

true if the hardware DRM feature is supported, otherwise false.

Remarks

Starting with Windows 10, version 1709, you can detect support for AES128CBC hardware encryption on a device by calling CheckSupportedHardware and specifying the enumeration value PlayReadyHardwareDRMFeatures.Aes128Cbc. On previous versions of Windows 10, specifying this value will cause an exception to be thrown. For this reason, you should check for the presence of the enumeration value by calling ApiInformationIsApiContractPresent and specifying major contract version 5 before calling CheckSupportedHardware.

bool supportsAes128Cbc = ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 5);

if (supportsAes128Cbc)
{
    supportsAes128Cbc = PlayReadyStatics.CheckSupportedHardware(PlayReadyHardwareDRMFeatures.Aes128Cbc);
}

Applies to