ISyncMgrHandlerCollection::BindToHandler method

Instantiates a specified sync handler when called by Sync Center.

Syntax


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

Parameters

pszHandlerID [in]

Type: LPCWSTR

The ID of the sync handler.

riid [in]

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.

ppv [out]

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

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Syncmgr.h

IDL

Syncmgr.idl

See also

ISyncMgrHandlerCollection
ISyncMgrHandler

 

 

Show: