Internal Events
Previous | Next |
Internal Events
You can use event notices to respond to changes in the state of the server. You can obtain event notices internally by using either the IWMSEventNotificationPlugin interface or the IWMSEventAuthorizationPlugin interface. You can use the WMS WMI Event Handler plug-in included with Windows Media Services to obtain an event notice externally. For more information, see External Events.
To retrieve event notices internally, you must use one of the event notification and authorization plug-ins included with Windows Media Services, or create your own. An event notification plug-in indicates the event notices that it must receive by implementing the GetHandledEvents method on the IWMSEventNotificationPlugin interface. An authorization plug-in indicates the event notices that it must receive by implementing the GetAuthorizedEvents method on the IWMSEventAuthorizationPlugin interface.
When a registered event occurs, the server calls either the OnEvent method on the IWMSEventNotificationPlugin interface or the AuthorizeEvent method on the IWMSEventAuthorizationPlugin interface and fills a WMS_EVENT structure to identify the type of event that occurred. The server also fills in a command context, user context, and presentation context.
The WMS_EVENT structure contains a WMS_EVENT_TYPE enumeration type.
struct WMS_EVENT { long Version; enum WMS_EVENT_TYPE Type; long hr; };
The following table identifies the internal event notices that can be sent by the server. The value column lists the numeric value associated with each event. You must supply the numeric value when you use Visual Basic Scripting Edition (VBScript). The notification event and authorization event columns indicate whether a notification plug-in or an authorization plug-in can subscribe to the event. Authorization events that are associated with read/write access require that an authentication plug-in be enabled before authorization can occur. This is indicated in the table by the "Authentication required" column. The event notices in the following table are members of the WMS_EVENT_TYPE enumeration type.
See Also (General)
See Also (Visual Basic .NET)
- IWMSEventAuthorizationPlugin Object (Visual Basic .NET)
- IWMSEventNotificationPlugin Object (Visual Basic .NET)
See Also (C#)
See Also (C++)
Previous | Next |