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
338cb2e5
Commit
338cb2e5
authored
May 24, 2013
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
May 27, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oledb32: GetConversionSize only returns a valid size of BSTR.
parent
0fe64ce3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
27 deletions
+8
-27
convert.c
dlls/oledb32/convert.c
+8
-26
convert.c
dlls/oledb32/tests/convert.c
+0
-1
No files found.
dlls/oledb32/convert.c
View file @
338cb2e5
...
...
@@ -1305,7 +1305,6 @@ static HRESULT WINAPI convert_GetConversionSize(IDataConvert* iface,
switch
(
dst_type
)
{
case
DBTYPE_STR
:
{
switch
(
src_type
)
{
case
DBTYPE_VARIANT
:
...
...
@@ -1326,26 +1325,16 @@ static HRESULT WINAPI convert_GetConversionSize(IDataConvert* iface,
FIXME
(
"unimplemented for %04x -> DBTYPE_STR
\n
"
,
src_type
);
return
E_NOTIMPL
;
}
}
break
;
break
;
case
DBTYPE_WSTR
:
{
switch
(
src_type
)
{
case
DBTYPE_VARIANT
:
{
VARIANT
v
;
VariantInit
(
&
v
);
if
((
hr
=
VariantChangeType
(
&
v
,
(
VARIANT
*
)
src
,
0
,
VT_BSTR
))
==
S_OK
)
{
*
dst_len
=
(
SysStringLen
(
V_BSTR
(
&
v
))
+
1
)
*
sizeof
(
WCHAR
);
VariantClear
(
&
v
);
}
if
(
V_VT
((
VARIANT
*
)
src
)
==
VT_BSTR
)
*
dst_len
=
(
SysStringLen
(
V_BSTR
((
VARIANT
*
)
src
))
+
1
)
*
sizeof
(
WCHAR
);
else
return
hr
;
}
break
;
WARN
(
"DBTYPE_BYTES->DBTYPE_VARIANT(%d) unimplemented
\n
"
,
V_VT
((
VARIANT
*
)
src
));
break
;
case
DBTYPE_STR
:
if
(
src_len
)
*
dst_len
=
(
*
src_len
+
1
)
*
sizeof
(
WCHAR
);
...
...
@@ -1362,28 +1351,21 @@ static HRESULT WINAPI convert_GetConversionSize(IDataConvert* iface,
FIXME
(
"unimplemented for %04x -> DBTYPE_WSTR
\n
"
,
src_type
);
return
E_NOTIMPL
;
}
}
break
;
break
;
case
DBTYPE_BYTES
:
{
switch
(
src_type
)
{
case
DBTYPE_VARIANT
:
{
if
(
V_VT
((
VARIANT
*
)
src
)
==
VT_BSTR
)
*
dst_len
=
(
SysStringLen
(
V_BSTR
((
VARIANT
*
)
src
)))
/
sizeof
(
WCHAR
);
else
WARN
(
"DBTYPE_BYTES->DBTYPE_VARIANT(%d) unimplemented
\n
"
,
V_VT
((
VARIANT
*
)
src
));
return
S_OK
;
}
break
;
break
;
default:
FIXME
(
"unimplemented for %04x -> DBTYPE_BYTES
\n
"
,
src_type
);
return
E_NOTIMPL
;
}
}
break
;
break
;
default:
FIXME
(
"unimplemented for conversion %d->%d
\n
"
,
src_type
,
dst_type
);
return
E_NOTIMPL
;
...
...
dlls/oledb32/tests/convert.c
View file @
338cb2e5
...
...
@@ -2461,7 +2461,6 @@ static void test_getconversionsize(void)
V_I4
(
&
var
)
=
4
;
hr
=
IDataConvert_GetConversionSize
(
convert
,
DBTYPE_VARIANT
,
DBTYPE_WSTR
,
&
src_len
,
&
dst_len
,
&
var
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
todo_wine
ok
(
dst_len
==
110
,
"%ld
\n
"
,
dst_len
);
VariantClear
(
&
var
);
dst_len
=
0
;
...
...
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