0 On success, the error message is in the character array pointed to by buf. The array is buflen characters long and should have space for the error message and the terminating null character.