Writing Monitors for the Event Monitoring Service (December 1999)
122 Chapter3
Creating a Resource Monitor
Processing an Unregister Event
Sample Code
This code fragment shows how a resource monitor might respond to an
Unregister Event. It’s the same code fragment used in the next section,
“Processing a Terminate Event.”
RmResource
Name
char * A pointer to a null-terminated string of up
to 256 characters that identifies the
resource instance for which the Monitor
Request was sent. The
RmResourceName contains the full path
name of the resource instance. See the
section, “The Resource Dictionary” for
more details.
Table 3-9 Unregister Object Fields
Field Name Type Description
/*****************************************************************************/
/* File: process_requests.c */
/* */
/* The main loop for the sample monitor. */
/*****************************************************************************/
#include <monitor.h>
/*
* Resource monitor: process_requests
*
* Desc:
* Receives and processes events until a Terminate Event is received.
*
* Parms:
* None
*
* Returns:
* Only upon error.
*/