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
1c85155e
Commit
1c85155e
authored
Jan 02, 2007
by
Alex Villacís Lasso
Committed by
Alexandre Julliard
Jan 03, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Support for VT_DISPATCH in VarImp.
parent
e02b224d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
9 deletions
+35
-9
variant.c
dlls/oleaut32/variant.c
+35
-9
No files found.
dlls/oleaut32/variant.c
View file @
1c85155e
...
...
@@ -5623,6 +5623,29 @@ HRESULT WINAPI VarImp(LPVARIANT left, LPVARIANT right, LPVARIANT result)
VARTYPE
rightExtraFlags
,
leftExtraFlags
,
ExtraFlags
;
VARIANT
lv
,
rv
;
double
d
;
VARIANT
tempLeft
,
tempRight
;
VariantInit
(
&
lv
);
VariantInit
(
&
rv
);
VariantInit
(
&
tempLeft
);
VariantInit
(
&
tempRight
);
TRACE
(
"(%p->(%s%s),%p->(%s%s),%p)
\n
"
,
left
,
debugstr_VT
(
left
),
debugstr_VF
(
left
),
right
,
debugstr_VT
(
right
),
debugstr_VF
(
right
),
result
);
/* Handle VT_DISPATCH by storing and taking address of returned value */
if
((
V_VT
(
left
)
&
VT_TYPEMASK
)
==
VT_DISPATCH
)
{
hres
=
VARIANT_FetchDispatchValue
(
left
,
&
tempLeft
);
if
(
FAILED
(
hres
))
goto
VarImp_Exit
;
left
=
&
tempLeft
;
}
if
((
V_VT
(
right
)
&
VT_TYPEMASK
)
==
VT_DISPATCH
)
{
hres
=
VARIANT_FetchDispatchValue
(
right
,
&
tempRight
);
if
(
FAILED
(
hres
))
goto
VarImp_Exit
;
right
=
&
tempRight
;
}
leftvt
=
V_VT
(
left
)
&
VT_TYPEMASK
;
rightvt
=
V_VT
(
right
)
&
VT_TYPEMASK
;
...
...
@@ -5630,25 +5653,29 @@ HRESULT WINAPI VarImp(LPVARIANT left, LPVARIANT right, LPVARIANT result)
rightExtraFlags
=
V_VT
(
right
)
&
(
~
VT_TYPEMASK
);
if
(
leftExtraFlags
!=
rightExtraFlags
)
return
DISP_E_BADVARTYPE
;
{
hres
=
DISP_E_BADVARTYPE
;
goto
VarImp_Exit
;
}
ExtraFlags
=
leftExtraFlags
;
TRACE
(
"(%p->(%s%s),%p->(%s%s),%p)
\n
"
,
left
,
debugstr_VT
(
left
),
debugstr_VF
(
left
),
right
,
debugstr_VT
(
right
),
debugstr_VF
(
right
),
result
);
/* Native VarImp always returns a error when using any extra
* flags or if the variants are I8 and INT.
*/
if
((
leftvt
==
VT_I8
&&
rightvt
==
VT_INT
)
||
ExtraFlags
!=
0
)
return
DISP_E_BADVARTYPE
;
{
hres
=
DISP_E_BADVARTYPE
;
goto
VarImp_Exit
;
}
/* Determine result type */
else
if
((
leftvt
==
VT_NULL
&&
rightvt
==
VT_NULL
)
||
(
leftvt
==
VT_NULL
&&
rightvt
==
VT_EMPTY
))
{
V_VT
(
result
)
=
VT_NULL
;
return
S_OK
;
hres
=
S_OK
;
goto
VarImp_Exit
;
}
else
if
(
leftvt
==
VT_I8
||
rightvt
==
VT_I8
)
resvt
=
VT_I8
;
...
...
@@ -5677,9 +5704,6 @@ HRESULT WINAPI VarImp(LPVARIANT left, LPVARIANT right, LPVARIANT result)
leftvt
==
VT_BSTR
||
rightvt
==
VT_BSTR
)
resvt
=
VT_BOOL
;
VariantInit
(
&
lv
);
VariantInit
(
&
rv
);
/* VT_NULL requires special handling for when the opposite
* variant is equal to something other than -1.
* (NULL Imp 0 = NULL, NULL Imp n = n)
...
...
@@ -5824,6 +5848,8 @@ VarImp_Exit:
VariantClear
(
&
lv
);
VariantClear
(
&
rv
);
VariantClear
(
&
tempLeft
);
VariantClear
(
&
tempRight
);
return
hres
;
}
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