Hans Leidekker : crypt32: GetUserName sets last error to ERROR_INSUFFICIENT_BUFFER if the buffer is too small .