ISyncProviderRegistration::RegisterForEvent method (syncregistration.h)

Registers the user to receive notification of the arrival of new registration events that occur when changes are made to the registration store.

Syntax

HRESULT RegisterForEvent(
  [out] HANDLE *phEvent
);

Parameters

[out] phEvent

A HANDLE to a synchronization event that is used to notify the caller about the arrival of new registration events.

Note  The caller must not Close the returned HANDLE. The registration store will manage the memory for the HANDLE and will close it when the event is revoked by passing the HANDLE to RevokeEvent, or before the store object is freed from memory.
 

Return value

The possible return codes include, but are not limited to, the values shown in the following table.

Return code Description
S_OK
The method succeeded.
E_POINTER
Invalid pointer.

Remarks

The HANDLE returned by this method is used by the GetChange method. The event will only be set once from the RegisterForEvent call. Any subsequent notifications will only occur when the user calls the GetChange method.

To unregister from this event notification system, call the RevokeEvent method.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header syncregistration.h

See also

ISyncProviderRegistration Interface