SetFeatureAccess
Top  Previous  Next

Description

Sets the access mode for the specified feature.

[C++]
int
 SetFeatureAccess(const char* feature, unsigned int access);


Parameters
[C/C++]
 
[in] const char* feature  
Name of the feature to assign the description to.  
 
[in] unsigned int access  
Integer value specifying the access mode:  
FEATURE_ACCESS_RO - feature will be accessible in the read-only mode.  
FEATURE_ACCESS_WO - feature will be accessible in the write-only mode.  
FEATURE_ACCESS_RW - feature will be accessible for reading and writing.  
 

Return Values


S_OK  
Success  
E_FAIL  
Failure  
E_NOINTERFACE  
Feature does not exist  
 
 
Example

This fragment of code instantiates a camera object, creates an integer feature and sets the read-only access mode:

static CGevCamera* m_pCamera;  
m_pCamera = createCamera();  
 
m_pCamera->CreateFeature(FEATURE_TYPE_FLOAT, "Temperature", "Analog");  
m_pCamera->SetFeatureAccess("Temperature", FEATURE_ACCESS_RO);  
 

Remarks


Note that the camera must be in the disconnected state in order for this method to work.