ISyncMgrControl::StopItemSync method

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

Syntax


HRESULT StopItemSync(
  [in] LPCWSTR pszHandlerID,
  [in] LPCWSTR *ppszItemIDs,
  [in] DWORD   cItems
);

Parameters

pszHandlerID [in]

Type: LPCWSTR

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

ppszItemIDs [in]

Type: LPCWSTR*

The address of a pointer to a buffer containing an array of IDs of the items to stop synchronizing. Each ID is of maximum length MAX_SYNCMGR_ID including the terminating null character.

cItems [in]

Type: DWORD

The number of IDs in ppszItemIDs.

Return value

Type: HRESULT

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

Examples

The following example shows the usage of ISyncMgrControl::StopItemSync 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))
    {
        // Stop synchronizing one sync item for the sync handler.
        hr = pControl->StopItemSync(s_szMySyncHandlerID,
                                    s_szMySyncHandlerMusicContentID,
                                    1);
        pControl->Release();
    }

    ...

}


Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Syncmgr.h

IDL

Syncmgr.idl

 

 

Show: