Home > Language Reference > Classes > VFSVolume

FindFirstVolume Method

Finds the first available volume.

Syntax

Public Function FindFirstVolume() As Boolean

Remarks

The FindFirstVolume finds the first available volume. If at least one volume exists, it initializes the Reference, Label, FileSystem and MediaType properties with the attributes of the first volume found and returns the value True. You can then continue listing the volumes by repeatedly calling the FindNextVolume until the return value is False. If no volume is available, it returns the value False.

Calling this function is the only way to make sure that the handheld device and system support the expansion card management functions and that at least one volume is inserted. You should therefore use this function before any other operation.

The following example fills a list with the names of all the available volumes :

Private Sub Form_Load()
  Dim v as New VFSVolume
  Dim b as Boolean

  b = v.FindFirstVolume
  While b
    List1.AddItem v.Label, v.Reference
    b = v.FindNextVolume
  Wend
End Sub

See also Expansion cards and the VFSDemo sample.

System requirements

SystemMinimal versionRemarks
Palm OSPalm OS 3.0Requires an expansion slot.
Windows CEWindows CE 3.0-