GetFileList
Top  Previous  Next

Description

Returns the array of strings containing the names of all files in the device that can be accessed via the File Access functionality.


Syntax


[VB]
Value=objActiveUSB.GetFileList


[C/C++]
HRESULT GetFileList ( VARIANT* pFiles );


Data Types
[VB]

Return value: Variant (Array of strings)


Parameters
[C/C++]

pFiles [out,retval]  
Pointer to the SAFEARRAY of strings containing the list of files hosted in the camera. An empty array indicates that the File Access is not supported by the camera.  
 
 
Return Values

S_OK  
Success  
E_FAIL  
Failure.  


Example


This VB example initializes a combo box with the names of files hosted on the camera and displays the size of the selected file:

Private Sub
 Form_Load()
FileList = ActiveUSB1.GetFileList
For
 i = 0 
To
 UBound(FileList)
Combo1.AddItem (FileList(i))
Next
End Sub

Private Sub
 Combo1_Click()
FileName=Combo1.Text
Label1.Caption = ActiveUSB1.GetFileSize (FileName)
End Sub


Remarks


The File Access functionality allows an application to read and write files hosted on the device. The data in those files may contain look-up tables, configuration sets, firmware, and other information.

This method lets you determine if the device hosts any files and retrieve their names.