4.2.3 Unregistering for Notifications
The following figure shows an example of a client that cancels a previous registration for a notification.
Figure 6: Client canceling previous registration for notification
The client requests unregistration by calling the IVdsService::Unadvise method and passing the cookie value that was received during registration.
The server determines that the cookie value matches a registered IVdsAdviseSink interface and invokes the IVdsAdviseSink::Release method to release its reference.
The client returns the new reference count for the IVdsAdviseSink interface.
The server returns an HRESULT of 0x00000000 in response to an IVdsService::Unadvise call from the client to acknowledge that the registration is canceled. The server can reuse the cookie value in the future.