Skip to content

Latest commit

 

History

History
144 lines (101 loc) · 5.13 KB

nf-syncmgr-isyncmgrcontrol-startitemsync.md

File metadata and controls

144 lines (101 loc) · 5.13 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:syncmgr.ISyncMgrControl.StartItemSync
ISyncMgrControl::StartItemSync (syncmgr.h)
Initiates the synchronization of specified items managed by a particular handler.
ISyncMgrControl interface [Windows Shell]
StartItemSync method
ISyncMgrControl.StartItemSync
ISyncMgrControl::StartItemSync
StartItemSync
StartItemSync method [Windows Shell]
StartItemSync method [Windows Shell]
ISyncMgrControl interface
_shell_ISyncMgrControl_StartItemSync
shell.ISyncMgrControl_StartItemSync
syncmgr/ISyncMgrControl::StartItemSync
shell\ISyncMgrControl_StartItemSync.htm
shell
7e4798ce-04ee-4c75-8be2-0ad8fdc400a5
12/05/2018
ISyncMgrControl interface [Windows Shell],StartItemSync method, ISyncMgrControl.StartItemSync, ISyncMgrControl::StartItemSync, StartItemSync, StartItemSync method [Windows Shell], StartItemSync method [Windows Shell],ISyncMgrControl interface, _shell_ISyncMgrControl_StartItemSync, shell.ISyncMgrControl_StartItemSync, syncmgr/ISyncMgrControl::StartItemSync
syncmgr.h
Windows
Windows Vista [desktop apps only]
Windows Server 2008 [desktop apps only]
Syncmgr.idl
Windows
19H1
ISyncMgrControl::StartItemSync
syncmgr/ISyncMgrControl::StartItemSync
c++
APIRef
kbSyntax
COM
Syncmgr.h
ISyncMgrControl.StartItemSync

ISyncMgrControl::StartItemSync

-description

Initiates the synchronization of specified items managed by a particular handler.

-parameters

-param pszHandlerID [in]

Type: LPCWSTR

A pointer to a buffer containing the unique ID of the handler that manages the items. This string is of maximum length MAX_SYNCMGR_ID including the terminating null character.

-param ppszItemIDs [in]

Type: LPCWSTR*

The address of a pointer to a buffer containing an array of IDs of the items to be synchronized. Each ID is of maximum length MAX_SYNCMGR_ID including the terminating null character. This array is passed to Synchronize.

-param cItems [in]

Type: DWORD

The number of IDs in ppszItemIDs.

-param hwndOwner [in]

Type: HWND

A handle to the window that the item can use to display any necessary UI. This value can be NULL.

-param punk [in]

Type: IUnknown*

A pointer to an IUnknown to be passed to Synchronize. This parameter can be NULL.

-param nSyncControlFlags [in]

Type: SYNCMGR_SYNC_CONTROL_FLAGS

A member of the SYNCMGR_SYNC_CONTROL_FLAGS enumeration that specifies whether an item found in both a current sync and a queued sync should be synchronized again when the queued sync is performed.

-param pResult [in]

Type: ISyncMgrSyncResult*

A pointer to an instance of ISyncMgrSyncResult, whose Result method is called when the synchronization ends, either through success, failure, or cancellation. The Result method is called with the aggregated state of the handler synchronization. This parameter can be NULL.

-returns

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

-remarks

This method is analogous to UpdateItems.

Examples

The following example shows the usage of ISyncMgrControl::StartItemSync by a handler's procedure.

void CMyDeviceHandler::MiscProc(...)
{
    ...

    // Get the Sync Center control object.
    ISyncMgrControl *pControl = NULL;
    
    hr = CoCreateInstance(CLSID_SyncMgrControl, 
                          CLSCTX_SERVER,
                          IID_PPV_ARGS(&pControl));
    if (SUCCEEDED(hr))
    {
        // Synchronize one sync item for the sync handler.
        hr = pControl->StartItemSync(s_szMySyncHandlerID,
                                     s_szMySyncHandlerMusicContentID,
                                     1,
                                     _hwnd,
                                     NULL,
                                     NULL);
        pControl->Release();
    }

    ...

}