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
40fcf667
Commit
40fcf667
authored
May 30, 2013
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
May 30, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oledb32: Implement GetConversionSize, DBTYPE_VARIANT(VT_ARRAY|VT_UI1)->DBTYPE_BYTES.
parent
a0b8d304
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
0 deletions
+32
-0
convert.c
dlls/oledb32/convert.c
+17
-0
convert.c
dlls/oledb32/tests/convert.c
+15
-0
No files found.
dlls/oledb32/convert.c
View file @
40fcf667
...
...
@@ -1364,7 +1364,24 @@ static HRESULT WINAPI convert_GetConversionSize(IDataConvert* iface,
if
(
V_VT
((
VARIANT
*
)
src
)
==
VT_BSTR
)
*
dst_len
=
(
SysStringLen
(
V_BSTR
((
VARIANT
*
)
src
)))
/
sizeof
(
WCHAR
);
else
{
switch
(
V_VT
((
VARIANT
*
)
src
))
{
case
VT_UI1
|
VT_ARRAY
:
{
LONG
l
;
hr
=
SafeArrayGetUBound
(
V_ARRAY
((
VARIANT
*
)
src
),
1
,
&
l
);
if
(
FAILED
(
hr
))
return
hr
;
*
dst_len
=
l
+
1
;
break
;
}
default:
WARN
(
"DBTYPE_VARIANT(%d)->DBTYPE_BYTES unimplemented
\n
"
,
V_VT
((
VARIANT
*
)
src
));
}
}
break
;
default:
FIXME
(
"unimplemented for %04x -> DBTYPE_BYTES
\n
"
,
src_type
);
...
...
dlls/oledb32/tests/convert.c
View file @
40fcf667
...
...
@@ -2382,6 +2382,8 @@ static void test_getconversionsize(void)
static
WCHAR
strW
[]
=
{
't'
,
'e'
,
's'
,
't'
,
0
};
static
char
strTest
[]
=
"test"
;
VARIANT
var
;
SAFEARRAY
*
psa
=
NULL
;
SAFEARRAYBOUND
rgsabound
[
1
];
/* same way as CanConvert fails here */
dst_len
=
0
;
...
...
@@ -2478,6 +2480,19 @@ static void test_getconversionsize(void)
hr
=
IDataConvert_GetConversionSize
(
convert
,
DBTYPE_VARIANT
,
DBTYPE_BYTES
,
&
src_len
,
&
dst_len
,
&
var
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
VariantClear
(
&
var
);
dst_len
=
0
;
src_len
=
20
;
rgsabound
[
0
].
lLbound
=
0
;
rgsabound
[
0
].
cElements
=
1802
;
psa
=
SafeArrayCreate
(
VT_UI1
,
1
,
rgsabound
);
V_VT
(
&
var
)
=
VT_ARRAY
|
VT_UI1
;
V_ARRAY
(
&
var
)
=
psa
;
hr
=
IDataConvert_GetConversionSize
(
convert
,
DBTYPE_VARIANT
,
DBTYPE_BYTES
,
&
src_len
,
&
dst_len
,
&
var
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
dst_len
==
1802
,
"%ld
\n
"
,
dst_len
);
VariantClear
(
&
var
);
}
static
void
test_converttobytes
(
void
)
...
...
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