office-gobmx/avmedia/source/win
Mike Kaganski a2c3ef6d81 Move BSTR wrapper to systools, and fix some wrong BSTR uses
BSTR is documented [1] to be prefixed by a 32-bit integer specifying
its length *in bytes* (not characters), so passing wchar_t* as BSTR
is wrong, and the length member of rtl_uString can't substitute the
proper BSTR length, since rtl_uString::length specifies length in
characters. Any code taking BSTR and using SysStringLen to get its
length would only get half of the passed OUString data.

In dbaccess/source/ui/dlg/adodatalinks.cxx, the abovementioned
error was implemented. OTOH, OLEVariant::getByteSequence() in
connectivity/source/drivers/ado/Aolevariant.cxx passed BSTR from
tagVARIANT to ctor of OLEString, which resulted in the BSTR being
freed in both dtors of OLEString and OLEVariant (the latter calls
VariantClear, which itself clears string when vtfield is VT_BSTR).

[1] https://docs.microsoft.com/en-us/previous-versions/windows/desktop/automat/bstr

Change-Id: Iedbd62b20133644258af3660616add7b63cac258
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131950
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-03-22 22:23:56 +01:00
..
avmediawin.component
framegrabber.cxx Move BSTR wrapper to systools, and fix some wrong BSTR uses 2022-03-22 22:23:56 +01:00
framegrabber.hxx
interface.hxx
manager.cxx
manager.hxx
player.cxx Simplify CoCreateInstance / CoGetClassObject with COMReference 2022-03-22 09:01:58 +01:00
player.hxx
wincommon.hxx
window.cxx
window.hxx