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
15bb6bfa
Commit
15bb6bfa
authored
Apr 06, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 08, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oledb32: Implemented conversion from DBTYPE_VARIANT to DBTYPE_BSTR.
parent
0bbd6cb0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
convert.c
dlls/oledb32/convert.c
+9
-0
convert.c
dlls/oledb32/tests/convert.c
+14
-0
No files found.
dlls/oledb32/convert.c
View file @
15bb6bfa
...
...
@@ -503,6 +503,15 @@ static HRESULT WINAPI convert_DataConvert(IDataConvert* iface,
}
}
break
;
case
DBTYPE_VARIANT
:
{
VARIANT
tmp
;
VariantInit
(
&
tmp
);
if
((
hr
=
VariantChangeType
(
&
tmp
,
(
VARIANT
*
)
src
,
0
,
VT_BSTR
))
==
S_OK
)
*
d
=
V_BSTR
(
&
tmp
);
}
break
;
default:
FIXME
(
"Unimplemented conversion %04x -> BSTR
\n
"
,
src_type
);
return
E_NOTIMPL
;
}
break
;
...
...
dlls/oledb32/tests/convert.c
View file @
15bb6bfa
...
...
@@ -926,6 +926,7 @@ static void test_converttobstr(void)
DBSTATUS
dst_status
;
DBLENGTH
dst_len
;
static
const
WCHAR
ten
[]
=
{
'1'
,
'0'
,
0
};
VARIANT
v
;
BSTR
b
;
hr
=
CoCreateInstance
(
&
CLSID_OLEDB_CONVERSIONLIBRARY
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDataConvert
,
(
void
**
)
&
convert
);
...
...
@@ -972,6 +973,19 @@ static void test_converttobstr(void)
SysFreeString
(
dst
);
SysFreeString
(
b
);
b
=
SysAllocString
(
ten
);
V_VT
(
&
v
)
=
VT_BSTR
;
V_BSTR
(
&
v
)
=
b
;
hr
=
IDataConvert_DataConvert
(
convert
,
DBTYPE_VARIANT
,
DBTYPE_BSTR
,
0
,
&
dst_len
,
&
v
,
&
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
(
dst
),
"got %ld
\n
"
,
dst_len
);
ok
(
dst
!=
NULL
,
"got %p
\n
"
,
dst
);
ok
(
dst
!=
b
,
"got %p src %p
\n
"
,
dst
,
b
);
ok
(
!
lstrcmpW
(
b
,
dst
),
"got %s
\n
"
,
wine_dbgstr_w
(
dst
));
SysFreeString
(
dst
);
SysFreeString
(
b
);
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