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
dd104f67
Commit
dd104f67
authored
Apr 19, 2013
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Apr 22, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oledb32: Implement GetConversionSize DBTYPE_WSTR->DBTYPE_WSTR.
parent
7f652810
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
0 deletions
+35
-0
convert.c
dlls/oledb32/convert.c
+16
-0
convert.c
dlls/oledb32/tests/convert.c
+19
-0
No files found.
dlls/oledb32/convert.c
View file @
dd104f67
...
@@ -1095,6 +1095,22 @@ static HRESULT WINAPI convert_GetConversionSize(IDataConvert* iface,
...
@@ -1095,6 +1095,22 @@ static HRESULT WINAPI convert_GetConversionSize(IDataConvert* iface,
}
}
}
}
break
;
break
;
case
DBTYPE_WSTR
:
{
switch
(
src_type
)
{
case
DBTYPE_WSTR
:
if
(
src_len
)
*
dst_len
=
(
*
src_len
)
+
sizeof
(
WCHAR
);
else
*
dst_len
=
(
lstrlenW
(
src
)
+
1
)
*
sizeof
(
WCHAR
);
break
;
default:
FIXME
(
"unimplemented for %04x -> DBTYPE_WSTR
\n
"
,
src_type
);
return
E_NOTIMPL
;
}
}
break
;
default:
default:
FIXME
(
"unimplemented for conversion %d->%d
\n
"
,
src_type
,
dst_type
);
FIXME
(
"unimplemented for conversion %d->%d
\n
"
,
src_type
,
dst_type
);
return
E_NOTIMPL
;
return
E_NOTIMPL
;
...
...
dlls/oledb32/tests/convert.c
View file @
dd104f67
...
@@ -2480,8 +2480,10 @@ static void test_getconversionsize(void)
...
@@ -2480,8 +2480,10 @@ static void test_getconversionsize(void)
{
{
IDataConvert
*
convert
;
IDataConvert
*
convert
;
DBLENGTH
dst_len
;
DBLENGTH
dst_len
;
DBLENGTH
src_len
;
HRESULT
hr
;
HRESULT
hr
;
BSTR
str
;
BSTR
str
;
static
WCHAR
strW
[]
=
{
't'
,
'e'
,
's'
,
't'
,
0
};
hr
=
CoCreateInstance
(
&
CLSID_OLEDB_CONVERSIONLIBRARY
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDataConvert
,
(
void
**
)
&
convert
);
hr
=
CoCreateInstance
(
&
CLSID_OLEDB_CONVERSIONLIBRARY
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDataConvert
,
(
void
**
)
&
convert
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
...
@@ -2511,6 +2513,23 @@ static void test_getconversionsize(void)
...
@@ -2511,6 +2513,23 @@ static void test_getconversionsize(void)
ok
(
dst_len
==
sizeof
(
VARIANT
),
"%ld
\n
"
,
dst_len
);
ok
(
dst_len
==
sizeof
(
VARIANT
),
"%ld
\n
"
,
dst_len
);
SysFreeString
(
str
);
SysFreeString
(
str
);
dst_len
=
0
;
hr
=
IDataConvert_GetConversionSize
(
convert
,
DBTYPE_WSTR
,
DBTYPE_WSTR
,
NULL
,
&
dst_len
,
strW
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
dst_len
==
10
,
"%ld
\n
"
,
dst_len
);
dst_len
=
0
;
src_len
=
2
;
hr
=
IDataConvert_GetConversionSize
(
convert
,
DBTYPE_WSTR
,
DBTYPE_WSTR
,
&
src_len
,
&
dst_len
,
strW
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
dst_len
==
4
,
"%ld
\n
"
,
dst_len
);
dst_len
=
0
;
src_len
=
20
;
hr
=
IDataConvert_GetConversionSize
(
convert
,
DBTYPE_WSTR
,
DBTYPE_WSTR
,
&
src_len
,
&
dst_len
,
strW
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
dst_len
==
22
,
"%ld
\n
"
,
dst_len
);
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