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
150cd5a7
Commit
150cd5a7
authored
Apr 17, 2003
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid local WINAPI function pointers in _invoke.
parent
468494cb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
49 deletions
+29
-49
tmarshal.c
dlls/oleaut32/tmarshal.c
+1
-1
typelib.c
dlls/oleaut32/typelib.c
+27
-47
typelib.h
dlls/oleaut32/typelib.h
+1
-1
No files found.
dlls/oleaut32/tmarshal.c
View file @
150cd5a7
...
...
@@ -1581,7 +1581,7 @@ TMStubImpl_Invoke(
return
hres
;
}
res
=
_invoke
(
(
*
((
LPVOID
**
)
args
[
0
]))[
fdesc
->
oVft
/
4
],
(
*
((
FARPROC
**
)
args
[
0
]))[
fdesc
->
oVft
/
4
],
fdesc
->
callconv
,
(
xargs
-
args
),
args
...
...
dlls/oleaut32/typelib.c
View file @
150cd5a7
...
...
@@ -4122,70 +4122,50 @@ static HRESULT WINAPI ITypeInfo_fnGetIDsOfNames( ITypeInfo2 *iface,
* interface described by the type description.
*/
DWORD
_invoke
(
LPVOID
func
,
CALLCONV
callconv
,
int
nrargs
,
DWORD
*
args
)
{
_invoke
(
FARPROC
func
,
CALLCONV
callconv
,
int
nrargs
,
DWORD
*
args
)
{
DWORD
res
;
if
(
TRACE_ON
(
ole
))
{
int
i
;
MESSAG
E
(
"Calling %p("
,
func
);
for
(
i
=
0
;
i
<
nrargs
;
i
++
)
MESSAG
E
(
"%08lx,"
,
args
[
i
]);
MESSAG
E
(
")
\n
"
);
TRAC
E
(
"Calling %p("
,
func
);
for
(
i
=
0
;
i
<
nrargs
;
i
++
)
TRAC
E
(
"%08lx,"
,
args
[
i
]);
TRAC
E
(
")
\n
"
);
}
switch
(
callconv
)
{
case
CC_STDCALL
:
switch
(
nrargs
)
{
case
0
:
{
DWORD
(
WINAPI
*
xfunc
)()
=
func
;
res
=
xfunc
();
case
0
:
res
=
func
();
break
;
}
case
1
:
{
DWORD
(
WINAPI
*
xfunc
)(
DWORD
)
=
func
;
res
=
xfunc
(
args
[
0
]);
case
1
:
res
=
func
(
args
[
0
]);
break
;
}
case
2
:
{
DWORD
(
WINAPI
*
xfunc
)(
DWORD
,
DWORD
)
=
func
;
res
=
xfunc
(
args
[
0
],
args
[
1
]);
case
2
:
res
=
func
(
args
[
0
],
args
[
1
]);
break
;
}
case
3
:
{
DWORD
(
WINAPI
*
xfunc
)(
DWORD
,
DWORD
,
DWORD
)
=
func
;
res
=
xfunc
(
args
[
0
],
args
[
1
],
args
[
2
]);
case
3
:
res
=
func
(
args
[
0
],
args
[
1
],
args
[
2
]);
break
;
}
case
4
:
{
DWORD
(
WINAPI
*
xfunc
)(
DWORD
,
DWORD
,
DWORD
,
DWORD
)
=
func
;
res
=
xfunc
(
args
[
0
],
args
[
1
],
args
[
2
],
args
[
3
]);
case
4
:
res
=
func
(
args
[
0
],
args
[
1
],
args
[
2
],
args
[
3
]);
break
;
}
case
5
:
{
DWORD
(
WINAPI
*
xfunc
)(
DWORD
,
DWORD
,
DWORD
,
DWORD
,
DWORD
)
=
func
;
res
=
xfunc
(
args
[
0
],
args
[
1
],
args
[
2
],
args
[
3
],
args
[
4
]);
case
5
:
res
=
func
(
args
[
0
],
args
[
1
],
args
[
2
],
args
[
3
],
args
[
4
]);
break
;
}
case
6
:
{
DWORD
(
WINAPI
*
xfunc
)(
DWORD
,
DWORD
,
DWORD
,
DWORD
,
DWORD
,
DWORD
)
=
func
;
res
=
xfunc
(
args
[
0
],
args
[
1
],
args
[
2
],
args
[
3
],
args
[
4
],
args
[
5
]);
case
6
:
res
=
func
(
args
[
0
],
args
[
1
],
args
[
2
],
args
[
3
],
args
[
4
],
args
[
5
]);
break
;
}
case
7
:
{
DWORD
(
WINAPI
*
xfunc
)(
DWORD
,
DWORD
,
DWORD
,
DWORD
,
DWORD
,
DWORD
,
DWORD
)
=
func
;
res
=
xfunc
(
args
[
0
],
args
[
1
],
args
[
2
],
args
[
3
],
args
[
4
],
args
[
5
],
args
[
6
]);
case
7
:
res
=
func
(
args
[
0
],
args
[
1
],
args
[
2
],
args
[
3
],
args
[
4
],
args
[
5
],
args
[
6
]);
break
;
}
case
8
:
{
DWORD
(
WINAPI
*
xfunc
)(
DWORD
,
DWORD
,
DWORD
,
DWORD
,
DWORD
,
DWORD
,
DWORD
,
DWORD
)
=
func
;
res
=
xfunc
(
args
[
0
],
args
[
1
],
args
[
2
],
args
[
3
],
args
[
4
],
args
[
5
],
args
[
6
],
args
[
7
]);
case
8
:
res
=
func
(
args
[
0
],
args
[
1
],
args
[
2
],
args
[
3
],
args
[
4
],
args
[
5
],
args
[
6
],
args
[
7
]);
break
;
}
case
9
:
{
DWORD
(
WINAPI
*
xfunc
)(
DWORD
,
DWORD
,
DWORD
,
DWORD
,
DWORD
,
DWORD
,
DWORD
,
DWORD
,
DWORD
)
=
func
;
res
=
xfunc
(
args
[
0
],
args
[
1
],
args
[
2
],
args
[
3
],
args
[
4
],
args
[
5
],
args
[
6
],
args
[
7
],
args
[
8
]);
case
9
:
res
=
func
(
args
[
0
],
args
[
1
],
args
[
2
],
args
[
3
],
args
[
4
],
args
[
5
],
args
[
6
],
args
[
7
],
args
[
8
]);
break
;
}
default:
FIXME
(
"unsupported number of arguments %d in stdcall
\n
"
,
nrargs
);
res
=
-
1
;
...
...
@@ -4349,13 +4329,13 @@ DispCallFunc(
if
(
pvargResult
!=
NULL
&&
V_VT
(
pvargResult
)
==
VT_EMPTY
)
{
_invoke
((
*
(
DWORD
*
**
)
pvInstance
)[
oVft
/
4
],
cc
,
argsize
,
args
);
_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
((
*
(
DWORD
*
**
)
pvInstance
)[
oVft
/
4
],
cc
,
argsize
,
args
);
hres
=
_invoke
((
*
(
FARPROC
**
)
pvInstance
)[
oVft
/
4
],
cc
,
argsize
,
args
);
FIXME
(
"Method returned %lx
\n
"
,
hres
);
}
HeapFree
(
GetProcessHeap
(),
0
,
args
);
...
...
@@ -4444,7 +4424,7 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
pFDesc
->
funcdesc
.
cParamsOpt
);
res
=
_invoke
((
*
(
DWORD
*
**
)
pIUnk
)[
pFDesc
->
funcdesc
.
oVft
/
4
],
res
=
_invoke
((
*
(
FARPROC
**
)
pIUnk
)[
pFDesc
->
funcdesc
.
oVft
/
4
],
pFDesc
->
funcdesc
.
callconv
,
numargs
,
args
...
...
dlls/oleaut32/typelib.h
View file @
150cd5a7
...
...
@@ -580,7 +580,7 @@ WORD offset from start of block to SAFEARRAY
WORD typeofarray
*/
extern
DWORD
_invoke
(
LPVOID
func
,
CALLCONV
callconv
,
int
nrargs
,
DWORD
*
args
);
extern
DWORD
_invoke
(
FARPROC
func
,
CALLCONV
callconv
,
int
nrargs
,
DWORD
*
args
);
extern
void
dump_Variant
(
VARIANT
*
pvar
);
#include "poppack.h"
...
...
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