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
4d7e99df
Commit
4d7e99df
authored
Apr 13, 2005
by
Daniel Remenak
Committed by
Alexandre Julliard
Apr 13, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented VarIdiv.
parent
794dbaa3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
2 deletions
+52
-2
oleaut32.spec
dlls/oleaut32/oleaut32.spec
+1
-1
variant.c
dlls/oleaut32/variant.c
+51
-1
No files found.
dlls/oleaut32/oleaut32.spec
View file @
4d7e99df
...
...
@@ -148,7 +148,7 @@
149 stdcall SysStringByteLen(ptr)
150 stdcall SysAllocStringByteLen(ptr long)
152 stdcall VarEqv(ptr ptr ptr)
153 st
ub VarIdiv # stdcall
(ptr ptr ptr)
153 st
dcall VarIdiv
(ptr ptr ptr)
154 stub VarImp # stdcall (ptr ptr ptr)
155 stdcall VarMod(ptr ptr ptr)
156 stdcall VarMul(ptr ptr ptr)
...
...
dlls/oleaut32/variant.c
View file @
4d7e99df
...
...
@@ -3,6 +3,8 @@
*
* Copyright 1998 Jean-Claude Cote
* Copyright 2003 Jon Griffiths
* Copyright 2005 Daniel Remenak
*
* The alorithm for conversion from Julian days to day/month/year is based on
* that devised by Henry Fliegel, as implemented in PostgreSQL, which is
* Copyright 1994-7 Regents of the University of California
...
...
@@ -4157,9 +4159,57 @@ HRESULT WINAPI VarRound(LPVARIANT pVarIn, int deci, LPVARIANT pVarOut)
return
hRet
;
}
/**********************************************************************
* VarIdiv [OLEAUT32.153]
*
* Converts input variants to integers and divides them.
*
* PARAMS
* left [I] Left hand variant
* right [I] Right hand variant
* result [O] Destination for quotient
*
* RETURNS
* Success: S_OK. result contains the quotient.
* Failure: An HRESULT error code indicating the error.
*
* NOTES
* If either expression is null, null is returned, as per MSDN
*/
HRESULT
WINAPI
VarIdiv
(
LPVARIANT
left
,
LPVARIANT
right
,
LPVARIANT
result
)
{
VARIANT
lv
,
rv
;
HRESULT
hr
;
VariantInit
(
&
lv
);
VariantInit
(
&
rv
);
if
((
V_VT
(
left
)
==
VT_NULL
)
||
(
V_VT
(
right
)
==
VT_NULL
))
{
hr
=
VariantChangeType
(
result
,
result
,
0
,
VT_NULL
);
if
(
FAILED
(
hr
))
{
/* This should never happen */
FIXME
(
"Failed to convert return value to VT_NULL.
\n
"
);
return
hr
;
}
return
S_OK
;
}
hr
=
VariantChangeType
(
&
lv
,
left
,
0
,
VT_I4
);
if
(
FAILED
(
hr
))
{
return
hr
;
}
hr
=
VariantChangeType
(
&
rv
,
right
,
0
,
VT_I4
);
if
(
FAILED
(
hr
))
{
return
hr
;
}
hr
=
VarDiv
(
&
lv
,
&
rv
,
result
);
return
hr
;
}
/**********************************************************************
* VarMod [OLEAUT32.15
4
]
* VarMod [OLEAUT32.15
5
]
*
* Perform the modulus operation of the right hand variant on the left
*
...
...
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