IWMSServer.DefaultPath (Visual Basic .NET)

The DefaultPath property specifies and retrieves the default path name of the server.

Server.DefaultPath = String
String = Server.DefaultPath

Property Value

A BSTR containing the path name.

If this property fails, it returns an error number.

Number

Description

0x8007000E

There is insufficient memory to complete the function.

Example

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

Private Sub GetSetPath()

    ' Declare variables.
    Dim Server As WMSServer
    Dim strText As String

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

    ' Retrieve the default content path for the server.
    strText = Server.DefaultPath

    ' Set a new default path for the server.
    strText = "c:\asfroot\"
    Server.DefaultPath = strText

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)