다음을 통해 공유


AddRootNode Method

Topic Last Modified: 2006-06-13

The AddRootNode method adds a node to the TreeView control using a URL to a top-level hierarchy in the Exchange store.

Applies To

EXTV Interface

Syntax

Function AddRootNode(    ByVal URL As String,
        ByVal displayname As String,
        ByVal [Expand As Boolean],
        ByVal [Username As String],
        ByVal [Password As String])
HRESULT AddRootNode
(
        BSTR URL,
        BSTR displayname,
        VARIANT_BOOL* Expand,
        BSTR* Username,
        BSTR* Password
);

Parameters

  • URL
    A URL to a public or private top-level hierarchy in the Exchange store. The Exchange store folder must be a virtual directory.

    Note

    Do not UTF-8 encode the URL for this method.

  • displayname
    A display name for a specific node; this name does not correspond to any Exchange store property.
  • Expand
    A TRUE value expands any child nodes when the node is selected.
  • Username
    A username if authentication is required.
  • Password
    A password if authentication is required.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

This method is typically used in the Microsoft® Visual Basic® form load event, so that the control is populated with one or more nodes at run time. Otherwise you add a root node based on a URL that is typed by the user.

Example

The following example adds a root node to the TreeView control.


Dim strURL, strDsp As String
strURL = InputBox("Enter root url:")
strDsp = InputBox("Enter display name:")
EXTV1.AddRootNode strURL, strDsp, True