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 a name of the 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 msdb: protocol.

PeerAccess

The peer access of the stream. The values may 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 Welcome

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 open a stream by using the Set statement.

See Also

Streams collection, Stream objects, Streams.Find

© 1996-1998 Microsoft Corporation. All rights reserved.