IWMPSyncDevice2::setItemInfo 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 setItemInfo method specifies an attribute value for a device.
Syntax
HRESULT setItemInfo(
[in] BSTR bstrItemName,
[in] BSTR bstrVal
);
Parameters
[in] bstrItemName
BSTR specifying the name of the attribute on which to set the new value. For supported attribute names, see Remarks.
[in] bstrVal
BSTR specifying the new value. For information about supported values, see Remarks.
Return value
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
Return code | Description |
---|---|
|
The method succeeded or a partnership exists. |
Remarks
The following table lists the supported attributes.
Attribute | Description |
---|---|
AutoSyncDefaultRules |
Specifies whether automatic synchronization is done according to default rules or custom rules. A value of "true" specifies default rules, and a value of "false" specifies custom rules.
Use of this attribute is permitted only for devices with which Windows Media Player has a partnership. Requires Windows Media Player 12. |
BackgroundSyncState |
Specifies whether Windows Media Player is allowed to perform background operations for the device.
The value can be a string (BSTR) representation of a bitwise combination of one or more of the following flags.
Use of this attribute is permitted only for devices with which Windows Media Player has a partnership. Requires Windows Media Player 12. |
IncludeSkippedFiles |
When the user deletes files from the device, Windows Media Player marks those files as skipped and does not include them in future synchronization operations. Setting this attribute instructs Windows Media Player to include skipped files in the next synchronization.
Set the value of this attribute to the empty BSTR. Use of this attribute is permitted only for devices with which Windows Media Player has a partnership. Requires Windows Media Player 12. |
PercentSpaceReserved |
Limits the amount of device storage that Windows Media Player uses for file synchronization by specifying a portion of the storage as reserved. The value is a numeric percentage of total storage on the device represented by a string (BSTR). Supported values range from "0" to "95".
Use of this attribute is permitted only for devices with which Windows Media Player has a partnership. |
SyncFilter |
Specifies the types of files that will be synchronized during the next synchronization session, and specifies whether content can be acquired from the device during that synchronization session.
The value can be a string (BSTR) representation of a bitwise combination of one or more of the following flags.
The value can also be one of the following strings.
Use of this attribute is permitted only for devices with which Windows Media Player has a partnership. Requires Windows Media Player 12. |
SyncOnConnect |
Specifies whether Windows Media Player should synchronize the device when the device gets connected. The value "true" specifies that Windows Media Player should synchronize the device, and the value "false" specifies that Windows Media Player should not synchronize the device.
Use of this attribute is permitted only for devices with which Windows Media Player has a partnership. Requires Windows Media Player 12. |
Windows Media Player 10 Mobile: This method is not supported.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Media Player 11 or later |
Target Platform | Windows |
Header | wmp.h |
DLL | Wmp.dll |