The ErrorMess() function call to the DLL is declared in C as
Int WINAPI ErrorMess(LPINT errorcode, LPSTR errortext)
And is use to obtain in errortext the text string corresponding to the error code pointed to by errorcode.
Note that the buffer pointed to by errortext must be declared as at least 36 bytes (ie char errortext[36]) to received the error messages.
More: