UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:syncmgr.ISyncMgrSyncCallback.ReportEvent |
ISyncMgrSyncCallback::ReportEvent (syncmgr.h) |
Provides an event to add to the Sync Results folder for an item being synchronized. |
|
shell\ISyncMgrSyncCallback_ReportEvent.htm |
shell |
4c7d6627-1652-4920-9dce-a61673e6e656 |
12/05/2018 |
ISyncMgrSyncCallback interface [Windows Shell],ReportEvent method, ISyncMgrSyncCallback.ReportEvent, ISyncMgrSyncCallback::ReportEvent, ReportEvent, ReportEvent method [Windows Shell], ReportEvent method [Windows Shell],ISyncMgrSyncCallback interface, _shell_ISyncMgrSyncCallback_ReportEvent, shell.ISyncMgrSyncCallback_ReportEvent, syncmgr/ISyncMgrSyncCallback::ReportEvent |
syncmgr.h |
Windows |
Windows Vista [desktop apps only] |
Windows Server 2008 [desktop apps only] |
Syncmgr.idl |
Windows |
19H1 |
|
|
|
|
|
|
Provides an event to add to the Sync Results folder for an item being synchronized.
Type: LPCWSTR
A pointer to a buffer that contains the unique ID of the item currently being synchronized. This string is of maximum length MAX_SYNCMGR_ID including the terminating null character.
Type: SYNCMGR_EVENT_LEVEL
A value from the SYNCMGR_EVENT_LEVEL enumeration declaring the type of event involved.
Type: SYNCMGR_EVENT_FLAGS
Not used.
Type: LPCWSTR
A pointer to a buffer that contains the name of the event.
Type: LPCWSTR
A pointer to a buffer that contains a description of the event.
Type: LPCWSTR
A pointer to a buffer that contains the text to be used in a hyperlink to the item. This parameter can be NULL
Type: LPCWSTR
A pointer to a buffer that contains the URL of the item. This parameter can be NULL
Type: LPCWSTR
Handler-specific data to associate with the event.
Type: GUID*
When this method returns, contains a pointer to a unique ID for the event.
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
For the handler to provide more details to the user about the sync result, the property sheet for individual sync results reported by the handler can be extended.
This method replaces LogError.
The event is stored only in memory, so all events are cleared when the user logs off or shuts down. This is one reason to implement a custom ISyncMgrEventStore, which can provide its events from anywhere, including a file, over the network, or the registry. The sync results folder, however, shows events provided both by the internal event store and by custom event stores provided by sync handlers.
The following example shows the usage of ISyncMgrSyncCallback::ReportProgress by the Synchronize method.
STDMETHODIMP CMyDeviceHandler::Synchronize(...)
{
...
// Get the event receiver interface.
ISyncMgrEventReceiver *pEventReceiver = NULL;
hr = pCallback->QueryInterface(IID_ISyncMgrEventReceiver,
(void **) &pEventReceiver);
...
// Start synchronizing the sync item.
...
// Generate a GUID for this item.
// Construct a string to display in the Sync Results folder.
// Store the information about this event so we can display more details.
// Report the event to Sync Center.
hr = pEventReceiver->ReportEvent(pszItemID,
SYNCMGR_EL_INFORMATION,
SYNCMGR_EF_NONE,
pszEventName,
pszEventDescription,
NULL,
NULL,
NULL,
&guidEventID);
...
}