On Fri Mar 24 20:04:39 2023 +0000, Esme Povirk wrote:
This doesn't seem right to me. BSTR's aren't really NULL-terminated, the allocated length is the length of the string. The terminator is just there for compatibility. Also, I would probably have written a `bstrcat_realloc()` sort of function to deal with this (or even an sprintf wrapper but that's more complicated because of varags).
The idea of something like `bstrcat_realloc()` is probably a better idea, I hadn't considered that.
I'm not sure I follow on the issue of BSTR's not being NULL terminated, the values I'm passing in are all based on string length without the NULL terminator. `SysReAllocStringLen` allocates enough space for the passed in length and a NULL terminator.