IWMSDiagnosticEvent.ErrorCode (Visual Basic .NET)
Previous | Next |
IWMSDiagnosticEvent.ErrorCode (Visual Basic .NET)
The ErrorCode property retrieves the HRESULT return code associated with the event notice.
Syntax
Integer = IWMSDiagnosticEvent.ErrorCode
Property Value
Integer containing the HRESULT return code associated with the event notice.
Remarks
This property is read-only.
Example Code
Imports Microsoft.WindowsMediaServices.Interop Imports System.Runtime.InteropServices Private Sub GetErrorCode() ' Declare variables. Dim Server As WMSServer Dim DiagnosticEvents As IWMSDiagnosticEvents Dim DiagnosticEvent As IWMSDiagnosticEvent Dim iError As Integer Try ' Create the WMSServer object. Server = New WMSServer() ' Retrieve the IWMSDiagnosticEvents object. DiagnosticEvents = Server.DiagnosticEvents ' Retrieve information about each diagnostic event. For Each DiagnosticEvent In DiagnosticEvents ' Retrieve the event error code. iError = DiagnosticEvent.ErrorCode Next 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
Previous | Next |