IWMSPlaylist.UncueStream (Visual Basic .NET)

banner art

Previous Next

IWMSPlaylist.UncueStream (Visual Basic .NET)

The UncueStream method specifies that content previously prepared for streaming is uncued.

Syntax

  Playlist
  .UncueStream(
  
  pPlaylistEntry
  
  As IXMLDOMElement
  
  )

Parameters

  pPlaylistEntry

[in] IXMLDOMElement object containing a playlist entry object.

Return Values

If this method succeeds, it does not return a value. If this method it fails, it returns an error number.

Number Description
0xC00D14B7L pPlaylistEntry is not a media element.
0xC00D14B4L pPlaylistEntry is already playing.

Example Code

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

Private Sub UncuePlaylistEntry()

    ' Declare variables.
    Dim Server As WMSServer
    Dim Players As IWMSPlayers
    Dim Player As IWMSPlayer
    Dim Playlist As IWMSPlaylist
    Dim PlaylistEntry As MSXML.IXMLDOMElement
    Dim bVal As Boolean

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

    ' Retrieve the IWMSPlayers object.
    Players = Server.Players

    ' Retrieve information about each requested playlist.
    For Each Player In Players

        ' Retrieve the playlist requested by the client
        ' if one exists.
        Playlist = Player.RequestedPlaylist

        ' Retrieve information about the current playlist entry.
        PlaylistEntry = Playlist.CurrentPlaylistEntry

        ' Retrieve the next playlist entry.
        PlaylistEntry = Playlist.CallerEntry(PlaylistEntry)

        ' Retrieve information about each playlist entry.
        While Not PlaylistEntry Is Nothing

            ' Retrieve a Boolean value indicating whether this
            ' playlist entry is cued.
            bVal = Playlist.IsStreamCued(PlaylistEntry)

            ' Uncue playlist entry if it is cued.
            If bVal = True Then
                Playlist.UncueStream(PlaylistEntry)
            End If

            PlaylistEntry = Playlist.CallerEntry(PlaylistEntry)

        End While

    Next










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

Previous Next