Nikolay Sivov (@nsivov) commented about dlls/combase/usrmarshal.c:
+ wire = ALIGNED_POINTER(buf, 7); + if (LOWORD(*flags) == MSHCTX_INPROC) + { + *str = wire->hstring.str; + TRACE("str=%s\n", debugstr_hstring(*str)); + buf = (BYTE *)(&wire->hstring.str + 1); + } + else + { + UINT32 len; + HRESULT hr; + + len = wire->buf.size/sizeof(WCHAR); + hr = WindowsCreateString(wire->buf.data, len, str); + if (FAILED(hr)) + RpcRaiseException(HRESULT_CODE(hr)); What we do in other place is already inconsistent, but I think it makes sense to return RPC_S_OUT_OF_MEMORY on any failure. Unless there is an easy way to verify manually, like calling with null out argument.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/8703#note_112314