Writing Monitors for the Event Monitoring Service (December 1999)

Chapter 3 119
Creating a Resource Monitor
Processing an Unregister Event
Processing an Unregister Event
The Unregister Event is a signal from the EMS API that one of the
monitor requests previously active for this resource monitor has been
unregistered by a client.
No reply is expected from the resource monitor when this event occurs.
Replying to Unregister Events
To write a unregister event for your resource monitor, include the
following information.
If the monitor tracks resources that have active monitor requests, you
may want to process unregister events.
NOTE If RmLifetimeOption is RM_PREVIEW_UNREGISTER this request will not
result in an unregister.
All the monitor needs to do is destroy the object (below).
Unregister Objects
The object created by rm_get_next_event() for an Unregister Event is
a Monitor Reply object. This object is a copy of the object sent to the
client application. The resource monitor should call rm_destroy() to
destroy the Monitor Reply object.
The Unregister Event is specified by a return_type of
RM_UNREGISTER_EVENT from rm_get_next_event(). The following fields
of the Monitor Reply object are defined. They are all read-only fields; the
resource monitor should not modify them.Table 3-9 lists the Unregister