IWMSServer.DefaultPluginLoadType (Visual Basic .NET)

The DefaultPluginLoadType property specifies and retrieves an enumeration value that indicates whether the server loads authentication, event notification, and authorization plug-ins as in-process or out-of-process objects.

IWMSServer.DefaultPluginLoadType = WMS_PLUGIN_LOAD_TYPE
WMS_PLUGIN_LOAD_TYPE = IWMSServer.DefaultPluginLoadType

Property Value

A member of a WMS_PLUGIN_LOAD_TYPE enumeration type. This must be one of the following values.

Value

Description

WMS_PLUGIN_LOAD_TYPE_UNSPECIFIED

The server determines whether to load the plug-in as an in-process or out-of-process object.

WMS_PLUGIN_LOAD_TYPE_IN_PROC

The plug-in is loaded as an in-process object.

WMS_PLUGIN_LOAD_TYPE_OUT_OF_PROC

The plug-in is loaded as an out-of-process object.

If this property fails, it returns an error number.

Number

Description

0x80070057

WMS_PLUGIN_LOAD_TYPE is an invalid argument.

Remarks

If this property is set to WMS_PLUGIN_LOAD_TYPE_UNSPECIFIED, the server loads plug-ins as in-process objects. However, if the UnsupportedLoadType property of a plug-in specifies that it cannot be loaded in-process, the plug-in will be loaded out-of-process.

Example

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

Private Sub GetSetLoadType()

    ' Declare variables.
    Dim Server As WMSServer
    Dim pltType As WMS_PLUGIN_LOAD_TYPE

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

    ' Retrieve the default plug-in load type.
    pltType = Server.DefaultPluginLoadType

    If pltType = WMS_PLUGIN_LOAD_TYPE.WMS_PLUGIN_LOAD_TYPE_UNSPECIFIED Then
        ' TODO: Handle unspecified load type.
    ElseIf pltType = WMS_PLUGIN_LOAD_TYPE.WMS_PLUGIN_LOAD_TYPE_IN_PROC Then
        ' TODO: Handle in-process load type.
    ElseIf pltType = WMS_PLUGIN_LOAD_TYPE.WMS_PLUGIN_LOAD_TYPE_OUT_OF_PROC Then
        ' TODO: Handle out-of-process load type.
    End If

    ' Set the default load type for plug-ins.
    Server.DefaultPluginLoadType = WMS_PLUGIN_LOAD_TYPE.WMS_PLUGIN_LOAD_TYPE_IN_PROC

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

IWMSServer Object (Visual Basic .NET)