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
0fe64ce3
Commit
0fe64ce3
authored
May 21, 2013
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
May 27, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oledb32: Implement GetConversionSize DBTYPE_VARIANT -> DBTYPE_BYTES.
parent
5b8a375a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
1 deletion
+37
-1
convert.c
dlls/oledb32/convert.c
+22
-1
convert.c
dlls/oledb32/tests/convert.c
+15
-0
No files found.
dlls/oledb32/convert.c
View file @
0fe64ce3
...
...
@@ -121,7 +121,7 @@ static int get_length(DBTYPE type)
case
DBTYPE_UI2
:
return
2
;
case
DBTYPE_BOOL
:
return
sizeof
(
VARIANT_BOOL
);
return
sizeof
(
VARIANT_BOOL
);
case
DBTYPE_I4
:
case
DBTYPE_UI4
:
case
DBTYPE_R4
:
...
...
@@ -143,6 +143,7 @@ static int get_length(DBTYPE type)
return
sizeof
(
FILETIME
);
case
DBTYPE_GUID
:
return
sizeof
(
GUID
);
case
DBTYPE_BYTES
:
case
DBTYPE_WSTR
:
case
DBTYPE_STR
:
case
DBTYPE_BYREF
|
DBTYPE_WSTR
:
...
...
@@ -1363,6 +1364,26 @@ static HRESULT WINAPI convert_GetConversionSize(IDataConvert* iface,
}
}
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
;
default:
FIXME
(
"unimplemented for %04x -> DBTYPE_BYTES
\n
"
,
src_type
);
return
E_NOTIMPL
;
}
}
break
;
default:
FIXME
(
"unimplemented for conversion %d->%d
\n
"
,
src_type
,
dst_type
);
return
E_NOTIMPL
;
...
...
dlls/oledb32/tests/convert.c
View file @
0fe64ce3
...
...
@@ -2464,6 +2464,21 @@ static void test_getconversionsize(void)
todo_wine
ok
(
dst_len
==
110
,
"%ld
\n
"
,
dst_len
);
VariantClear
(
&
var
);
dst_len
=
0
;
src_len
=
20
;
V_VT
(
&
var
)
=
VT_BSTR
;
V_BSTR
(
&
var
)
=
SysAllocString
(
strW
);
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
==
2
,
"%ld
\n
"
,
dst_len
);
VariantClear
(
&
var
);
dst_len
=
0
;
src_len
=
20
;
V_VT
(
&
var
)
=
VT_NULL
;
hr
=
IDataConvert_GetConversionSize
(
convert
,
DBTYPE_VARIANT
,
DBTYPE_BYTES
,
&
src_len
,
&
dst_len
,
&
var
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
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