GetErrorMessages Method - neoVI API
int _stdcall icsneoGetErrorMessages(void * hObject, int *pErrorMsgs, int *pNumberOfErrors);Public Declare Function icsneoGetErrorMessages Lib “icsneo40.dll” (ByVal hObject As IntPtr, ByRef pErrorMsgs As Int32, ByRef pNumberOfErrors As Int32) As Int32[DllImport(“icsneo40.dll”)] public static extern Int32 icsneoGetErrorMessages(IntPtr hObject, ref Int32 pErrorMsgs, ref Int32 pNumberOfErrors);Examples
int iErrors[599];
int lResult;
int lNumberOfErrors;
TCHAR szOut[200];
long lCount;
// Read the errors from the DLL
lResult = icsneoGetErrorMessages(hObject,iErrors,&lNumberOfErrors);
if (lResult == 0)
MessageBox(hWnd,TEXT("Problem Reading errors"),TEXT("neoVI Example"),0);
// dump the neoVI errors to the debug window
if(lNumberOfErrors > 0)
{
for(lCount=0;lCount <lNumberOfErrors; lCount++)
{
wsprintf(szOut,TEXT("Error %d\n"),iErrors[lCount]);
OutputDebugString(szOut);
}
}
else
OutputDebugString(TEXT("No Errors to report\n"));Last updated