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
70af1dd0
Commit
70af1dd0
authored
May 20, 2013
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
May 20, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oledb32: Implement DataConvert DBTYPE_VARIANT(VT_DATE) to, DBTYPE_DBTIMESTAMP.
parent
9287bb80
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
0 deletions
+39
-0
convert.c
dlls/oledb32/convert.c
+18
-0
convert.c
dlls/oledb32/tests/convert.c
+21
-0
No files found.
dlls/oledb32/convert.c
View file @
70af1dd0
...
...
@@ -445,6 +445,24 @@ static HRESULT WINAPI convert_DataConvert(IDataConvert* iface,
d
->
fraction
=
st
.
wMilliseconds
*
1000000
;
break
;
}
case
DBTYPE_VARIANT
:
{
if
(
V_VT
((
VARIANT
*
)
src
)
==
VT_DATE
)
{
SYSTEMTIME
st
;
hr
=
(
VariantTimeToSystemTime
(
V_DATE
((
VARIANT
*
)
src
),
&
st
)
?
S_OK
:
E_FAIL
);
d
->
year
=
st
.
wYear
;
d
->
month
=
st
.
wMonth
;
d
->
day
=
st
.
wDay
;
d
->
hour
=
st
.
wHour
;
d
->
minute
=
st
.
wMinute
;
d
->
second
=
st
.
wSecond
;
d
->
fraction
=
st
.
wMilliseconds
*
1000000
;
break
;
}
else
FIXME
(
"Unimplemented variant type %d -> DBTIMESTAMP
\n
"
,
V_VT
((
VARIANT
*
)
src
));
}
default:
FIXME
(
"Unimplemented conversion %04x -> DBTIMESTAMP
\n
"
,
src_type
);
return
E_NOTIMPL
;
}
break
;
...
...
dlls/oledb32/tests/convert.c
View file @
70af1dd0
...
...
@@ -2603,6 +2603,26 @@ static void test_converttovar(void)
ok
(
(
float
)
V_DATE
(
&
dst
)
==
41409
.
0
,
"got %f
\n
"
,
V_DATE
(
&
dst
));
}
static
void
test_converttotimestamp
(
void
)
{
DBTIMESTAMP
ts
=
{
2013
,
5
,
14
,
2
,
4
,
12
,
0
};
DBTIMESTAMP
dst
;
DBSTATUS
dst_status
;
DBLENGTH
dst_len
;
VARIANT
var
;
HRESULT
hr
;
VariantInit
(
&
var
);
V_VT
(
&
var
)
=
VT_DATE
;
V_DATE
(
&
var
)
=
41408
.
086250
;
dst_len
=
0x1234
;
hr
=
IDataConvert_DataConvert
(
convert
,
DBTYPE_VARIANT
,
DBTYPE_DBTIMESTAMP
,
0
,
&
dst_len
,
&
var
,
&
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
(
!
memcmp
(
&
ts
,
&
dst
,
sizeof
(
ts
)),
"Wrong timestamp
\n
"
);
}
START_TEST
(
convert
)
{
HRESULT
hr
;
...
...
@@ -2638,6 +2658,7 @@ START_TEST(convert)
test_converttobytes
();
test_converttodbdate
();
test_getconversionsize
();
test_converttotimestamp
();
IDataConvert_Release
(
convert
);
...
...
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