GetConfiguration Method - neoVI API
int _stdcall icsneoGetConfiguration(int hObject, unsigned char *pData, int *plNumBytes);Public Declare Function icsneoGetConfiguration Lib "icsneo40.dll" (ByVal hObject As Int32, ByRef pData As Byte, ByRef lNumBytes As Int32) As Int32[DllImport("icsneo40.dll")]
public static extern Int32 icsneoGetConfiguration(Int32 hObject, ref byte pData, ref Int32 lNumBytes);Examples
unsigned char bConfigBytes[1024];
int iNumConfigBytes = 1024;
lResult = icsneoGetConfiguration(hObject, bConfigBytes, &iNumConfigBytes);
if (lResult == 0)
MessageBox(hWnd,TEXT("Problem Reading Configuration"),TEXT("neoVI Example"),0);
else
{
wsprintf(szOut,TEXT("HSCAN CNF1 = %x"),bConfigBytes[NEO_CFG_MPIC_HS_CAN_CNF1]);
MessageBox(hWnd,szOut,TEXT("neoVI Example"),0);
} byte[] bConfigBytes = new byte[1024]; //Storage for Data Bytes from Device
int iNumBytes = 1204; //Storage for Number of Bytes
int lResult; //Storage for Result of Called Function
int Counter;
//Clear listbox
lstConfigInformation.Items.Clear();
//Call Get Configuration
lResult = icsNeoDll.icsneoGetConfiguration(m_hObject, ref bConfigBytes[0],ref iNumBytes);
//Fill ListBox with Data From function Call
for(Counter=0;Counter<1024;Counter++)
{
lstConfigInformation.Items.Add("Byte Number-" + Counter + " Byte Data-" + bConfigBytes[Counter]);
}Last updated