Share via


Windows Media Player 11 SDK IWMPSubscriptionService::allowPlay 

Windows Media Player SDK banner art

Previous Next

IWMPSubscriptionService::allowPlay

Note This section describes functionality designed for use by online stores. Use of this functionality outside the context of an online store is not supported.

The allowPlay method is implemented by the online store to manage permission for Windows Media Player to play premium content.

Syntax

  HRESULT allowPlay(
  HWND  hwnd,
  IWMPMedia*  pMedia,
  BOOL*  pfAllowPlay
);

Parameters

hwnd

[in] The handle of the parent window.

pMedia

[in] Pointer to the media object Windows Media Player is attempting to play.

pfAllowPlay

[out] Pointer to a BOOL. If true, playback is allowed.

Return Values

The method returns an HRESULT.

Remarks

Your code should not perform lengthy operations synchronously when Windows Media Player calls this method.

Windows Media Player calls allowPlay before opening the digital media file. This gives the online store an opportunity to disallow playback of licensed content or to initiate download of a new license if the license has expired.

Because the digital media file is not open when Windows Media Player calls allowPlay, calling certain methods on pMedia may not work. For instance, attempting to retrieve metadata using IWMPMedia::getItemInfo could fail.

The allowPlay method does not circumvent DRM. If the method returns TRUE and the license to play has not been renewed, Windows Media Player will not play the content.

The allowPlay method is not called when streaming protected content for which the user does not have a license.

Requirements

Version: Windows Media Player 9 Series or later.

Header: Defined in subscriptionservices.h.

See Also

Previous Next