다음을 통해 공유


IWMPSubscriptionService::allowPDATransfer method (subscriptionservices.h)

[The feature associated with this page, Windows Media Player SDK, is a legacy feature. It has been superseded by MediaPlayer. MediaPlayer has been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer instead of Windows Media Player SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

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 allowPDATransfer method is implemented by the online store's plug-in to manage permission for Windows Media Player to synchronize content with a device.

Syntax

HRESULT allowPDATransfer(
  [in]      HWND         hwnd,
  [in, out] IWMPPlaylist *pPlaylist,
  [out]     BOOL         *pfAllowTransfer
);

Parameters

[in] hwnd

A handle to a window in which the plug-in can display a user interface.

[in, out] pPlaylist

Pointer to a playlist object.

[out] pfAllowTransfer

Pointer to a BOOL. If true, copying to a device is allowed.

Return value

The method returns an HRESULT.

Remarks

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

When Windows Media Player calls your plug-in's allowPDATransfer method, it passes a pointer to a playlist, which contains items from your online store. Your allowPDATransfer method must remove any items from the playlist that should not be synchronized with a device.

The situations in which Windows Media Player calls allowPDATranfer differ between versions of Windows Media Player.

Windows Media Player 9 Series and Windows Media Player 10 call allowPDATransfer automatically in certain situations. For example, if the user attempts to synchronize a list of tracks with a device, and some of those tracks do not have permission to be synchronized, Windows Media Player calls allowPDATransfer.

Windows Media Player 11 never calls allowPDATransfer automatically. That is, Windows Media Player 11 calls allowPDATransfer only when the user explicitly requests synchronization rights. For example, the user might request a synchronization rights by choosing a command from the context menu of an information icon.

Do not rely on allowPDATransfer being called each time a track is synchronized with a device. Instead, implement IWMPSubscriptionService2::prepareForSync.

Requirements

Requirement Value
Minimum supported client Windows Media Player 9 Series or later.
Target Platform Windows
Header subscriptionservices.h

See also

IWMPSubscriptionService Interface