ReadRegister
Top  Previous  Next

Description

Returns the value of the specified virtual camera register.

[C++]
int
 ReadRegister(unsigned int addr, unsigned int* pValue);

Parameters
[C/C++]
 
[in] unsigned int* addr  
Address of the register to read.  
 
[out] unsigned int* pAddr  
Pointer to a variable that receives the value of the register.  


Return Values

S_OK  
Success  
E_FAIL  
Failure  
E_NOINTERFACE  
Register 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 read the value of the virtual camera register. To obtain the address of the register associated with a specific feature, use GetFeatureRegister.