GetFolderName method

This method is intended for use with Visual Basic.

Method
short GetFolderName(
short Index,
BSTR * pName )
Parameters
Index
Specifies the zero-based index of the name to be returned. It must be a number greater than or equal to zero and less than the value returned by GetNumFolders.
pName
Points to a BSTR to receive the name of the folder.
Description
The specified folder name is returned in pName.

GetFolderName or GetFolderNames can be used to retrieve the folder names. An application should use the one which is more convenient in its environment.

Return Value
Refer to return codes.
See Also:
GetNumFolders, GetFolderNames, and OpenFolder

Visual Basic

Dim rc, count As Integer
Dim num_folders As Variant
Dim Temp As String

 .
 .

rc = ArsOle.GetNumFolders (num_folders)
If rc <> ARS_OLE_RC_SUCCESS Then
    MsgBox "ERROR"
    End
End If

For count = 0 To num_folders -1
    rc = ArsOle.GetFolderName(count, Temp)
    lbFolders.AddItem Temp
Next count

 .
 .

' During OK button processing

rc = ArsOle.OpenFolder (lbFolders.List(lbFolders.ListItem))
If rc <> ARS_OLE_RC_SUCCESS Then
    MsgBox "ERROR"
    End
End If