Microsoft DirectX 8.1 (C++)

Channels.AddNewAt

This topic applies to Windows XP Home Edition and Windows XP Professional only.

The AddNewAt property creates a new Channel object and adds it to this Channels object collection at the index specified.

Syntax

objChannels.AddNewAt(service As Object,
  strName As String,
  index As Long) As Channel

Parameters

service

[in]  Specifies a Service object to be associated with the new Channel object.

strName

[in]  Specifies the name for the Channel object.

index

[in]  Specifies the index in the collection where the object is to be added.

Error Codes

If the property fails, an error is raised and Err.Number is set to a value other than zero.

Return Values

This property returns a Channel object.

Example Code

' The new channel object is a service object named "21" 
' to be created as the 25th item in the collection.
objChannel = Channels(objService, "21", 24)

Remarks

This method is valid only for the collection of objects returned by ChannelLineup.Channels, which is an ordered collection.

See Also