On 11/13/20 6:11 PM, Daniel Lehman wrote:
else if (IUnknown_QueryInterface(V_UNKNOWN(&output), &IID_IStream, (void**)&stream) == S_OK)
{
BSTR str;
if (SUCCEEDED(hr = node_transform_node_params(&This->node, stylesheet, &str, NULL, NULL, TRUE)))
{
DWORD count;
hr = IStream_Write( stream, str, SysStringByteLen(str), &count );
SysFreeString(str);
}
IStream_Release(stream);
return hr;
}
What I meant is that it might be possible to pass stream directly, avoiding intermediate BSTR, like node_transform_node_params(&This->node, stylesheet, NULL, stream, NULL).