Méthode ISyncMgrControl ::StartSyncAll (syncmgr.h)

Synchronise tous les éléments gérés par tous les gestionnaires.

Syntaxe

HRESULT StartSyncAll(
  [in] HWND hwndOwner
);

Paramètres

[in] hwndOwner

Type : HWND

Handle d’une fenêtre qui peut être utilisé par un gestionnaire ou un élément pour afficher toute interface utilisateur nécessaire. Cette valeur peut être NULL.

Valeur retournée

Type : HRESULT

Si cette méthode réussit, elle retourne S_OK. Sinon, elle retourne un code d’erreur HRESULT.

Remarques

Cette méthode est analogue à UpdateAll.

Exemples

L’exemple suivant montre l’utilisation d’ISyncMgrControl ::StartSyncAll par la procédure d’un gestionnaire.

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 all sync items for all sync handlers.
        hr = pControl->StartSyncAll(_hwnd);
        pControl->Release();
    }

    ...

}

Configuration requise

Condition requise Valeur
Client minimal pris en charge Windows Vista [applications de bureau uniquement]
Serveur minimal pris en charge Windows Server 2008 [applications de bureau uniquement]
Plateforme cible Windows
En-tête syncmgr.h