Applies To
General information function
Purpose
Returns the error description for an error number.
Syntax
DioGetErrorString (nError, pszError, nCount)
Parameters
Name |
Type |
Comments |
nError |
SHORT |
Error number, pnStatus, as returned from other DIO functions. |
pszError |
LPSTr |
Error buffer |
nCount |
SHORT |
Maximum length of error buffer. The buffer minimum length must be 128. |
Comments
Appendix B contains error codes and returned strings.
The nError number is returned in pnStatus when a function is called.
Example
The following example prints the error string if the DioSetupInitialization function failed:
CHAR szError[128];
DioSetupInitialization (0, 1, 0x0200, &nDensity, &nBanks, &nMasterHandle, &nStatus);
if (nStatus<0);
{ DioGetErrorString(nStatus, szError, sizeof (szError));
printf(szError);
return;
}