Rob Shearman : oleaut32: A value of PARAMFLAG_FNONE for wParamFlags means that the parameter is also marshaled and unmarshaled in the PARAMFLAG_FOUT case .

Alexandre Julliard julliard at wine.codeweavers.com
Wed Feb 7 16:00:26 CST 2007


Module: wine
Branch: master
Commit: 0f45b2badfd46e7980cc85c84a8789bcb17e5759
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=0f45b2badfd46e7980cc85c84a8789bcb17e5759

Author: Rob Shearman <rob at codeweavers.com>
Date:   Wed Feb  7 19:19:26 2007 +0000

oleaut32: A value of PARAMFLAG_FNONE for wParamFlags means that the parameter is also marshaled and unmarshaled in the PARAMFLAG_FOUT case.

---

 dlls/oleaut32/tmarshal.c |   22 ++++++++++++++++------
 1 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/dlls/oleaut32/tmarshal.c b/dlls/oleaut32/tmarshal.c
index 6326212..d192d01 100644
--- a/dlls/oleaut32/tmarshal.c
+++ b/dlls/oleaut32/tmarshal.c
@@ -1255,6 +1255,16 @@ _get_funcdesc(
     }
 }
 
+static inline BOOL is_in_elem(const ELEMDESC *elem)
+{
+    return (elem->u.paramdesc.wParamFlags & PARAMFLAG_FIN || !elem->u.paramdesc.wParamFlags);
+}
+
+static inline BOOL is_out_elem(const ELEMDESC *elem)
+{
+    return (elem->u.paramdesc.wParamFlags & PARAMFLAG_FOUT || !elem->u.paramdesc.wParamFlags);
+}
+
 static DWORD
 xCall(LPVOID retptr, int method, TMProxyImpl *tpinfo /*, args */)
 {
@@ -1328,14 +1338,14 @@ xCall(LPVOID retptr, int method, TMProxy
 		TRACE_(olerelay)("%s=",relaystr(names[i+1]));
 	}
 	/* No need to marshal other data than FIN and any VT_PTR. */
-	if (!(elem->u.paramdesc.wParamFlags & PARAMFLAG_FIN || !elem->u.paramdesc.wParamFlags) && (elem->tdesc.vt != VT_PTR)) {
+	if (!is_in_elem(elem) && (elem->tdesc.vt != VT_PTR)) {
 	    xargs+=_argsize(elem->tdesc.vt);
 	    if (relaydeb) TRACE_(olerelay)("[out]");
 	    continue;
 	}
 	hres = serialize_param(
 	    tinfo,
-	    elem->u.paramdesc.wParamFlags & PARAMFLAG_FIN || !elem->u.paramdesc.wParamFlags,
+	    is_in_elem(elem),
 	    relaydeb,
 	    FALSE,
 	    &elem->tdesc,
@@ -1387,14 +1397,14 @@ xCall(LPVOID retptr, int method, TMProxy
 	    if (i+1<nrofnames && names[i+1]) TRACE_(olerelay)("%s=",relaystr(names[i+1]));
 	}
 	/* No need to marshal other data than FOUT and any VT_PTR */
-	if (!(elem->u.paramdesc.wParamFlags & PARAMFLAG_FOUT) && (elem->tdesc.vt != VT_PTR)) {
+	if (!is_out_elem(elem) && (elem->tdesc.vt != VT_PTR)) {
 	    xargs += _argsize(elem->tdesc.vt);
 	    if (relaydeb) TRACE_(olerelay)("[in]");
 	    continue;
 	}
 	hres = deserialize_param(
 	    tinfo,
-	    elem->u.paramdesc.wParamFlags & PARAMFLAG_FOUT,
+	    is_out_elem(elem),
 	    relaydeb,
 	    FALSE,
 	    &(elem->tdesc),
@@ -1945,7 +1955,7 @@ TMStubImpl_Invoke(
 
 	hres = deserialize_param(
 	   tinfo,
-	   elem->u.paramdesc.wParamFlags & PARAMFLAG_FIN || !elem->u.paramdesc.wParamFlags,
+	   is_in_elem(elem),
 	   FALSE,
 	   TRUE,
 	   &(elem->tdesc),
@@ -1991,7 +2001,7 @@ TMStubImpl_Invoke(
 	ELEMDESC	*elem = fdesc->lprgelemdescParam+i;
 	hres = serialize_param(
 	   tinfo,
-	   elem->u.paramdesc.wParamFlags & PARAMFLAG_FOUT,
+	   is_out_elem(elem),
 	   FALSE,
 	   TRUE,
 	   &elem->tdesc,




More information about the wine-cvs mailing list