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
aeb7362e
Commit
aeb7362e
authored
Apr 18, 2013
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Apr 23, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oledb32: Implement DataConvert DBTYPE_R8->VARIANT.
parent
31f0079f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
convert.c
dlls/oledb32/convert.c
+5
-0
convert.c
dlls/oledb32/tests/convert.c
+11
-0
No files found.
dlls/oledb32/convert.c
View file @
aeb7362e
...
...
@@ -761,6 +761,11 @@ static HRESULT WINAPI convert_DataConvert(IDataConvert* iface,
V_VT
(
v
)
=
VT_DECIMAL
;
hr
=
VarDecFromI8
(
*
(
LONGLONG
*
)
src
,
&
V_DECIMAL
(
v
));
break
;
case
DBTYPE_R8
:
V_VT
(
v
)
=
VT_R8
;
V_R8
(
v
)
=
*
(
double
*
)
src
;
hr
=
S_OK
;
break
;
case
DBTYPE_BSTR
:
{
BSTR
s
=
*
(
WCHAR
**
)
src
;
...
...
dlls/oledb32/tests/convert.c
View file @
aeb7362e
...
...
@@ -2536,6 +2536,7 @@ static void test_getconversionsize(void)
static
void
test_converttovar
(
void
)
{
static
WCHAR
strW
[]
=
{
't'
,
'e'
,
's'
,
't'
,
0
};
double
dvalue
=
123
.
56
;
IDataConvert
*
convert
;
DBSTATUS
dst_status
;
DBLENGTH
dst_len
;
...
...
@@ -2588,6 +2589,16 @@ static void test_converttovar(void)
V_VT
(
&
dst
)
=
VT_EMPTY
;
dst_len
=
0
;
dst_status
=
DBSTATUS_S_DEFAULT
;
hr
=
IDataConvert_DataConvert
(
convert
,
DBTYPE_R8
,
DBTYPE_VARIANT
,
sizeof
(
dvalue
),
&
dst_len
,
&
dvalue
,
&
dst
,
sizeof
(
dst
),
0
,
&
dst_status
,
0
,
0
,
0
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
dst_status
==
DBSTATUS_S_OK
,
"got %08x
\n
"
,
dst_status
);
ok
(
dst_len
==
sizeof
(
dst
),
"got %ld
\n
"
,
dst_len
);
ok
(
V_VT
(
&
dst
)
==
VT_R8
,
"got %d
\n
"
,
V_VT
(
&
dst
));
ok
(
V_R8
(
&
dst
)
==
123
.
56
,
"got %f
\n
"
,
V_R8
(
&
dst
));
V_VT
(
&
dst
)
=
VT_EMPTY
;
dst_len
=
0
;
dst_status
=
DBSTATUS_S_DEFAULT
;
i4
=
123
;
hr
=
IDataConvert_DataConvert
(
convert
,
DBTYPE_I4
,
DBTYPE_VARIANT
,
sizeof
(
i4
),
&
dst_len
,
&
i4
,
&
dst
,
sizeof
(
dst
),
0
,
&
dst_status
,
0
,
0
,
0
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
...
...
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