Partager via


IWMSAdminArchiveSink Object (Visual Basic .NET)

You can use the IWMSAdminArchiveSink object to archive streamed content. This object is exposed by the WMS Archive Data Writer plug-in. The IWMSAdminArchiveSink object exposes the following properties and methods.

Property

Description

ActivePath

Retrieves the path to the content that is being archived.

AutoStart

Specifies and retrieves a Boolean value indicating whether archiving begins automatically when streaming begins.

AvailableDiskSpace

Retrieves the amount of remaining disk space that can be used for archiving.

Bandwidth

Retrieves the current bandwidth of the content being archived.

ElapsedTime

Retrieves the amount of time that the archiving process has been running.

IsRecording

Retrieves a Boolean value indicating whether the archiving process is running.

Path

Specifies and retrieves the template path to which content is being archived.

Method

Description

ExpandTemplate

Retrieves the expanded form of a tokenized template path.

StartRecord

Starts the archiving process.

StopRecord

Stops the archiving process.

Example

The following example illustrates how to retrieve an IWMSAdminArchiveSink object.

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

Private Sub RetrieveObj()

    ' Declare variables.
    Dim Server As WMSServer
    Dim BCPubPoint As IWMSBroadcastPublishingPoint
    Dim Plugin As IWMSPlugin
    Dim AdminArchiveSink As IWMSAdminArchiveSink

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

    ' Add a new broadcast publishing point.
    BCPubPoint = Server.PublishingPoints.Add("NewPubPoint", _
         WMS_PUBLISHING_POINT_CATEGORY.WMS_PUBLISHING_POINT_BROADCAST, _
         "c:\wmpub\wmroot\playlist.wsx")

    ' Retrieve the plug-in to be configured.
    Plugin = BCPubPoint.BroadcastDataSinks.Item( _
         "WMS Archive Data Writer")

    ' Retrieve the custom interface of the plug-in.
    AdminArchiveSink = Plugin.CustomInterface

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

Concepts

System Plug-ins (Visual Basic .NET)