Windows Media Player 11 SDK IWMPSettings2::requestMediaAccessRights 

Windows Media Player SDK banner art

Previous Next

IWMPSettings2::requestMediaAccessRights

The requestMediaAccessRights method requests a specified level of access to the library.

Syntax

  

Parameters

bstrDesiredAccess

[in]  BSTR containing the one of the following values.

Value Description
none Current item access rights only.
read Read access rights only.
full Read/Write access rights.

pvbAccepted

[out]  Pointer to a VARIANT_BOOL indicating whether the requested access rights were granted.

Return Values

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK The method succeeded.

Remarks

A Web page must first request permission from the user to read information from or write data to the library. Invoking this method prompts the user with a dialog box that requests the specified permission level. This means that certain methods, properties, and events will be inaccessible from code if the appropriate access rights have not been granted. The current access rights level can be retrieved by using IWMPSettings2::get_mediaAccessRights.

Applications running on the user's computer are not required to use this method.

Windows Media Player 10 Mobile: This method always retrieves a VARIANT_BOOL set to TRUE.

Requirements

Version: Windows Media Player 9 Series or later.

Header: Include wmp.h.

Library: Use wmp.dll.

See Also

Previous Next