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
c476d178
Commit
c476d178
authored
Apr 18, 2013
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
May 14, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oledb32: Implement DataConvert DBTYPE_BYTES->DBTYPE_BYTES.
parent
3dea8a69
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
0 deletions
+44
-0
convert.c
dlls/oledb32/convert.c
+20
-0
convert.c
dlls/oledb32/tests/convert.c
+24
-0
No files found.
dlls/oledb32/convert.c
View file @
c476d178
...
@@ -794,6 +794,26 @@ static HRESULT WINAPI convert_DataConvert(IDataConvert* iface,
...
@@ -794,6 +794,26 @@ static HRESULT WINAPI convert_DataConvert(IDataConvert* iface,
}
}
break
;
break
;
}
}
case
DBTYPE_BYTES
:
{
BYTE
*
d
=
dst
;
switch
(
src_type
)
{
case
DBTYPE_BYTES
:
if
(
src_len
>
dst_max_len
)
*
dst_status
=
DBSTATUS_S_TRUNCATED
;
else
*
dst_status
=
DBSTATUS_S_OK
;
*
dst_len
=
src_len
;
memcpy
(
d
,
src
,
min
(
src_len
,
dst_max_len
));
return
S_OK
;
default:
FIXME
(
"Unimplemented conversion %04x -> DBTYPE_BYTES
\n
"
,
src_type
);
return
E_NOTIMPL
;
}
break
;
}
default:
default:
FIXME
(
"Unimplemented conversion %04x -> %04x
\n
"
,
src_type
,
dst_type
);
FIXME
(
"Unimplemented conversion %04x -> %04x
\n
"
,
src_type
,
dst_type
);
...
...
dlls/oledb32/tests/convert.c
View file @
c476d178
...
@@ -2424,6 +2424,29 @@ static void test_getconversionsize(void)
...
@@ -2424,6 +2424,29 @@ static void test_getconversionsize(void)
}
}
static
void
test_converttobytes
(
void
)
{
DBLENGTH
dst_len
;
HRESULT
hr
;
BYTE
byte_src
[]
=
{
0
,
1
,
2
,
4
,
5
};
BYTE
dst
[
10
]
=
{
0
};
DBSTATUS
dst_status
;
dst_len
=
0
;
hr
=
IDataConvert_DataConvert
(
convert
,
DBTYPE_BYTES
,
DBTYPE_BYTES
,
sizeof
(
byte_src
),
&
dst_len
,
byte_src
,
&
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
(
byte_src
),
"got %ld
\n
"
,
dst_len
);
ok
(
!
memcmp
(
byte_src
,
dst
,
dst_len
),
"bytes differ
\n
"
);
dst_len
=
0
;
hr
=
IDataConvert_DataConvert
(
convert
,
DBTYPE_BYTES
,
DBTYPE_BYTES
,
sizeof
(
byte_src
),
&
dst_len
,
byte_src
,
&
dst
,
2
,
0
,
&
dst_status
,
0
,
0
,
0
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
dst_status
==
DBSTATUS_S_TRUNCATED
,
"got %08x
\n
"
,
dst_status
);
ok
(
dst_len
==
sizeof
(
byte_src
),
"got %ld
\n
"
,
dst_len
);
ok
(
!
memcmp
(
byte_src
,
dst
,
2
),
"bytes differ
\n
"
);
}
static
void
test_converttovar
(
void
)
static
void
test_converttovar
(
void
)
{
{
static
WCHAR
strW
[]
=
{
't'
,
'e'
,
's'
,
't'
,
0
};
static
WCHAR
strW
[]
=
{
't'
,
'e'
,
's'
,
't'
,
0
};
...
@@ -2559,6 +2582,7 @@ START_TEST(convert)
...
@@ -2559,6 +2582,7 @@ START_TEST(convert)
test_converttocy
();
test_converttocy
();
test_converttoui8
();
test_converttoui8
();
test_converttovar
();
test_converttovar
();
test_converttobytes
();
test_getconversionsize
();
test_getconversionsize
();
IDataConvert_Release
(
convert
);
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