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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
25 deletions
+26
-25
typelib.c
dlls/oleaut32/typelib.c
+26
-25
No files found.
dlls/oleaut32/typelib.c
View file @
7dc54af3
...
@@ -4862,46 +4862,47 @@ static HRESULT typedescvt_to_variantvt(ITypeInfo *tinfo, TYPEDESC *tdesc, VARTYP
...
@@ -4862,46 +4862,47 @@ static HRESULT typedescvt_to_variantvt(ITypeInfo *tinfo, TYPEDESC *tdesc, VARTYP
HRESULT
WINAPI
HRESULT
WINAPI
DispCallFunc
(
DispCallFunc
(
void
*
pvInstance
,
ULONG
oVft
,
CALLCONV
cc
,
VARTYPE
vtReturn
,
UINT
cActuals
,
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
;
int
i
,
argsize
,
argspos
;
DWORD
*
args
;
DWORD
*
args
;
HRESULT
hres
;
HRESULT
hres
;
TRACE
(
"(%p, %ld, %d, %d, %d, %p, %p, %p (vt=%d))
\n
"
,
TRACE
(
"(%p, %ld, %d, %d, %d, %p, %p, %p (vt=%d))
\n
"
,
pvInstance
,
oVft
,
cc
,
vtReturn
,
cActuals
,
prgvt
,
prgpvarg
,
pvargResult
,
V_VT
(
pvargResult
)
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 */
/* 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
;
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
]);
TRACE
(
"arg %d: type %d, size %d
\n
"
,
i
,
prgvt
[
i
],
_argsize
(
prgvt
[
i
]));
argsize
+=
_argsize
(
prgvt
[
i
]);
dump_Variant
(
prgpvarg
[
i
]);
argsize
+=
_argsize
(
prgvt
[
i
]);
}
}
args
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
DWORD
)
*
argsize
);
args
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
DWORD
)
*
argsize
);
args
[
0
]
=
(
DWORD
)
pvInstance
;
/* this is the fake IDispatch interface pointer */
args
[
0
]
=
(
DWORD
)
pvInstance
;
/* this is the fake IDispatch interface pointer */
argspos
=
1
;
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
]);
argspos
+=
_argsize
(
prgvt
[
i
]);
}
if
(
pvargResult
!=
NULL
&&
V_VT
(
pvargResult
)
==
VT_EMPTY
)
{
{
_invoke
((
*
(
FARPROC
**
)
pvInstance
)[
oVft
/
4
],
cc
,
argsize
,
args
);
VARIANT
*
arg
=
prgpvarg
[
i
];
hres
=
S_OK
;
TRACE
(
"Storing arg %d (%d as %d)
\n
"
,
i
,
V_VT
(
arg
),
prgvt
[
i
]);
memcpy
(
&
args
[
argspos
],
&
V_NONE
(
arg
),
_argsize
(
prgvt
[
i
])
*
sizeof
(
DWORD
));
argspos
+=
_argsize
(
prgvt
[
i
]);
}
}
else
hres
=
_invoke
((
*
(
FARPROC
**
)
pvInstance
)[
oVft
/
sizeof
(
void
*
)],
cc
,
argsize
,
args
);
if
(
pvargResult
&&
(
vtReturn
!=
VT_EMPTY
))
{
{
FIXME
(
"Do not know how to handle pvargResult %p. Expect crash ...
\n
"
,
pvargResult
);
TRACE
(
"Method returned 0x%08lx
\n
"
,
hres
);
hres
=
_invoke
((
*
(
FARPROC
**
)
pvInstance
)[
oVft
/
4
],
cc
,
argsize
,
args
)
;
V_VT
(
pvargResult
)
=
vtReturn
;
FIXME
(
"Method returned %lx
\n
"
,
hres
)
;
V_UI4
(
pvargResult
)
=
hres
;
}
}
HeapFree
(
GetProcessHeap
(),
0
,
args
);
HeapFree
(
GetProcessHeap
(),
0
,
args
);
return
hres
;
return
S_OK
;
}
}
static
HRESULT
WINAPI
ITypeInfo_fnInvoke
(
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