ISyncMgrHandlerCollection::BindToHandler method (syncmgr.h)

Instantiates a specified sync handler when called by Sync Center.

Syntax

HRESULT BindToHandler(
  [in]  LPCWSTR pszHandlerID,
  [in]  REFIID  riid,
  [out] void    **ppv
);

Parameters

[in] pszHandlerID

Type: LPCWSTR

The ID of the sync handler.

[in] riid

Type: REFIID

The IID of the requested interface. This will typically be IID_ISyncMgrHandler. If the method fails when passed IID_ISyncMgrHandler, it is recalled using IID_ISyncMgrSynchronize, the IID of the older ISyncMgrSynchronize interface. When the method returns successfully, a pointer to the requested interface is referenced in the ppv parameter.

[out] ppv

Type: void**

When this method returns, contains an address of a pointer to an interface representing the sync handler.

Return value

Type: HRESULT

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

Remarks

It is possible for this method to be called by Sync Center without it first calling ISyncMgrHandlerCollection::GetHandlerEnumerator. This is because Sync Center caches information about handlers and their items. The handler collection can return an interface pointer for an existing sync handler or it can create a new instance.

Requirements

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

See also

ISyncMgrHandler

ISyncMgrHandlerCollection