GetFeatureStringValue
Top  Previous  Next

Description

Returns the string value of the specified feature.

[C++]
int
 GetFeatureStringValue(const char* feature, char* value, unsigned int dstSize);


Parameters
[C/C++]

[in] const char* feature  
Name of the feature. Must be an existing feature of the string or enumerated type.  
 
[out] const char* value  
Pointer to a buffer that receives the string value of the feature.  
 
[in] unsigned int dstSize  
Maximum size of the buffer to receive the string value.  


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 string feature after it has just been modified by a client application:

bool CGigemuDlg::onFeatureRead(const char* feature)  
{  
   CString str; int iVal;  
 char buf[256]  
   m_pCamera->GetFeatureStringValue(feature, buf, 256);  
   str.Format(_T("FeatureRead: %S - %s"), feature, buf);  
   SetDlgItemText(IDC_FEATURE_EDIT, str);  
   return false;  
}  
 

Remarks

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

Feature Type
Value
String
String value of the feature
Enumerated
String 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.