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
cdceb023
Commit
cdceb023
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 VarIdiv.
parent
5aacee95
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
22 deletions
+28
-22
variant.c
dlls/oleaut32/variant.c
+28
-22
No files found.
dlls/oleaut32/variant.c
View file @
cdceb023
...
...
@@ -5109,6 +5109,15 @@ HRESULT WINAPI VarIdiv(LPVARIANT left, LPVARIANT right, LPVARIANT result)
VARTYPE
leftvt
,
rightvt
;
VARTYPE
rightExtraFlags
,
leftExtraFlags
,
ExtraFlags
;
VARIANT
lv
,
rv
;
VARIANT
tempLeft
,
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
);
VariantInit
(
&
lv
);
VariantInit
(
&
rv
);
VariantInit
(
&
tempLeft
);
VariantInit
(
&
tempRight
);
leftvt
=
V_VT
(
left
)
&
VT_TYPEMASK
;
rightvt
=
V_VT
(
right
)
&
VT_TYPEMASK
;
...
...
@@ -5116,12 +5125,12 @@ HRESULT WINAPI VarIdiv(LPVARIANT left, LPVARIANT right, LPVARIANT result)
rightExtraFlags
=
V_VT
(
right
)
&
(
~
VT_TYPEMASK
);
if
(
leftExtraFlags
!=
rightExtraFlags
)
return
DISP_E_BADVARTYPE
;
{
hres
=
DISP_E_BADVARTYPE
;
goto
end
;
}
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 VarIdiv always returns a error when using any extra
* flags or if the variant combination is I8 and INT.
*/
...
...
@@ -5129,13 +5138,17 @@ HRESULT WINAPI VarIdiv(LPVARIANT left, LPVARIANT right, LPVARIANT result)
(
leftvt
==
VT_INT
&&
rightvt
==
VT_I8
)
||
(
rightvt
==
VT_EMPTY
&&
leftvt
!=
VT_NULL
)
||
ExtraFlags
!=
0
)
return
DISP_E_BADVARTYPE
;
{
hres
=
DISP_E_BADVARTYPE
;
goto
end
;
}
/* Determine variant type */
else
if
(
leftvt
==
VT_NULL
||
rightvt
==
VT_NULL
)
{
V_VT
(
result
)
=
VT_NULL
;
return
S_OK
;
hres
=
S_OK
;
goto
end
;
}
else
if
(
leftvt
==
VT_I8
||
rightvt
==
VT_I8
)
resvt
=
VT_I8
;
...
...
@@ -5160,26 +5173,16 @@ HRESULT WINAPI VarIdiv(LPVARIANT left, LPVARIANT right, LPVARIANT result)
else
if
(
leftvt
==
VT_UI1
||
rightvt
==
VT_UI1
)
resvt
=
VT_UI1
;
else
return
DISP_E_BADVARTYPE
;
VariantInit
(
&
lv
)
;
VariantInit
(
&
rv
);
{
hres
=
DISP_E_BADVARTYPE
;
goto
end
;
}
/* coerce to the result type */
hres
=
VariantChangeType
(
&
lv
,
left
,
0
,
resvt
);
if
(
hres
!=
S_OK
)
{
VariantClear
(
&
lv
);
VariantClear
(
&
rv
);
return
hres
;
}
if
(
hres
!=
S_OK
)
goto
end
;
hres
=
VariantChangeType
(
&
rv
,
right
,
0
,
resvt
);
if
(
hres
!=
S_OK
)
{
VariantClear
(
&
lv
);
VariantClear
(
&
rv
);
return
hres
;
}
if
(
hres
!=
S_OK
)
goto
end
;
/* do the math */
V_VT
(
result
)
=
resvt
;
...
...
@@ -5226,8 +5229,11 @@ HRESULT WINAPI VarIdiv(LPVARIANT left, LPVARIANT right, LPVARIANT result)
leftvt
,
rightvt
);
}
end:
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