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
6b974380
Commit
6b974380
authored
Dec 26, 2005
by
Robert Shearman
Committed by
Alexandre Julliard
Dec 26, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Convert some tabs to spaces and some other formatting changes.
parent
fa49c971
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
73 additions
and
64 deletions
+73
-64
typelib.c
dlls/oleaut32/typelib.c
+73
-64
No files found.
dlls/oleaut32/typelib.c
View file @
6b974380
...
...
@@ -5326,41 +5326,44 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
switch
(
func_desc
->
funckind
)
{
case
FUNC_PUREVIRTUAL
:
case
FUNC_VIRTUAL
:
{
DWORD
res
;
int
numargs
,
numargs2
,
argspos
,
args2pos
;
DWORD
*
args
,
*
args2
;
DWORD
res
;
int
numargs
,
numargs2
,
argspos
,
args2pos
;
DWORD
*
args
,
*
args2
;
VARIANT
*
rgvarg
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
VARIANT
)
*
func_desc
->
cParams
);
memcpy
(
rgvarg
,
pDispParams
->
rgvarg
,
sizeof
(
VARIANT
)
*
pDispParams
->
cArgs
);
hres
=
S_OK
;
numargs
=
1
;
/* sizeof(thisptr) */
numargs2
=
0
;
for
(
i
=
0
;
i
<
func_desc
->
cParams
;
i
++
)
{
hres
=
S_OK
;
numargs
=
1
;
/* sizeof(thisptr) */
numargs2
=
0
;
for
(
i
=
0
;
i
<
func_desc
->
cParams
;
i
++
)
{
TYPEDESC
*
tdesc
=
&
func_desc
->
lprgelemdescParam
[
i
].
tdesc
;
numargs
+=
_argsize
(
tdesc
->
vt
);
if
(
i
>=
pDispParams
->
cArgs
)
{
/* arguments to return */
if
(
tdesc
->
vt
==
VT_PTR
)
{
numargs2
+=
_argsize
(
tdesc
->
u
.
lptdesc
->
vt
);
}
else
{
FIXME
(
"The variant type here should have been VT_PTR, not vt %d
\n
"
,
tdesc
->
vt
);
numargs2
+=
_argsize
(
tdesc
->
vt
);
}
}
}
numargs
+=
_argsize
(
tdesc
->
vt
);
if
(
i
>=
pDispParams
->
cArgs
)
{
/* arguments to return */
if
(
tdesc
->
vt
==
VT_PTR
)
{
numargs2
+=
_argsize
(
tdesc
->
u
.
lptdesc
->
vt
);
}
else
{
FIXME
(
"The variant type here should have been VT_PTR, not vt %d
\n
"
,
tdesc
->
vt
);
numargs2
+=
_argsize
(
tdesc
->
vt
);
}
}
}
args
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
DWORD
)
*
numargs
);
args2
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
DWORD
)
*
numargs2
);
args
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
DWORD
)
*
numargs
);
args2
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
DWORD
)
*
numargs2
);
args
[
0
]
=
(
DWORD
)
pIUnk
;
argspos
=
1
;
args2pos
=
0
;
for
(
i
=
0
;
i
<
func_desc
->
cParams
;
i
++
)
{
ELEMDESC
*
elemdesc
=
&
(
func_desc
->
lprgelemdescParam
[
i
]);
TYPEDESC
*
tdesc
=
&
(
elemdesc
->
tdesc
);
USHORT
paramFlags
=
elemdesc
->
u
.
paramdesc
.
wParamFlags
;
int
arglen
=
_argsize
(
tdesc
->
vt
);
args
[
0
]
=
(
DWORD
)
pIUnk
;
argspos
=
1
;
args2pos
=
0
;
for
(
i
=
0
;
i
<
func_desc
->
cParams
;
i
++
)
{
ELEMDESC
*
elemdesc
=
&
(
func_desc
->
lprgelemdescParam
[
i
]);
TYPEDESC
*
tdesc
=
&
(
elemdesc
->
tdesc
);
USHORT
paramFlags
=
elemdesc
->
u
.
paramdesc
.
wParamFlags
;
int
arglen
=
_argsize
(
tdesc
->
vt
);
if
(
i
<
pDispParams
->
cArgs
)
{
if
(
i
<
pDispParams
->
cArgs
)
{
VARIANT
*
arg
=
&
rgvarg
[
pDispParams
->
cArgs
-
i
-
1
];
if
(
paramFlags
&
PARAMFLAG_FOPT
)
{
...
...
@@ -5381,7 +5384,9 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
hres
=
_copy_arg
(
iface
,
tdesc
,
&
args
[
argspos
],
arg
,
tdesc
->
vt
);
if
(
FAILED
(
hres
))
goto
func_fail
;
argspos
+=
arglen
;
}
else
if
(
paramFlags
&
PARAMFLAG_FOPT
)
{
}
else
if
(
paramFlags
&
PARAMFLAG_FOPT
)
{
VARIANT
*
arg
=
&
rgvarg
[
i
];
if
(
i
<
func_desc
->
cParams
-
func_desc
->
cParamsOpt
)
...
...
@@ -5395,36 +5400,38 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
hres
=
_copy_arg
(
iface
,
tdesc
,
&
args
[
argspos
],
arg
,
tdesc
->
vt
);
if
(
FAILED
(
hres
))
goto
func_fail
;
argspos
+=
arglen
;
}
else
{
if
(
tdesc
->
vt
==
VT_PTR
)
arglen
=
_argsize
(
tdesc
->
u
.
lptdesc
->
vt
);
else
FIXME
(
"set %d to pointer for get (type is %d)
\n
"
,
i
,
tdesc
->
vt
);
/* Supply pointers for the rest, so propertyget works*/
args
[
argspos
]
=
(
DWORD
)
&
args2
[
args2pos
];
/* If pointer to variant, pass reference it. */
if
((
tdesc
->
vt
==
VT_PTR
)
&&
(
tdesc
->
u
.
lptdesc
->
vt
==
VT_VARIANT
)
&&
pVarResult
}
else
{
if
(
tdesc
->
vt
==
VT_PTR
)
arglen
=
_argsize
(
tdesc
->
u
.
lptdesc
->
vt
);
else
FIXME
(
"set %d to pointer for get (type is %d)
\n
"
,
i
,
tdesc
->
vt
);
/* Supply pointers for the rest, so propertyget works*/
args
[
argspos
]
=
(
DWORD
)
&
args2
[
args2pos
];
/* If pointer to variant, pass reference it. */
if
((
tdesc
->
vt
==
VT_PTR
)
&&
(
tdesc
->
u
.
lptdesc
->
vt
==
VT_VARIANT
)
&&
pVarResult
)
args
[
argspos
]
=
(
DWORD
)
pVarResult
;
argspos
+=
1
;
args2pos
+=
arglen
;
}
}
if
(
func_desc
->
cParamsOpt
<
0
)
FIXME
(
"Does not support optional parameters (%d)
\n
"
,
func_desc
->
cParamsOpt
);
argspos
+=
1
;
args2pos
+=
arglen
;
}
}
if
(
func_desc
->
cParamsOpt
<
0
)
FIXME
(
"Does not support optional parameters (%d)
\n
"
,
func_desc
->
cParamsOpt
);
res
=
_invoke
((
*
(
FARPROC
**
)
pIUnk
)[
func_desc
->
oVft
/
4
],
func_desc
->
callconv
,
numargs
,
args
);
res
=
_invoke
((
*
(
FARPROC
**
)
pIUnk
)[
func_desc
->
oVft
/
4
],
func_desc
->
callconv
,
numargs
,
args
);
if
(
pVarResult
)
{
for
(
i
=
0
;
i
<
func_desc
->
cParams
;
i
++
)
{
if
(
pVarResult
)
{
for
(
i
=
0
;
i
<
func_desc
->
cParams
;
i
++
)
{
USHORT
wParamFlags
=
func_desc
->
lprgelemdescParam
[
i
].
u
.
paramdesc
.
wParamFlags
;
if
(
wParamFlags
&
PARAMFLAG_FRETVAL
)
{
ELEMDESC
*
elemdesc
=
&
func_desc
->
lprgelemdescParam
[
i
];
...
...
@@ -5455,19 +5462,21 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
IUnknown_Release
(
*
V_UNKNOWNREF
(
&
varresult
));
}
break
;
}
}
}
}
}
}
if
((
func_desc
->
elemdescFunc
.
tdesc
.
vt
==
VT_HRESULT
)
&&
FAILED
(
res
))
{
WARN
(
"invoked function failed with error 0x%08lx
\n
"
,
res
);
hres
=
DISP_E_EXCEPTION
;
if
(
pExcepInfo
)
pExcepInfo
->
scode
=
res
;
}
if
((
func_desc
->
elemdescFunc
.
tdesc
.
vt
==
VT_HRESULT
)
&&
FAILED
(
res
))
{
WARN
(
"invoked function failed with error 0x%08lx
\n
"
,
res
);
hres
=
DISP_E_EXCEPTION
;
if
(
pExcepInfo
)
pExcepInfo
->
scode
=
res
;
}
func_fail:
HeapFree
(
GetProcessHeap
(),
0
,
rgvarg
);
HeapFree
(
GetProcessHeap
(),
0
,
args2
);
HeapFree
(
GetProcessHeap
(),
0
,
args
);
HeapFree
(
GetProcessHeap
(),
0
,
args2
);
HeapFree
(
GetProcessHeap
(),
0
,
args
);
break
;
}
case
FUNC_DISPATCH
:
{
...
...
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