Geterror – Measurement Computing Personal488 rev.3.0 User Manual
Page 88

Personal488 for Windows 95/98/Me/NT/2000
04-10-01
API Reference 6-20
GetError
Syntax
ErrorCodeT WINAPI GetError(DevHandleT devHandle, LPSTR
errText);
devHandle
refers to either the IEEE 488 interface or the external device that has the
associated error.
errText
is the string that will contain the error message. If
errText
is non-null, the
string must contain at least 247 bytes.
Returns
-1
if error
otherwise, it returns the error code number associated with the error for the specified device.
Bus States
None
Example
errnum = GetError(ieee,errText);
printf(“Error number:%d;%s \n”errnum,errText);
See Also
Error, GetErrorList, Status
The
GetError
command is user-called after another function returns an error indication. The device
handle sent to the function that returned the error indication is sent to
GetError
as its
devHandle
parameter.
GetError
finds the error associated with that device and returns the error code associated with
that error. If a non-null error text pointer is passed,
GetError
also fills in up to 247 bytes in the string.
The application must ensure that sufficient space is available.