GetFeatureRegister
Top  Previous  Next

Description

Returns the address of the virtual hardware register associated with the specified feature.

[C++]
int
 GetFeatureRegister(const char* feature, unsigned int* pAddr);

Parameters
[C/C++]

[in] const char* feature  
Name of the feature. Must be an existing feature of the integer, enumerated or boolean type.  
 
[out] unsigned int* pAddr  
Pointer to a variable that receives a 32-bit address of the register.  


Return Values


S_OK  
Success  
E_FAIL  
Failure  
E_NOINTERFACE  
Feature does not exist  
 

Example


This fragment of an MFC code displays the address and value of the register associated with the Gain feature:

   CString str;   
 unsigned int addr; int iVal  
   m_pCamera->GetFeatureRegister("Gain", &addr);  
   m_pCamera->ReadRegister(addr,&iVal)  
   str.Format(_T("Register address: %X \n Register value: %i"), addr, iVal);  
   SetDlgItemText(IDC_REGISTER_STATIC, str);  

Remarks

This method allows you to obtain the address the register associated with the feature. The address can be further used for a direct register access by calling ReadRegister and WriteRegister.