Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
4dd845ed
Commit
4dd845ed
authored
Jun 08, 2005
by
Marcus Meissner
Committed by
Alexandre Julliard
Jun 08, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed IType::Invoke in regards to handling propertyget variables
longer than 4 bytes (like VT_DATE).
parent
cdb3cdf3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
22 deletions
+38
-22
typelib.c
dlls/oleaut32/typelib.c
+38
-22
No files found.
dlls/oleaut32/typelib.c
View file @
4dd845ed
...
...
@@ -4783,13 +4783,19 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
memcpy
(
rgvarg
,
pDispParams
->
rgvarg
,
sizeof
(
VARIANT
)
*
pDispParams
->
cArgs
);
hres
=
S_OK
;
numargs
=
1
;
numargs2
=
0
;
numargs
=
1
;
/* sizeof(thisptr) */
numargs2
=
0
;
for
(
i
=
0
;
i
<
func_desc
->
cParams
;
i
++
)
{
if
(
i
<
pDispParams
->
cArgs
)
numargs
+=
_argsize
(
func_desc
->
lprgelemdescParam
[
i
].
tdesc
.
vt
);
else
{
numargs
+=
1
;
/* sizeof(lpvoid) */
numargs2
+=
_argsize
(
func_desc
->
lprgelemdescParam
[
i
].
tdesc
.
vt
);
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
);
}
}
}
...
...
@@ -4799,11 +4805,14 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
args
[
0
]
=
(
DWORD
)
pIUnk
;
argspos
=
1
;
args2pos
=
0
;
for
(
i
=
0
;
i
<
func_desc
->
cParams
;
i
++
)
{
int
arglen
=
_argsize
(
func_desc
->
lprgelemdescParam
[
i
].
tdesc
.
vt
);
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
)
{
VARIANT
*
arg
=
&
rgvarg
[
pDispParams
->
cArgs
-
i
-
1
];
TYPEDESC
*
tdesc
=
&
func_desc
->
lprgelemdescParam
[
i
].
tdesc
;
USHORT
paramFlags
=
func_desc
->
lprgelemdescParam
[
i
].
u
.
paramdesc
.
wParamFlags
;
if
(
paramFlags
&
PARAMFLAG_FOPT
)
{
if
(
i
<
func_desc
->
cParams
-
func_desc
->
cParamsOpt
)
ERR
(
"Parameter has PARAMFLAG_FOPT flag but is not one of last cParamOpt parameters
\n
"
);
...
...
@@ -4822,13 +4831,14 @@ 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
(
func_desc
->
lprgelemdescParam
[
i
].
u
.
paramdesc
.
wP
aramFlags
&
PARAMFLAG_FOPT
)
{
}
else
if
(
p
aramFlags
&
PARAMFLAG_FOPT
)
{
VARIANT
*
arg
=
&
rgvarg
[
i
];
TYPEDESC
*
tdesc
=
&
func_desc
->
lprgelemdescParam
[
i
].
tdesc
;
if
(
i
<
func_desc
->
cParams
-
func_desc
->
cParamsOpt
)
if
(
i
<
func_desc
->
cParams
-
func_desc
->
cParamsOpt
)
ERR
(
"Parameter has PARAMFLAG_FOPT flag but is not one of last cParamOpt parameters
\n
"
);
if
(
func_desc
->
lprgelemdescParam
[
i
].
u
.
paramdesc
.
wP
aramFlags
&
PARAMFLAG_FHASDEFAULT
)
if
(
p
aramFlags
&
PARAMFLAG_FHASDEFAULT
)
FIXME
(
"PARAMFLAG_FHASDEFAULT flag not supported
\n
"
);
V_VT
(
arg
)
=
VT_ERROR
;
V_ERROR
(
arg
)
=
DISP_E_PARAMNOTFOUND
;
arglen
=
_argsize
(
VT_ERROR
);
...
...
@@ -4836,10 +4846,12 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
if
(
FAILED
(
hres
))
goto
func_fail
;
argspos
+=
arglen
;
}
else
{
TYPEDESC
*
tdesc
=
&
(
func_desc
->
lprgelemdescParam
[
i
].
tdesc
);
if
(
tdesc
->
vt
!=
VT_PTR
)
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
);
/*FIXME: give pointers for the rest, so propertyget works*/
/* Supply pointers for the rest, so propertyget works*/
args
[
argspos
]
=
(
DWORD
)
&
args2
[
args2pos
];
/* If pointer to variant, pass reference it. */
...
...
@@ -4864,20 +4876,24 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
if
(
pVarResult
&&
(
dwFlags
&
(
DISPATCH_PROPERTYGET
)))
{
args2pos
=
0
;
for
(
i
=
0
;
i
<
func_desc
->
cParams
-
pDispParams
->
cArgs
;
i
++
)
{
int
arglen
=
_argsize
(
func_desc
->
lprgelemdescParam
[
i
].
tdesc
.
vt
);
TYPEDESC
*
tdesc
=
&
(
func_desc
->
lprgelemdescParam
[
i
+
pDispParams
->
cArgs
].
tdesc
);
TYPEDESC
i4_tdesc
;
i4_tdesc
.
vt
=
VT_I4
;
ELEMDESC
*
elemdesc
=
&
(
func_desc
->
lprgelemdescParam
[
i
+
pDispParams
->
cArgs
]);
TYPEDESC
*
tdesc
=
&
(
elemdesc
->
tdesc
);
int
arglen
=
_argsize
(
tdesc
->
vt
);
TYPEDESC
i4_tdesc
;
i4_tdesc
.
vt
=
VT_I4
;
/* If we are a pointer to a variant, we are done already */
if
((
tdesc
->
vt
==
VT_PTR
)
&&
(
tdesc
->
u
.
lptdesc
->
vt
==
VT_VARIANT
))
continue
;
if
(
tdesc
->
vt
==
VT_PTR
)
{
tdesc
=
tdesc
->
u
.
lptdesc
;
arglen
=
_argsize
(
tdesc
->
vt
);
}
VariantInit
(
pVarResult
);
memcpy
(
&
V_INT
(
pVarResult
),
&
args2
[
args2pos
],
arglen
*
sizeof
(
DWORD
));
if
(
tdesc
->
vt
==
VT_PTR
)
tdesc
=
tdesc
->
u
.
lptdesc
;
if
(
tdesc
->
vt
==
VT_USERDEFINED
)
{
ITypeInfo
*
tinfo2
;
TYPEATTR
*
tattr
;
...
...
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