Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
.gif)
| Previous | Next |
IWMSServer::get_EventHandlers
The get_EventHandlers method retrieves an IWMSPlugins interface containing a collection of event notification and authorization plug-ins.
Syntax
HRESULT get_EventHandlers( IWMSPlugins** pVal );
Parameters
pVal
[out] Pointer to a pointer to the IWMSPlugins interface containing the collection of event notification and authorization plug-ins.
Return Values
If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.
| Return code | Number | Description |
| E_POINTER | 0x80004003 | Indicates that pVal is a NULL pointer argument. |
Remarks
The following system plug-ins can be accessed using the get_EventHandlers method.
| Plug-in | Description |
| WMS Active Script Handler | Enables you to use a scripting language to customize the way that a Windows Media server authorizes and responds to internal events. |
| WMS Client Logging | Enables you to log to a file activity data for players connected over a unicast stream. |
| WMS IP Address Authorization | Enables you to specify content access permissions for specific IP addresses. |
| WMS NTFS ACL Authorization | Enables you to specify content access permissions for files and folders in an NTFS file system. |
| WMS Playlist Transform | Alters the behavior of playlist files. |
| WMS Publishing Points ACL Authorization | Enables you to specify content access permissions for specific users, servers, or groups, for either all publishing points or a specific publishing point. |
| WMS WMI Event Handler | Enables you to receive notification of all internal Windows Media server events through Windows Management Instrumentation (WMI). |
To create custom event handler plug-ins, see Creating Event Notification Plug-ins.
This method calls AddRef internally. To avoid memory leaks, you must call Release when you are finished using the interface.
Example Code
#include <windows.h>
#include "wmsserver.h"
// Declare variables and interfaces.
IWMSServer *pServer;
IWMSPlugins *pPlugins;
HRESULT hr;
// Initialize the COM library and retrieve a pointer
// to an IWMSServer interface.
hr = CoInitialize(NULL);
hr = CoCreateInstance(CLSID_WMSServer,
NULL,
CLSCTX_ALL,
IID_IWMSServer,
(void **)&pServer);
if (FAILED(hr)) goto EXIT;
// Retrieve a pointer to an IWMSPlugins interface
// containing event handler plug-ins.
hr = pServer->get_EventHandlers(&pPlugins);
if (FAILED(hr)) goto EXIT;
EXIT:
// TODO: Release temporary COM objects and uninitialize COM.
Requirements
Header: wmsserver.h.
Library: WMSServerTypeLib.dll.
Platform: Windows Server 2003 family, Windows Server 2008 family.
See Also
| Previous | Next |