OS/2 codes: Get an error message from an OS/2 error code
Sometimes, it is needed to get an error message from an error code. In C, strerror() does it. Of course, there are OS/2 APIs for this. It is DosGetMessage(). However, this is a general function not only for an error message. So let's introduce a special function to get an error message using DosGetMessage().
dosgeterrormessage.c
dosgeterrormessage.h
What DosGetErrorMessage() does is simple. It gets an error message from OSO001.MSG with DosGetMessage(). And replaces CR/LF to LF. Finally removes LF right before EOF.
dosgeterrormessage.c
dosgeterrormessage.h
What DosGetErrorMessage() does is simple. It gets an error message from OSO001.MSG with DosGetMessage(). And replaces CR/LF to LF. Finally removes LF right before EOF.
댓글
댓글 쓰기