GetErrorMessages Method - intrepidcs API
C/C++ declare -
Parameters - Return
Value - Remarks - C/C++ example
This method reads the neoVI DLL error message queue.
int
icsneoGetErrorMessages(int hObject, int *pErrorMsgs, int
*pNumberOfErrors);
Parameters
hObject
[in] Specifies the driver object created with OpenNeoDevice.
pErrorMsgs
[out] This is the address of the first element of an array of
long variables of at least 600 elements. This array will be loaded with the
current error queue. The error queue will contain errors generated by all
threads, not just the current thread. You can get a text description of this error using GetErrorInfo.
pNumberOfErrors
[out] Specifies the number of errors copied into the
pErrorMsgs buffer. The maximum value will be 600.
Returns 1 if successful, 0 on failure.
The error queue will be reset after this method is called.
Example
int hObject = 0; // holds a handle to the neoVI object
int
iErrors[599];
int lResult;
int lNumberOfErrors;
wchar_t szOut[200];
long lCount;
// Read the errors from the DLL
lResult = icsneoGetErrorMessages(hObject,iErrors,&lNumberOfErrors);
// dump the neoVI errors to the debug
window
if(lNumberOfErrors > 0)
{
for(lCount = 0;lCount <lNumberOfErrors;
lCount++)
{
wsprintf(szOut, "Error %d\n",
iErrors[lCount]);
}
}
else
printf("No Errors to report\n");
intrepidcs API Documentation - (C) Copyright 1997-2020 Intrepid Control Systems, Inc. (www.intrepidcs.com) |
Last Updated : Tuesday, January 19, 2010