Sample code for 30+ languages & platforms
Visual Basic 6.0 Requires Chilkat v11.0.0+

Transition from Imap.ListSubscribed to Imap.MbxList

Provides instructions for replacing deprecated ListSubscribed method calls with MbxList.

Chilkat Visual Basic 6.0 Downloads

Visual Basic 6.0
Dim success As Long
success = 0

Dim imap As New ChilkatImap

'  ...
'  ...

Dim reference As String
reference = ""
Dim mbxPattern As String
mbxPattern = "*"

'  ------------------------------------------------------------------------
'  The ListSubscribed method is deprecated:

'  Lists only subscribed mailboxes.
Dim mboxesObj As Mailboxes
Set mboxesObj = imap.ListSubscribed(reference,mbxPattern)
If (imap.LastMethodSuccess = 0) Then
    Debug.Print imap.LastErrorText
    Exit Sub
End If

'  ...
'  ...

'  ------------------------------------------------------------------------
'  Do the equivalent using MbxList.
'  Your application creates a new, empty Mailboxes object which is passed 
'  in the last argument and filled upon success.

'  Lists only subscribed mailboxes.
Dim subscribed As Long
subscribed = 1

Dim mboxes As New Mailboxes
success = imap.MbxList(subscribed,reference,mbxPattern,mboxes)
If (success = 0) Then
    Debug.Print imap.LastErrorText
    Exit Sub
End If