VarBstrCat function oleaut32
Concatenates two variants of type BSTR and returns the resulting BSTR.
Throws a WindowsException on failure.
To learn more, see learn.microsoft.com/windows/win32/api/oleauto/nf-oleauto-varbstrcat.
Implementation
BSTR VarBstrCat(BSTR bstrLeft, BSTR bstrRight) {
final pbstrResult = adaptiveCalloc<Pointer<Utf16>>();
final hr$ = HRESULT(_VarBstrCat(bstrLeft, bstrRight, pbstrResult));
if (hr$.isError) {
free(pbstrResult);
throw WindowsException(hr$);
}
final result$ = pbstrResult.value;
free(pbstrResult);
return .new(result$);
}