GetFeature
Top  Previous  Next

Description

Returns the numerical value of the specified camera feature.


Syntax


[VB]
Value=objActiveGeni.GetFeature( Name )


[C/C++]
HRESULT GetFeature(bstr Name, float* pValue );


Data Types
[VB]

Name: String
Return value
: Single


Parameters
[C/C++]

Name [in]  
String specifying the name of the feature  
pValue [out, retval]  
Pointer to the numerical value of the feature  


Return Values


S_OK  
Success  
E_NOINTERFACE        
Feature does not exist or not available  
E_FAIL  
Failed to read the feature  
 

Example


The following VB example demonstrates the use of a scroll control for real-time adjustment of the "GainRaw" feature.

Private Sub
 Form_Load()

ActiveGeni1.Acquire=
True

HScroll1.Value = ActiveGeni1.GetFeature("GainRaw")
HScroll1.Min = ActiveGeni1.GetFeatureMin("GainRaw")
HScroll1.Max = ActiveGeni1.GetFeatureMax("GainRaw")
End Sub


Private Sub
 HScroll1_Scroll()

ActiveGeni1.SetFeature("GainRaw", HScroll1.Value)

End Sub

 

Remarks


Depending on the Type of the feature GetFeature will return the following values:

Feature Type
Return value
Integer
Integer value converted to floating point
Float
Floating point value
Boolean
0 if False, 1 if True
Enumerated
Ordinal number in the enumeration list
String
Zero value
Command
Zero value


If the currently selected camera does not support the specified feature, the method will generate an error.

To retrieve the string value of a feature, use GetFeatureString.