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.

댓글

이 블로그의 인기 게시물

토렌트: < 왕좌의 게임 > 시즌 1 ~ 시즌 8 완결편 마그넷

토렌트: < 스타워즈 > Ep.1 ~ Ep.6 마그넷

토렌트: NGC < 코스모스 > 우리말 더빙 전편(1편~13편) 마그넷