GetConfiguration Method - neoVI API

This method reads the configuration from the hardware device. Note: This function is only to be used for neoVI Blue and ValueCAN. For neoVI Fire and neoVI Red use the GetFireSettings method. For ValueCAN3 use the GetVCAN3Settings method.

int _stdcall icsneoGetConfiguration(int hObject, unsigned char *pData, int *plNumBytes);

Parameters

hObject

[in] Specifies the driver object created with the OpenNeoDevice method.

pData

[out] Pointer to an array of 1024 bytes. Each index of the array corresponds to a configuration value. For a list of configuration values to change, please see the Configuration Array topic.

plNumBytes

[out] This will return the number of bytes written to the array. For the current version of the API this will be 1024 bytes.

Return Values

Returns 1 if successful, 0 if an error occurred. GetLastAPIError must be called to obtain the specific error. The errors that can be generated by this function are:

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75

Remarks

None.

Examples

Displays the Value of CNF1 of ValueCAN/neoVI HSCAN

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);
} 

Last updated