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
7dc54af3
Commit
7dc54af3
authored
Nov 09, 2005
by
Robert Shearman
Committed by
Alexandre Julliard
Nov 09, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Cleanup formating of DispCallFunc.
- Fix DispCallFunc for functions with return values. - Don't rely on _copy_arg as it is going away soon.
parent
ae542af5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
19 deletions
+20
-19
typelib.c
dlls/oleaut32/typelib.c
+20
-19
No files found.
dlls/oleaut32/typelib.c
View file @
7dc54af3
...
...
@@ -4862,19 +4862,22 @@ static HRESULT typedescvt_to_variantvt(ITypeInfo *tinfo, TYPEDESC *tdesc, VARTYP
HRESULT
WINAPI
DispCallFunc
(
void
*
pvInstance
,
ULONG
oVft
,
CALLCONV
cc
,
VARTYPE
vtReturn
,
UINT
cActuals
,
VARTYPE
*
prgvt
,
VARIANTARG
**
prgpvarg
,
VARIANT
*
pvargResult
)
{
VARTYPE
*
prgvt
,
VARIANTARG
**
prgpvarg
,
VARIANT
*
pvargResult
)
{
int
i
,
argsize
,
argspos
;
DWORD
*
args
;
HRESULT
hres
;
TRACE
(
"(%p, %ld, %d, %d, %d, %p, %p, %p (vt=%d))
\n
"
,
pvInstance
,
oVft
,
cc
,
vtReturn
,
cActuals
,
prgvt
,
prgpvarg
,
pvargResult
,
V_VT
(
pvargResult
)
);
/* DispCallFunc is only used to invoke methods belonging to an IDispatch-derived COM interface.
So we need to add a first parameter to the list of arguments, to supply the interface pointer */
pvInstance
,
oVft
,
cc
,
vtReturn
,
cActuals
,
prgvt
,
prgpvarg
,
pvargResult
,
V_VT
(
pvargResult
));
/* DispCallFunc is only used to invoke methods belonging to an
* IDispatch-derived COM interface. So we need to add a first parameter
* to the list of arguments, to supply the interface pointer */
argsize
=
1
;
for
(
i
=
0
;
i
<
cActuals
;
i
++
)
{
for
(
i
=
0
;
i
<
cActuals
;
i
++
)
{
TRACE
(
"arg %d: type %d, size %d
\n
"
,
i
,
prgvt
[
i
],
_argsize
(
prgvt
[
i
]));
dump_Variant
(
prgpvarg
[
i
]);
argsize
+=
_argsize
(
prgvt
[
i
]);
...
...
@@ -4882,26 +4885,24 @@ DispCallFunc(
args
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
DWORD
)
*
argsize
);
args
[
0
]
=
(
DWORD
)
pvInstance
;
/* this is the fake IDispatch interface pointer */
argspos
=
1
;
for
(
i
=
0
;
i
<
cActuals
;
i
++
)
{
for
(
i
=
0
;
i
<
cActuals
;
i
++
)
{
VARIANT
*
arg
=
prgpvarg
[
i
];
TRACE
(
"Storing arg %d (%d as %d)
\n
"
,
i
,
V_VT
(
arg
),
prgvt
[
i
]);
_copy_arg
(
NULL
,
NULL
,
&
args
[
argspos
],
arg
,
prgvt
[
i
]
);
memcpy
(
&
args
[
argspos
],
&
V_NONE
(
arg
),
_argsize
(
prgvt
[
i
])
*
sizeof
(
DWORD
)
);
argspos
+=
_argsize
(
prgvt
[
i
]);
}
if
(
pvargResult
!=
NULL
&&
V_VT
(
pvargResult
)
==
VT_EMPTY
)
hres
=
_invoke
((
*
(
FARPROC
**
)
pvInstance
)[
oVft
/
sizeof
(
void
*
)],
cc
,
argsize
,
args
);
if
(
pvargResult
&&
(
vtReturn
!=
VT_EMPTY
))
{
_invoke
((
*
(
FARPROC
**
)
pvInstance
)[
oVft
/
4
],
cc
,
argsize
,
args
);
hres
=
S_OK
;
}
else
{
FIXME
(
"Do not know how to handle pvargResult %p. Expect crash ...
\n
"
,
pvargResult
);
hres
=
_invoke
((
*
(
FARPROC
**
)
pvInstance
)[
oVft
/
4
],
cc
,
argsize
,
args
);
FIXME
(
"Method returned %lx
\n
"
,
hres
);
TRACE
(
"Method returned 0x%08lx
\n
"
,
hres
);
V_VT
(
pvargResult
)
=
vtReturn
;
V_UI4
(
pvargResult
)
=
hres
;
}
HeapFree
(
GetProcessHeap
(),
0
,
args
);
return
hres
;
return
S_OK
;
}
static
HRESULT
WINAPI
ITypeInfo_fnInvoke
(
...
...
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