Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
0a5af716
Commit
0a5af716
authored
May 16, 2013
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
May 16, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oledb32: Implement DataConvert DBTYPE_DBDATE->DBTYPE_DBDATE.
parent
cc2ac078
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
0 deletions
+31
-0
convert.c
dlls/oledb32/convert.c
+12
-0
convert.c
dlls/oledb32/tests/convert.c
+19
-0
No files found.
dlls/oledb32/convert.c
View file @
0a5af716
...
...
@@ -131,6 +131,8 @@ static int get_length(DBTYPE type)
case
DBTYPE_R8
:
case
DBTYPE_DATE
:
return
8
;
case
DBTYPE_DBDATE
:
return
sizeof
(
DBDATE
);
case
DBTYPE_DBTIMESTAMP
:
return
sizeof
(
DBTIMESTAMP
);
case
DBTYPE_CY
:
...
...
@@ -413,6 +415,16 @@ static HRESULT WINAPI convert_DataConvert(IDataConvert* iface,
}
break
;
}
case
DBTYPE_DBDATE
:
{
DBDATE
*
d
=
dst
;
switch
(
src_type
)
{
case
DBTYPE_DBDATE
:
memcpy
(
d
,
src
,
sizeof
(
DBDATE
));
hr
=
S_OK
;
break
;
default:
FIXME
(
"Unimplemented conversion %04x -> DBDATE
\n
"
,
src_type
);
return
E_NOTIMPL
;
}
break
;
}
case
DBTYPE_DBTIMESTAMP
:
{
DBTIMESTAMP
*
d
=
dst
;
...
...
dlls/oledb32/tests/convert.c
View file @
0a5af716
...
...
@@ -2447,6 +2447,24 @@ static void test_converttobytes(void)
ok
(
!
memcmp
(
byte_src
,
dst
,
2
),
"bytes differ
\n
"
);
}
static
void
test_converttodbdate
(
void
)
{
DBLENGTH
dst_len
;
HRESULT
hr
;
DBDATE
ts
=
{
2013
,
5
,
14
};
DBDATE
dst
;
DBSTATUS
dst_status
;
dst_len
=
0
;
hr
=
IDataConvert_DataConvert
(
convert
,
DBTYPE_DBDATE
,
DBTYPE_DBDATE
,
sizeof
(
ts
),
&
dst_len
,
&
ts
,
&
dst
,
2
,
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
(
DBDATE
),
"got %ld
\n
"
,
dst_len
);
ok
(
!
memcmp
(
&
ts
,
&
dst
,
sizeof
(
DBDATE
)
),
"bytes differ
\n
"
);
}
static
void
test_converttovar
(
void
)
{
static
WCHAR
strW
[]
=
{
't'
,
'e'
,
's'
,
't'
,
0
};
...
...
@@ -2601,6 +2619,7 @@ START_TEST(convert)
test_converttoui8
();
test_converttovar
();
test_converttobytes
();
test_converttodbdate
();
test_getconversionsize
();
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