docs

Home All functions Categories

vuGetDriveList(pOutBuffer, cchBuffer)

vuGetDriveList(LONG,LONG), LONG

Description

Retrieves a list of available drive roots and writes the result into the caller-provided buffer.
Use this for a quick, human-readable list of drives suitable for display.

Parameters

Parameter Data Type Description
pOutBuffer *STRING Address of a STRING buffer that receives the drive list text.
cchBuffer LONG Size of the output buffer in characters (use SIZE(BufferVar)).

Note: In vuFileTools V5, CSTRINGs are not limited to the size shown above. The number is for example only.

Returns

Example

ROUTINE:Test_VUGetDriveList   ROUTINE
  DATA
sDriveList     STRING(256)
nCount         LONG

  CODE

  CLEAR(sDriveList)

  nCount = vuGetDriveList(ADDRESS(sDriveList), SIZE(sDriveList))

  IF nCount > 0
    MESSAGE('Drives: ' & sDriveList, 'vuGetDriveList')
  ELSE
    MESSAGE('No drives returned or error.', 'vuGetDriveList Error', ICON:Exclamation)
  END

! End TestVUGetDriveList

Notes

Home All functions Categories