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
72845af0
Commit
72845af0
authored
May 23, 2013
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
May 23, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oledb32: Implement DataConvert DBTYPE_BYTES->DBTYPE_BYTES | DBTYPE_BYREF.
parent
0d6eadc4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
0 deletions
+37
-0
convert.c
dlls/oledb32/convert.c
+19
-0
convert.c
dlls/oledb32/tests/convert.c
+18
-0
No files found.
dlls/oledb32/convert.c
View file @
72845af0
...
...
@@ -957,6 +957,25 @@ static HRESULT WINAPI convert_DataConvert(IDataConvert* iface,
}
break
;
}
case
DBTYPE_BYTES
|
DBTYPE_BYREF
:
{
BYTE
**
d
=
dst
;
switch
(
src_type
)
{
case
DBTYPE_BYTES
:
*
d
=
CoTaskMemAlloc
(
src_len
);
if
(
*
d
)
memcpy
(
*
d
,
src
,
src_len
);
else
hr
=
E_OUTOFMEMORY
;
*
dst_len
=
src_len
;
*
dst_status
=
DBSTATUS_S_OK
;
return
S_OK
;
default:
FIXME
(
"Unimplemented conversion %04x -> DBTYPE_BYTES | DBTYPE_BYREF
\n
"
,
src_type
);
return
E_NOTIMPL
;
}
break
;
}
break
;
default:
FIXME
(
"Unimplemented conversion %04x -> %04x
\n
"
,
src_type
,
dst_type
);
...
...
dlls/oledb32/tests/convert.c
View file @
72845af0
...
...
@@ -2463,6 +2463,23 @@ static void test_converttobytes(void)
ok
(
!
memcmp
(
byte_src
,
dst
,
2
),
"bytes differ
\n
"
);
}
static
void
test_converttobytesbyref
(
void
)
{
DBLENGTH
dst_len
;
HRESULT
hr
;
BYTE
byte_src
[]
=
{
0
,
1
,
2
,
4
,
5
};
BYTE
*
dst
;
DBSTATUS
dst_status
;
dst_len
=
0
;
hr
=
IDataConvert_DataConvert
(
convert
,
DBTYPE_BYTES
,
DBTYPE_BYTES
|
DBTYPE_BYREF
,
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
"
);
CoTaskMemFree
(
dst
);
}
static
void
test_converttodbdate
(
void
)
{
DBLENGTH
dst_len
;
...
...
@@ -2693,6 +2710,7 @@ START_TEST(convert)
test_converttoui8
();
test_converttovar
();
test_converttobytes
();
test_converttobytesbyref
();
test_converttodbdate
();
test_getconversionsize
();
test_converttotimestamp
();
...
...
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