IWMSDiagnosticEvent Object (C#)

The IWMSDiagnosticEvent object contains information about a specific event notice that you can use to diagnose problems that relate to the configuration of the server or the status of a plug-in.

The IWMSDiagnosticEvent object exposes the following properties.

Property

Description

AdditionalInfo

Retrieves the text message associated with the event notice.

ErrorCode

Retrieves the HRESULT return code associated with the event notice.

Name

Retrieves the name of the plug-in or server limit associated with the event notice.

NumberOfOccurrences

Retrieves the number of times the event notice has occurred

PublishingPointName

Retrieves the name of the publishing point that raised the event notice.

Time

Retrieves the date and time of the event notice.

Type

Retrieves an enumeration value indicating the type of the event notice.

Example

The following example illustrates how to retrieve an IWMSDiagnosticEvent object.

using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;

// Declare variables.
WMSServer                   Server;
IWMSDiagnosticEvents        DiagnosticEvents;
IWMSDiagnosticEvent         DiagnosticEvent;

try {
    // Create a new WMSServer object.
    Server = new WMSServerClass();

    // Retrieve the IWMSDiagnosticEvents object.
    DiagnosticEvents = Server.DiagnosticEvents;

    // Retrieve information about each diagnostic event.
    for (int i = 0; i < DiagnosticEvents.Count; i++)
    {
        DiagnosticEvent = DiagnosticEvents[i];
    }
}
catch (COMException comExc) {
    // TODO: Handle COM exceptions.
}
catch (Exception e) {
    // TODO: Handle exceptions.
}

See Also

Reference

IWMSPublishingPointLimits Object (C#)

IWMSServerLimits Object (C#)

Concepts

Server Object Model (C#)