diff --git a/dlls/oleaut32/tests/tmarshal.c b/dlls/oleaut32/tests/tmarshal.c index b491e53291e..cb626d367db 100644 --- a/dlls/oleaut32/tests/tmarshal.c +++ b/dlls/oleaut32/tests/tmarshal.c @@ -1118,7 +1118,7 @@ static void test_typelibmarshal(void) VariantClear(&varresult); /* call get_Name (direct) */ - bstr = NULL; + bstr = (void *)0xdeadbeef; hr = IWidget_get_Name(pWidget, &bstr); ok_ole_success(hr, IWidget_get_Name); ok(!lstrcmpW(bstr, szCat), "IWidget_get_Name should have returned string \"Cat\" instead of %s\n", wine_dbgstr_w(bstr)); diff --git a/dlls/oleaut32/tmarshal.c b/dlls/oleaut32/tmarshal.c index 44a6d44eea2..b69634fff24 100644 --- a/dlls/oleaut32/tmarshal.c +++ b/dlls/oleaut32/tmarshal.c @@ -723,7 +723,7 @@ serialize_param( return S_OK; } case VT_BSTR: { - if (debugout) { + if (writeit && debugout) { if (*arg) TRACE_(olerelay)("%s",relaystr((WCHAR*)*arg)); else @@ -1402,11 +1402,20 @@ xCall(LPVOID retptr, int method, TMProxyImpl *tpinfo /*, args */) TRACE_(olerelay)("%s=",relaystr(names[i+1])); } /* No need to marshal other data than FIN and any VT_PTR. */ - if (!is_in_elem(elem) && (elem->tdesc.vt != VT_PTR)) { - xargs+=_argsize(&elem->tdesc, tinfo); - if (relaydeb) TRACE_(olerelay)("[out]"); - continue; - } + if (!is_in_elem(elem)) + { + if (elem->tdesc.vt != VT_PTR) + { + xargs+=_argsize(&elem->tdesc, tinfo); + if (relaydeb) TRACE_(olerelay)("[out]"); + continue; + } + else + { + memset( *(void **)xargs, 0, _xsize( elem->tdesc.u.lptdesc, tinfo ) ); + } + } + hres = serialize_param( tinfo, is_in_elem(elem),