ISyncMgrSyncItem::Enable method (syncmgr.h)
Enables or disables the sync item.
Syntax
HRESULT Enable(
[in] BOOL fEnable
);
Parameters
[in] fEnable
Type: BOOL
TRUE to enable; FALSE to disable.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
Sync Center calls this method in the following scenarios.
- When the user selects the item in the handler's folder and launches its Enable task, but only if the item has not set the SYNCMGR_IPM_PREVENT_ENABLE flag. If the handler supports the SYNCMGR_OBJECTID_QueryBeforeEnable object, this method is only called if the UI operation was successful.
- When the user selects the item in the handler's folder and launches its Disable task, but only if the item has not set the SYNCMGR_IPM_PREVENT_DISABLE flag. If the handler supports the SYNCMGR_OBJECTID_QueryBeforeDisable object, this method is only called if the UI operation was successful.
Examples
The following example shows a simple implementation of this method.
STDMETHODIMP CMyDeviceSyncItem::Enable(__in BOOL fEnable)
{
return E_NOTIMPL;
}
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 |