GetFeatureIntRange
Top  Previous  Next

Description

Returns the minimum, maximum and increment attributes of the specified feature.

[C++]
int
 GetFeatureIntRange(const char* feature, __int64* pMin, __int64* pMax, int* pInc);


Parameters
[C/C++]
 
[in] const char* feature  
Name of the feature to assign the attributes to. Must be an existing feature of the integer or floating point type.  
 
[in] __int64* pMin  
Pointer ot a value that receives the feature's minimum.  
 
[in] __int64* pMax  
Pointer to a value that receives the feature's maximum.  
 
[in] __int* pInc  
Pointer to a value that receives the feature's increment.  
 
 

Return Values


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

This fragment of code instantiates a camera object, creates an integer feature, sets up its range and verifies the values of the minimum, maximum and increment:

static CGevCamera* m_pCamera; __int64 Min, Max; int Inc;   
m_pCamera = createCamera();  
 
m_pCamera->CreateFeature(FEATURE_TYPE_INTEGER, "TestFeatureInt", "Root", FEATURE_ACCESS_RW);  
m_pCamera->SetFeatureRange("TestFeatureInt", 0, 1000, 5);  
m_pCamera->SetFeatureIntValue("TestFeatureInt", 500);  
m_pCamera->GetFeatureIntRange("TestFeatureInt", &min, &max, &inc);  
 

Remarks


This method will work only if SetFeatureRange or SetFeatureIntRange was previously called for the specified feature.