Share via


IWMPSyncDevice3::estimateSyncSize method (wmp.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.]

The estimateSyncSize method initiates the estimation of the size required on the device to synchronize a specified playlist.

Syntax

HRESULT estimateSyncSize(
  [in] IWMPPlaylist *pNonRulePlaylist,
  [in] IWMPPlaylist *pRulesPlaylist
);

Parameters

[in] pNonRulePlaylist

A pointer to an IWMPPlaylist interface that represents the playlist for which the size will be estimated. This parameter can be set to NULL. If this argument is specified the estimation will return the size of pNonRulePlaylist and the current sync rules, if any.

[in] pRulesPlaylist

A pointer to an IWMPPlaylist interface that represents the playlist for which the size will be estimated. This parameter can be set to NULL. If this argument is specified then the current sync rules will be excluded from the estimation so that the estimation will return the size of pNonRulePlaylist and pRulesPlaylist.

Return value

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.
E_INVALIDARG
Windows Media Player is shutting down, or pNonRulePlaylist and pRulesPlaylist are both NULL.
E_UNEXPECTED
A synchronization session is already in progress for the device.

Remarks

The estimation of required size is done asynchronously. That is, this method initiates the estimation and then returns immediately. When the estimation is complete, Windows Media Player raises the IWMPEvents4::SyncEstimationComplete event.

The estimation cannot occur if a synchronization session is currently in progress for the device.

If you call this method and then call it again before the first estimation is complete, the first estimation is canceled and a new estimation is initiated.

Requirements

Requirement Value
Minimum supported client Windows Media Player 12
Target Platform Windows
Header wmp.h
DLL Wmp.dll

See also

IWMPSyncDevice3 Interface