IPlayReadyServiceRequest IPlayReadyServiceRequest IPlayReadyServiceRequest IPlayReadyServiceRequest IPlayReadyServiceRequest Interface


Base interface for all service request interfaces.

public : interface IPlayReadyServiceRequest : IMediaProtectionServiceRequest
struct winrt::Windows::Media::Protection::PlayReady::IPlayReadyServiceRequest : IMediaProtectionServiceRequest
public interface IPlayReadyServiceRequest : IMediaProtectionServiceRequest
Public Interface IPlayReadyServiceRequest Implements IMediaProtectionServiceRequest
// You can't instantiate an interface directly in JavaScript. You can use objects that implement the interface, however.
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)


All PlayReady service request objects support all the methods in this interface with the exceptions of PlayReadyIndividualizationServiceRequest and PlayReadyRevocationServiceRequest. IPlayReadyIndividualizationServiceRequest and IPlayReadyRevocationServiceRequest only support BeginServiceRequest and NextServiceRequest.

Some properties are only available for retrieval after the service request is complete. These will be explicitly indicated.

No properties can be set after BeginServiceRequest or GenerateManualEnablingChallenge has been called. These methods effectively put the interface into a read-only state.

The only IPlayReadyServiceRequest that can be created if the machine is not individualized is IPlayReadyIndividualizationServiceRequest. All others return MSPR_E_NEEDS_INDIVIDUALIZATION until individualization occurs successfully.


ChallengeCustomData ChallengeCustomData ChallengeCustomData ChallengeCustomData ChallengeCustomData

Gets or sets the custom data of the request challenge.

public : Platform::String ChallengeCustomData { get; set; }
winrt::hstring ChallengeCustomData(); void ChallengeCustomData(winrt::hstring challengecustomdata);
public string ChallengeCustomData { get; set; }
Public ReadWrite Property ChallengeCustomData As string
var string = iPlayReadyServiceRequest.challengeCustomData;
iPlayReadyServiceRequest.challengeCustomData = string;
string string string

The custom data.


Use this property to get the custom data to be placed in the request challenge or to set the challenge custom data to send up as part of the request.

Setting this property is optional.

This property cannot be set after BeginServiceRequest or GenerateManualEnablingChallenge have been called.

ProtectionSystem ProtectionSystem ProtectionSystem ProtectionSystem ProtectionSystem

Allows the application to identify the content protection system being used and therefore how to interpret the protection task.

(Inherited from IMediaProtectionServiceRequest)

ResponseCustomData ResponseCustomData ResponseCustomData ResponseCustomData ResponseCustomData

Gets the custom data that was returned in the response from the service.

public : Platform::String ResponseCustomData { get; }
winrt::hstring ResponseCustomData();
public string ResponseCustomData { get; }
Public ReadOnly Property ResponseCustomData As string
var string = iPlayReadyServiceRequest.responseCustomData;
string string string

The custom data.


This property can only be called after the service request has been completed.

Type Type Type Type Type

Retrieves the GUID for the type of operation that the IMediaProtectionServiceRequest performs.

(Inherited from IMediaProtectionServiceRequest)

Uri Uri Uri Uri Uri

Gets or sets the URI used to perform a service request action.

public : Uri Uri { get; set; }
Uri Uri(); void Uri(Uri uri);
public Uri Uri { get; set; }
Public ReadWrite Property Uri As Uri
var uri = iPlayReadyServiceRequest.uri;
iPlayReadyServiceRequest.uri = uri;
Uri Uri Uri

The URI to be used.


For certain service requests, the URI must be set before calling BeginServiceRequest either through this property or through a different property (such as a content header) that contains a URI.

This property cannot be set after BeginServiceRequest or GenerateManualEnablingChallenge have been called.


BeginServiceRequest() BeginServiceRequest() BeginServiceRequest() BeginServiceRequest() BeginServiceRequest()

Begins an asynchronous service request operation.

public : IAsyncAction BeginServiceRequest()
IAsyncAction BeginServiceRequest() const;
public IAsyncAction BeginServiceRequest()
Public Function BeginServiceRequest() As IAsyncAction
var iAsyncAction = iPlayReadyServiceRequest.beginServiceRequest();

The asynchronous service action.


Completion and results can be retrieved using the IAsyncAction interface that is returned. Calling this method places the interface in a read-only state.

GenerateManualEnablingChallenge() GenerateManualEnablingChallenge() GenerateManualEnablingChallenge() GenerateManualEnablingChallenge() GenerateManualEnablingChallenge()

Begins the process of manually enabling.

public : PlayReadySoapMessage GenerateManualEnablingChallenge()
PlayReadySoapMessage GenerateManualEnablingChallenge() const;
public PlayReadySoapMessage GenerateManualEnablingChallenge()
Public Function GenerateManualEnablingChallenge() As PlayReadySoapMessage
var playReadySoapMessage = iPlayReadyServiceRequest.generateManualEnablingChallenge();

Begins the process of manually enabling.


Provides the caller the raw HTTP challenge and headers that must be sent up to the server. When the response is received, it should be processed by calling the ProcessManualEnablingResponse method.

Calling this method places the interface in a read-only state even if the method does not succeed.

NextServiceRequest() NextServiceRequest() NextServiceRequest() NextServiceRequest() NextServiceRequest()

Returns a new service request interface.

public : IPlayReadyServiceRequest NextServiceRequest()
IPlayReadyServiceRequest NextServiceRequest() const;
public IPlayReadyServiceRequest NextServiceRequest()
Public Function NextServiceRequest() As IPlayReadyServiceRequest
var iPlayReadyServiceRequest = iPlayReadyServiceRequest.nextServiceRequest();


This method should only be called after:

Both of the above situations leave the current service request in a read-only/complete state, although there could be additional service requests to perform. An app should call this method to determine if additional service requests are required.

ProcessManualEnablingResponse(Byte[]) ProcessManualEnablingResponse(Byte[]) ProcessManualEnablingResponse(Byte[]) ProcessManualEnablingResponse(Byte[]) ProcessManualEnablingResponse(Byte[])

Processes the raw binary result of a manual enabling challenge.

public : HResult ProcessManualEnablingResponse(Byte[] responseBytes)
HResult ProcessManualEnablingResponse(Byte[] responseBytes) const;
public Exception ProcessManualEnablingResponse(Byte[] responseBytes)
Public Function ProcessManualEnablingResponse(responseBytes As Byte[]) As Exception
var hResult = iPlayReadyServiceRequest.processManualEnablingResponse(responseBytes);
Byte[] Byte[] Byte[]

The response result to be processed.

Exception Exception Exception

If the methods succeeds, it returns S_OK. If it fails, it returns an error code.


The return value of this method is a failure only if the input data is invalid in some way. If the result is processed successfully but has a failure state, this method will return that failure in the result parameter.

The most common values to be returned in result are:

  • S_OK—The enabling response was processed and there are no more service requests necessary. A following call to NextServiceRequest will return a NULL pointer.
  • MSPR_E_CONTENT_ENABLING_ACTION_REQUIRED—A new service request was generated when processing the current service request. A call to NextServiceRequest should be made.
  • DRM_E_SERVER_SERVICE_SPECIFIC—A PlayReady license or domain server failed.
  • MSPR_E_SDK_UPDATE_REQUIRED—The individualization service requires a client SDK update before a new individualization operation can complete. Refreshing the PlayReady SDK is required.

See Also