GetFeatureIntValue
Top  Previous  Next

Description

Returns the integer value of the specified feature.

[C++]
int
 GetFeatureIntValue(const char* feature, __int64* pValue);

Parameters
[C/C++]

[in] const char* feature  
Name of the feature. Must be an existing feature of the integer, enumerated or boolean type.  
 
[out] __int64* pValue  
Pointer to a variable that receives the value of the feature.  


Return Values


S_OK  
Success  
E_FAIL  
Failure  
E_NOINTERFACE  
Feature does not exist  
E_INVALIDARG  
Wrong feature type  
 

Example


This fragment of an MFC code uses a feature-write callback to request and display the name and value of a feature after it has just been modified by a client application:

bool CGigemuDlg::onFeatureWrite(const char* feature)  
{  
   CString str; __int64 iVal;  
   m_pCamera->GetFeatureIntValue(feature, &iVal);  
   str.Format(_T("Feature: %S - %i"), feature, iVal);  
   SetDlgItemText(IDC_FEATURE_STATIC, str);  
   return false;  
}  
 

Remarks

Depending on the type of the feature the pValue argument has the following meaning:

Feature Type
Value
Integer
Integer value of the feature
Boolean
0 if False, 1 if True
Enumerated
Numerical value of a currently selected item


This method is typically used as part of a feature-read callback in order to obtain the new value of a feature after it has been modified by an external client application. See SetWriteCallback for more details.