3.4.1.4 Notification Callback Objects

Clients can register callback objects in order to receive VDS event notifications from the server. (For more information and for an example of how clients can do this, see section 4.2.)

For each client notification callback object that is registered with the server, the server maintains the following information in its list of callback objects:

Cookie: A unique 32-bit value that identifies the callback and that is maintained until the callback object is unregistered.

  • The cookie is assigned by the server and returned to the client so that the client can use it to later unregister the callback.

  • The server does not change the identifier and does not assign it to another callback object until the original callback object is unregistered.

 Callback Object Interface: A pointer to the IVdsAdviseSink interface that is implemented by the callback object that is used to receive notifications from the server.

  • Whenever a notification needs to be sent to the client, the server calls the IVdsAdviseSink::OnNotify (Opnum 3) method of the object in order to notify it of the event.