Partager via


IWMSPlugin.SelectionOrder (Visual Basic .NET)

The SelectionOrder property specifies and retrieves a zero-based value that is used by the server to determine the order in which a plug-in will be selected for use.

Integer = Plugin.SelectionOrderPlugin.SelectionOrder = Integer

Property Value

Integer containing the selection order.

If this property fails, it returns an error number.

Number

Description

0x8007000E

There is insufficient memory to complete the function.

Remarks

The selection order is particularly important for authentication and cache proxy plug-ins. For cache proxy plug-ins, the selection order can be used to specify which plug-in should be used as the default plug-in to handle cache proxy requests that other plug-ins don't handle. For authentication plug-ins, the plug-in with the lowest selection order that uses an anonymous authentication scheme, such as the WMS Anonymous User Authentication plug-in, is used first. If anonymous authentication fails, the server will begin trying non-anonymous authentication plug-ins based on their selection order. For all other types of plug-ins in which more than one type of plug-in can be used to process a request, plug-ins are selected for use based on their selection-order value.

Example

Imports Microsoft.WindowsMediaServices.Interop
Imports System.Runtime.InteropServices

Private Sub GetSelectionOrder()

    ' Declare variables.
    Dim Server As WMSServer
    Dim Plugins As IWMSPlugins
    Dim Plugin As IWMSPlugin
    Dim iValue As Integer

Try
    ' Create the WMSServer object.
    Server = New WMSServer()

    ' Retrieve the IWMSPlugins object.
    Plugins = Server.Authenticators

    ' Retrieve information about each plug-in.
    For Each Plugin In Plugins
        ' Retrieve the selection order of this plug-in
        ' compared to other plug-ins in this collection.
        iValue = Plugin.SelectionOrder
    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

Reference

IWMSPlugin Object (Visual Basic .NET)

IWMSPlugin.SelectionOrder (Visual Basic .NET)