SetFeatureArray
Top  Previous  Next

Description

Sets an array of values associated with the specified camera feature.


Syntax


[VB]
Value=objActiveUSB.SetFeatureArray( Name, ElementSize, Buffer )


[C/C++]
HRESULT SetFeatureArray(bstr Name, short ElementSize, VARIANT* Data);


Data Types
[VB]

Name: String
ElementSize: Integer
Buffer: Variant (SAFEARRAY)


Parameters
[C/C++]

Name [in]  
String specifying the name of the feature  
ElementSize [in]  
A short value specifying the size of each element of the array, in bytes  
Data [out, retval]  
SAFEARRAY variant containing the values to be copied to the feature's buffer  


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 retrieves the camera LUT array and displays the value of the 16th element:

LUT=ActiveUSB1.GetFeatureArray("LUTValueAll",4)
Label.Caption=LUT(16)

 

Remarks


This method retrieves the content of buffers associated with features of the IRegister type. For more information refer to GenICam standard specifications.

Note that the size of an element in the binary buffer returned by an IRegister feature cannot be determined automatically. Therefore, the ElementSize parameter is not optional and must specify the size of each element of the array in bytes.