ISyncMgrHandler::Enable method (syncmgr.h)
Requests that an active handler be enabled or disabled. An enabled handler can be synchronized and a disabled handler cannot.
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
A handler must set the SYNCMGR_HCM_CAN_ENABLE and SYNCMGR_HCM_CAN_DISABLE flags for the Enable and Disable entries to appear on the handler's shortcut menu when the handler is shown in the Sync Center folder. Choosing to enable a handler means that it can be synchronized; choosing to disable a handler means that it cannot.
Sync Center calls this method in the following two instances.
- When the user selects the handler in the Sync Center folder and launches its Enable task. 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 handler in the Sync Center folder and launches its Disable task. 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 CMyDeviceHandler::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 |