GetFileAccessMode
Top  Previous  Next

Description

Returns the access mode in which the specified file can be opened in the device.


Syntax


[VB]
Value=objActiveGige.GetFileAccessMode ( Name ) 


[C/C++]
HRESULT GetFileAccessMode( bstr Name, bstr pValue );


Data Types
[VB]

Name: String
Return value
: String


Parameters
[C/C++]

Name [in]  
String specifying the name of the file in the device  
pValue [out, retval]  
Pointer to the string representing the access mode to the file in the currently selected device:  
"WO" - file has the write-only access  
"RO" - file has the read-only access  
"RW" - file has both read and write access  


Return Values


S_OK  
Success  
E_NOINTERFACE        
File with the specified name does not exist in the device  
E_FAIL  
Failure  
 

Example


This VB example displays the access mode of the file:

MsgBox GetFileAccessMode("UserSet1")
 

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 whether the file can be accessed for Reading, Writing, or for both operations.