Windows Media Services SDK banner art
PreviousNext

Streams.Open Method

Opens a Stream object.

Syntax

NSChannelMgr.Streams.Open( StreamSource, Alias, PeerAccess )

Parameters

StreamSource

A String value specifying the name of the stream source to be opened.

Alias

A String value specifying the alias for the name of a stream source to be opened. This can be an .asf file distributed via the MMS or HTTP protocols, or a stream from an encoder distributed via the MSBD protocol.

PeerAccess

The peer access of the stream. The values can be combined.

Value Mnemonic Description
1 MCM_PA_READ Read
2 MCM_PA_WRITE Write
4 MCM_PA_DELETE Delete
7 MCM_PA_ALL_ACCESS All

Example

NSChannelMgr.Connect "LocalHost"
MCM.Channels.Open( "MyStation", MCM_PA_ALL_ACCESS )
Dim MyStream
' Open stream "Welcome" with read access
Set MyStream = MCM.Streams.Open ("mms://nsserver/welcome.asf", _
               "Welcome", MCM_PA_READ)
MyStation.SetActiveStream MyStream

Return Values

Returns a Stream object.

Remarks

The peer access determines what permissions other administrative clients have. For example, opening a stream with delete access allows other clients to delete the stream.

You must use the Set statement to open a stream.

See Also

Streams Collection Object, Streams.Find

PreviousNext


© 1996-1999 Microsoft Corporation. All rights reserved.