SetFeatureString
Top  Previous  Next

Description

Sets the string value of the specified camera feature.


Syntax


[VB]
objActiveGeni.SetFeatureString Name, Value


[C/C++]
HRESULT SetFeatureString(bstr Name, bstr Value );


Data Types
[VB]

Name: String
Value
: String


Parameters
[C/C++]

Name [in]  
String specifying the name of the feature  
Value [out, retval]  
String value of the feature to be set  


Return Values


S_OK  
Success  
E_NOINTERFACE        
Feature does not exist or not available  
E_OUTOFMEMORY  
Value is not valid for the feature  
E_FAIL  
Failed to set the feature  
 

Example


This VB example uses a combo box to switch between different auto exposure modes:

Private Sub
 Form_Load()
Lst = ActiveGeni1.GetEnumList("ExposureAuto")
For
 i = 0 
To
 
UBound
(Lst)
Combo1.AddItem (Lst(i))
Next

Combo1.ListIndex = ActiveGeni1.GetFeature("ExposureAuto")
ActiveGeni1.Acquire = 
True
End Sub

Private Sub
 Combo1_Click()
ActiveGeni1.SetFeatureString Combo1.Text
End Sub
 

Remarks


Depending on the Type of the feature the Value argument has the following meaning:

Feature Type
Value
Integer
Integer value in form of string
Float
Floating point value in form of string
Boolean
"0" or "False", "1" or "True"
Enumerated
String value from the enumerated set
String
String value
Command
"1" or "Execute"


If the currently selected camera does not support the specified feature or if the value is not valid for the feature, the method will generate an error.