Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Proposes the addition of a new item to the set of items previously enumerated.
HRESULT ProposeItem(
[in] ISyncMgrSyncItem *pNewItem
);
[in] pNewItem
Type: ISyncMgrSyncItem*
A pointer to an instance of ISyncMgrSyncItem representing the new item.
Type: HRESULT
Returns S_OK if successful, or an error value otherwise. Returns E_INVALIDARG if pszItemID already exists.
ISyncMgrSyncCallback::ProposeItem is typically called when items are not considered part of the sync set unless they have been successfully synchronized. Sync Center does not display this item in the UI until the ISyncMgrSyncCallback::CommitItem method has been called.
The following example shows the usage of ISyncMgrSyncCallback::ProposeItem and ISyncMgrSyncCallback::CommitItem by the Synchronize method.
HRESULT CMyDeviceHandler::Synchronize(...)
{
...
// Start synchronizing the handler.
...
// Find items waiting to be created.
for (...)
{
// Create the item.
ISyncMgrSyncItem *pNewItem = NULL;
LPWSTR szItemID[MAX_SYNCMGR_ID];
hr = GetNextNewItem(&pNewItem, szItemID, ARRAYSIZE(szItemID));
if (SUCCEEDED(hr))
{
// Propose this item to Sync Center.
hr = pCallback->ProposeItem(pNewItem);
if (SUCCEEDED(hr))
{
// Synchronize the item.
// Synchronization was successful. Commit the item.
hr = pCallback->CommitItem(szItemID);
}
pNewItem->Release();
}
}
...
}
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | syncmgr.h |
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today