SetFeatureIntValue
Top  Previous  Next

Description

Sets the integer value of the specified feature.

[C++]
int
 SetFeatureIntValue(const char* feature, __int64 value);


Parameters
[C/C++]

[in] const char* feature  
Name of the feature to assign the value to. Must be an existing feature of the integer, enumerated, boolean or command type.  
 
[in] __int64 value  
New value of the feature.  


Return Values


S_OK  
Success  
E_FAIL  
Failure  
E_NOINTERFACE  
Feature does not exist  
E_INVALIDARG  
Wrong feature type or value out of range  
 

Example


This fragment of code instantiates a camera object, creates a feature of the integer type and assigns a default value to it:

static CGevCamera* m_pCamera;  
m_pCamera = createCamera();  
 
m_pCamera->CreateFeature(FEATURE_TYPE_INTEGER, "Offset", "Root", FEATURE_ACCESS_RW);  
m_pCamera->SetFeatureRange("Offset", 0, 1000, 1);  
m_pCamera->SetFeatureIntValue("Offset", 512);  
 

Remarks

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

Feature Type
Value
Integer
Integer value to be set
Boolean
0 if False, 1 if True
Enumerated
Numerical value of the item to select
Command
Use non-zero value to execute


This method is typically used to assign a default value to a feature. It can also be used as part of a feature-read callback in order to modify the value of the feature before it gets transmitted to a client application. See SetReadCallback for more details.