Partager via


ScopeNamespace::GetNext method

The GetNext method returns the next child sibling node for a given scope node. Before calling this method, the caller must retrieve the first child node by calling the ScopeNamespace.GetChild method.

Syntax

ScopeNamespace.GetNext( _
  ByVal Node As Node _
) As Node

Parameters

Node

The scope node being queried.

Examples

On Error Resume Next
Dim objNode As MMC20.Node
' Retrieve the child of the root node.
' objRoot was previously set to Document.RootNode.
Set objNode = objScopeNS.GetChild(objRoot)
If (objNode Is Nothing) Then
    MsgBox ("There are no child nodes")
Else
    ' There is at least one child node.
    Dim objSib As MMC20.Node
    Set objSib = objNode
    Dim objNext As MMC20.Node
    Do While True
        ' Display the Name of the sibling Node object.
        MsgBox ("Sibling: " & objSib.Name)
        ' Set objNext to Nothing, as it will be tested
        ' after the call to GetNext.
        Set objNext = Nothing
        ' Retrieve the next sibling Node.
        Set objNext = objSNS.GetNext(objSib)
        If (objNext Is Nothing) Then
            ' Free objects.
            Set objSib = Nothing
            Set objNode = Nothing
            Exit Do ' No more siblings.
        Else
            Set objSib = objNext
        End If
    Loop
End If

Requirements

Minimum supported client
Windows Vista
Minimum supported server
Windows Server 2008
Header
Mmcobj.h
IDL
Mmcobj.idl
DLL
Mmcndmgr.dll
IID
IID_ScopeNamespace is defined as EBBB48DC-1A3B-4D86-B786-C21B28389012

See also

ScopeNamespace.GetChild

ScopeNamespace.GetParent