I followed the idea from 440bx and searched the complete FPC 3.0.4 sources for "InOutRes" (679 matches) and "HInOutRes" (18 matches). First I only looked at matches, where a constant value is assigned. Here is my yield:
- error 1 occurs on many OS (amicommon, atari, MacOS, netware, netwlibc) and means something like "Function not supported"
- error 8 occurs on atari for 'errno' of -37 and -39 (meaning unknown) in fpc\3.0.4\source\rtl\atari\system.pp lines 133+134
- error 9 occurs on atari for 'errno' of -40 (meaning unknown) in fpc\3.0.4\source\rtl\atari\system.pp line 135
- error 18 occurs on amicommon and means "ERROR_NO_MORE_ENTRIES" (probably FindFirst/FindNext) in fpc\3.0.4\source\rtl\amicommon\sysos.inc line 79 which gives a meaning conflict to error 18 in reply #3
- error 20 occurs on MacOS when you pass a file instead of a directory to rmdir() and means "Not a directory" in fpc\3.0.4\source\rtl\macos\sysdir.inc line 57
- error 217 occurs on many OS (aix, beos, bsd, haiku, MacOS, Nintendo, netware, netwlibc, solaris) when the OS returns ESysENOMEM/Sys_ENOMEM or ESysEFAULT/Sys_EFAULT. The 1st means "Not enough Memory", the 2nd means on MacOS "Illegal filename", other OS write "Bad address". I wonder why they all are put together to 217, because they are very different. I found no common meaning for them. It makes no sense to return an error code where the meaning is not clear :-(
I spent a couple of hours to create that list and I'm not satisfied because I dont't have a (clear) meaning for errors 8, 9 and 217. Beside this there are about 70 matches, where InOutRes is assigned a value from a variable. For me it's to hard to dive more deaper.
I will create a message function with the error codes I got so far. And in the case, that I stumble in the future across an unknown error code, I will investigate that then.
If someone has informations about above error codes 8, 9, 217 (or others) please write it here.
Thanks a lot to all who helped me.