GetMemoryInfoStringSpaceHandles (statement)

Syntax GetMemoryInfoStringSpaceHandles used, free, total
Description This statement obtains information on the handle usage for string space.
Parameter Description
used Long. The number of handles that have been used.
free Long. The number of handles that are free.
total Long. The total number of handles (32736).
Example
Option Explicit
Sub OnMouseUp(x As Long, y As Long, flags As Long)
    Dim mymsg As String
    Dim used As Long, free As Long, total As Long, outFlags As Long
    Dim charCount
    Dim i
    Dim myarray(100) As String
    mymsg = ""
    mymsg = mymsg & Chr$(13) & "---- BEFORE ----"
    GetMemoryInfoStringSpace used, free, total, outflags
    mymsg = mymsg & Chr$(13) & "SPACE used:" & used & ", free:" & free & ", total:" & total
    mymsg = mymsg & ", outFlags:" & outFlags
    GetMemoryInfoStringSpaceHandles used, free, total 
    mymsg = mymsg & Chr$(13) & "HANDLES used:" & used & ", free:" & free & ", total:" & total
    ' Use up some string space and handles
    charCount = 0
    For i = LBound(myarray) To UBound(myarray) Step 1
        myarray(i) = "ABCDEFGHIJKLMNOPQRSTUVWXYZ " & i & " ABCDEFGHIJKLMNOPQRSTUVWXYZ "
        charCount = charCount + Len(myarray(i))
    Next i
    mymsg = mymsg & Chr$(13)
    mymsg = mymsg & Chr$(13) & "---- AFTER populating, elements:" & (UBound(myarray) - LBound(myarray)) _
        & " char count:" & charCount & " ----"
    GetMemoryInfoStringSpace used, free, total, outFlags
    mymsg = mymsg & Chr$(13) & "SPACE used:" & used & ", free:" & free & ", total:" & total
    mymsg = mymsg & ", outFlags:" & outFlags
    GetMemoryInfoStringSpaceHandles used, free, total 
    mymsg = mymsg & Chr$(13) & "HANDLES used:" & used & ", free:" & free & ", total:" & total
    MsgBox mymsg, ebOKOnly+ebInformation, "Memory Info"
End Sub
See Also GetMemoryInfoSymbolSpace (statement), GetMemoryInfoStringSpace (statement), GetMemoryInfoPublicSpace (statement)