IWMSNamedValues Object (Visual Basic .NET)
Previous | Next |
IWMSNamedValues Object (Visual Basic .NET)
The IWMSNamedValues object contains a collection of name-value pairs.
The IWMSNamedValues object exposes the following properties.
Property | Description |
Add | Adds an IWMSNamedValue object to the IWMSNamedValues collection. |
Count | Retrieves the number of name-value pairs contained in the IWMSNamedValues collection. |
Item | Specifies and retrieves a name-value pair from the IWMSNamedValues collection. |
length | Retrieves the number of name-value pairs contained in the IWMSNamedValues collection. This method is provided for JScript compatibility. |
Remove | Removes a name-value pair from the IWMSNamedValues collection. |
Example Code
The following example illustrates how to retrieve an IWMSNamedValues object.
Imports Microsoft.WindowsMediaServices.Interop Imports System.Runtime.InteropServices Private Sub RetrieveObj() ' Declare variables. Dim Server As WMSServer Dim NamedValues As IWMSNamedValues Dim NamedValue As IWMSNamedValue Try ' Create the WMSServer object. Server = New WMSServer() ' Retrieve the IWMSNamedValues object containing ' descriptive information about the server. NamedValues = Server.Properties 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
System and custom plug-ins contain default name-value pairs that can be accessed by simply indexing the name of the property you want to retrieve. For a list of the default values you can access, see Registering Plug-in Properties.
The following example illustrates how to retrieve some default configuration values from the WMS Digest Authentication plug-in.
Imports Microsoft.WindowsMediaServices.Interop Imports System.Runtime.InteropServices Private Sub GetConfigValues() ' Declare variables. Dim Server As WMSServer Dim Plugins As IWMSPlugins Dim Plugin As IWMSPlugin Dim Properties As IWMSNamedValues Dim WMSSystemPlugin As Integer Dim MMCMoniker As String Dim ASPMoniker As String Dim UnsupportedLoadTypes As Integer Dim Realm As String Dim Name As String Dim Description As String Dim Author As String Dim Copyright As String Try ' Create the WMSServer object. Server = New WMSServer() ' Retrieve the WMS Digest Authentication plug-in. Plugins = Server.Authenticators Plugin = Plugins.Item("WMS Digest Authentication") ' Retrieve the configuration properties specified ' for the plug-in. Properties = Plugin.Properties WMSSystemPlugin = Properties.Item("WMSSystemPlugin").Value MMCMoniker = Properties.Item("MMCMoniker").Value ASPMoniker = Properties.Item("ASPMoniker").Value UnsupportedLoadTypes = Properties.Item("UnsupportedLoadTypes").Value Realm = Properties.Item("Realm").Value Name = Properties.Item("Name").Value Description = Properties.Item("Description").Value Author = Properties.Item("Author").Value Copyright = Properties.Item("Copyright").Value 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
See Also
- IWMSNamedValue Object (Visual Basic .NET)
- IWMSPlugin Object (Visual Basic .NET)
- IWMSPublishingPoint Object (Visual Basic .NET)
- IWMSServer Object (Visual Basic .NET)
- Server Object Model (Visual Basic .NET)
Previous | Next |