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 |
IWMSDiagnosticEvents.length (Visual Basic .NET)
The length property retrieves the number of IWMSDiagnosticEvent objects contained in the IWMSDiagnosticEvents collection.
Syntax
Integer = IWMSDiagnosticEvents.length
Property Value
Integer containing the number of IWMSDiagnosticEvent objects.
Remarks
The collection can contain a maximum of 100 IWMSDiagnosticEvent objects. When this limit is reached, the oldest object in the collection is replaced by the newest. Each IWMSDiagnosticEvent object that describes a unique server or publishing point limit is included only once in the collection, but the time and date are updated to reflect the most recent occurrence. For more information, see IWMSDiagnosticEvent.Time and IWMSDiagnosticEvent.NumberOfOccurrences.
This is the JScript version of the IWMSDiagnosticEvents.Count method. It is included for developers who are more comfortable with JScript syntax.
This property is read-only.
Example Code
Imports Microsoft.WindowsMediaServices.Interop
Imports System.Runtime.InteropServices
Private Sub GetCount()
' Declare variables.
Dim Server As WMSServer
Dim DiagnosticEvents As IWMSDiagnosticEvents
Dim iCount As Integer
Try
' Create the WMSServer object.
Server = New WMSServer()
' Retrieve the IWMSDiagnosticEvents object.
DiagnosticEvents = Server.DiagnosticEvents
' Retrieve the total count of events.
iCount = DiagnosticEvents.length
Catch excCom As COMException
' TODO: Handle COM exceptions.
Catch exc As Exception
' TODO: Handle errors.
Finally
' TODO: Clean-up code goes here.
End Try
End Sub
Requirements
Reference: Add a reference to Microsoft.WindowsMediaServices.
Namespace: Microsoft.WindowsMediaServices.Interop.
Assembly: Microsoft.WindowsMediaServices.dll.
Library: WMSServerTypeLib.dll.
Platform: Windows Server 2003 family, Windows Server 2008 family.
See Also
- IWMSDiagnosticEvent Object (Visual Basic .NET)
- IWMSDiagnosticEvent.NumberOfOccurrences (Visual Basic .NET)
- IWMSDiagnosticEvent.Time (Visual Basic .NET)
- IWMSDiagnosticEvents Object (Visual Basic .NET)
- IWMSDiagnosticEvents.Count (Visual Basic .NET)
| Previous | Next |