Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
f1ebd2d8
Commit
f1ebd2d8
authored
Mar 22, 2010
by
Huw Davies
Committed by
Alexandre Julliard
Mar 23, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dispex: Check whether the server function changes the type of the arguments.
parent
56e625b0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
1 deletion
+24
-1
marshal.c
dlls/dispex/tests/marshal.c
+0
-1
usrmarshal.c
dlls/dispex/usrmarshal.c
+24
-0
No files found.
dlls/dispex/tests/marshal.c
View file @
f1ebd2d8
...
...
@@ -405,7 +405,6 @@ static void test_dispex(void)
/* change one of the argument vts */
i
=
0xbeef
;
hr
=
IDispatchEx_InvokeEx
(
dispex
,
3
,
LOCALE_SYSTEM_DEFAULT
,
DISPATCH_METHOD
,
&
params
,
NULL
,
NULL
,
NULL
);
todo_wine
ok
(
hr
==
DISP_E_BADCALLEE
,
"got %08x
\n
"
,
hr
);
hr
=
IDispatchEx_InvokeEx
(
dispex
,
4
,
LOCALE_SYSTEM_DEFAULT
,
0xffff
,
&
params
,
NULL
,
NULL
,
NULL
);
...
...
dlls/dispex/usrmarshal.c
View file @
f1ebd2d8
...
...
@@ -118,6 +118,7 @@ HRESULT __RPC_STUB IDispatchEx_InvokeEx_Stub(IDispatchEx* This, DISPID id, LCID
{
HRESULT
hr
;
UINT
arg
;
VARTYPE
*
vt_list
=
NULL
;
TRACE
(
"(%p)->(%08x, %04x, %08x, %p, %p, %p, %p, %d, %p, %p)
\n
"
,
This
,
id
,
lcid
,
dwFlags
,
pdp
,
result
,
pei
,
pspCaller
,
byref_args
,
ref_idx
,
ref_arg
);
...
...
@@ -131,8 +132,30 @@ HRESULT __RPC_STUB IDispatchEx_InvokeEx_Stub(IDispatchEx* This, DISPID id, LCID
if
(
dwFlags
&
NULL_RESULT
)
result
=
NULL
;
if
(
dwFlags
&
NULL_EXCEPINFO
)
pei
=
NULL
;
/* Create an array of the original VTs to check that the function doesn't change
any on return. */
if
(
byref_args
)
{
vt_list
=
HeapAlloc
(
GetProcessHeap
(),
0
,
pdp
->
cArgs
*
sizeof
(
vt_list
[
0
]));
if
(
!
vt_list
)
return
E_OUTOFMEMORY
;
for
(
arg
=
0
;
arg
<
pdp
->
cArgs
;
arg
++
)
vt_list
[
arg
]
=
V_VT
(
pdp
->
rgvarg
+
arg
);
}
hr
=
IDispatchEx_InvokeEx
(
This
,
id
,
lcid
,
dwFlags
&
0xffff
,
pdp
,
result
,
pei
,
pspCaller
);
if
(
SUCCEEDED
(
hr
)
&&
byref_args
)
{
for
(
arg
=
0
;
arg
<
pdp
->
cArgs
;
arg
++
)
{
if
(
vt_list
[
arg
]
!=
V_VT
(
pdp
->
rgvarg
+
arg
))
{
hr
=
DISP_E_BADCALLEE
;
break
;
}
}
}
if
(
hr
==
DISP_E_EXCEPTION
)
{
if
(
pei
&&
pei
->
pfnDeferredFillIn
)
...
...
@@ -145,5 +168,6 @@ HRESULT __RPC_STUB IDispatchEx_InvokeEx_Stub(IDispatchEx* This, DISPID id, LCID
for
(
arg
=
0
;
arg
<
byref_args
;
arg
++
)
VariantInit
(
pdp
->
rgvarg
+
ref_idx
[
arg
]);
HeapFree
(
GetProcessHeap
(),
0
,
vt_list
);
return
hr
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment