Platform SDK: Synchronization Manager

SENS Architecture

The System Event Notification Service works with the COM+ Event System. SENS is an event publisher for the classes of events that it monitors: network, logon, and power/battery events. The application receiving a notification is called an event subscriber.

When an application subscribes to receive notifications, it can also specify filters associated with the subscribed events. SENS and COM+ Events use the filters to further determine when the application should be notified.

Notifications are asynchronous, so the application receiving the notification does not have to be active when the notification is sent. When an application subscribes to receive notifications, it can specify whether it should be activated when the event occurs or notified later when it is active.

The subscription can be transient and valid only until the application stops running, or it can be persistent and valid until the application is removed from the system.

A COM+ Events data store contains information about the event publisher (SENS), event subscribers, and filters. During setup when you install or upgrade to Microsoft® Windows® 2000, SENS adds itself to the COM+ Events data store and provides information on the classes of events that it monitors using a GUID for each class of events. SENS also predefines an outgoing interface for each event class in a type library.

Event Class GUID Interface
Network events SENSGUID_EVENTCLASS_NETWORK ISensNetwork
Logon events SENSGUID_EVENTCLASS_LOGON ISensLogon
Power events SENSGUID_EVENTCLASS_ONNOW ISensOnNow

To receive notifications for any of these events, your application must do two things:

When one of the monitored events occurs, SENS processes each subscription with any associated filters and notifies the subscribers through the COM+ Event system.