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.
The SupportedProtocolName property retrieves the name of a specific protocol from a list of supported protocols.
String = AdminNetworkDataSourcePlugin.SupportedProtocolName(dwProtocolNum)
Property Value
A String containing the protocol name.
If this property fails, it throws an exception.
Number |
Description |
|---|---|
0x80070057 |
The dwProtocolNum parameter is 0 or 1, but neither the HTTP protocol nor the RTSP protocol are supported, or the dwProtocolNum parameter is not 0 or 1. |
Arguments
dwProtocolNum |
[in] Integer containing the index. |
Remarks
If you specify 0 for the dwProtocolNum parameter, the server returns HTTP if it is supported. If you specify 0 for the dwProtocolNum parameter, and HTTP is not supported but RTSP is, the server returns RTSP. If you specify 1 for the dwProtocolNum parameter, and RTSP is supported, the server returns RTSP. The server does not return HTTP if you specify 1 for the dwProtocolNum parameter.
Example
Imports Microsoft.WindowsMediaServices.Interop
Imports System.Runtime.InteropServices
Private Sub GetProtocolName()
' Declare variables.
Dim Server As WMSServer
Dim Plugin As IWMSPlugin
Dim AdminNetDataSrc As IWMSAdminNetworkDataSourcePlugin
Dim strProtocol As String
Try
' Create the WMSServer object.
Server = New WMSServer()
' Retrieve the plug-in to be configured.
Plugin = Server.DataSources.Item("WMS Network Data Source")
' Retrieve the custom interface of the plug-in.
AdminNetDataSrc = Plugin.CustomInterface
' Retrieve the name of the first supported protocol.
strProtocol = AdminNetDataSrc.SupportedProtocolName(0)
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.