Robert Shearman <[EMAIL PROTECTED]> writes:

> In the case of a string, the byte count does not include the string's
> terminating null character.
>
> Since WideCharToMultiByte returns the number of bytes written
> including the null terminator it is required to take one away from it,
> although the misleading *sizeof(CHAR) can be removed.

I meant the line above, where you use *lpdwBufferLength+1, this will
overflow the buffer. Note that since len doesn't include the
terminating NULL, converting len/sizeof(WCHAR) characters won't get
you a terminating NULL even with a larger dest buffer.

-- 
Alexandre Julliard
[EMAIL PROTECTED]

Reply via email to