sparckis,
I don't know if there is a document that contains all of these error codes. However you can obtain a list of the error codes by doing something like this:
int i=0;
char errorString[20000];
for ( i=-400000; i<400000; i++ ) {
DAQmxGetErrorString (i, errorString, 20000);
if ( strstr( errorString, "Explanation could not be found for the requested status code.") == 0 )
printf ("%d,\"%s\"\n",i,errorString);
}
I think it is pretty safe to assume that error messages will be shorter than 20,000 characters. I think it is also worth noting that there is no maximum size of error message enforced, so if a longer error message is added in a future version of NI-DAQmx than basing your static array on the size of only these strings may be an issue. It should be okay to make an estimate from these strings, but I would still provide some padding. Note that the function will still return successfully if the entire error message cannot be placed in the string. The error message will just be truncated to the length of the string that you passed to the function.
I also think it is worth noting that the the DAQmxGetExtendedErrorInfo doesn't have a maximum length of string that it returns since the string is based on the parameters of the application and varies. For example if you use long channel or device names the length of the strings it returns will grow for many error conditions.
I have attached a file containing the error messages obtained using the method above.
Regards,
Neil S.