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
d3c3a38f
Commit
d3c3a38f
authored
May 17, 2013
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
May 17, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oledb32: Support VT_NULL when converting to DBTYPE_BSTR.
parent
c8d4b1cc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
3 deletions
+20
-3
convert.c
dlls/oledb32/convert.c
+12
-3
convert.c
dlls/oledb32/tests/convert.c
+8
-0
No files found.
dlls/oledb32/convert.c
View file @
d3c3a38f
...
...
@@ -534,9 +534,18 @@ static HRESULT WINAPI convert_DataConvert(IDataConvert* iface,
}
break
;
case
DBTYPE_VARIANT
:
VariantInit
(
&
tmp
);
if
((
hr
=
VariantChangeType
(
&
tmp
,
(
VARIANT
*
)
src
,
0
,
VT_BSTR
))
==
S_OK
)
*
d
=
V_BSTR
(
&
tmp
);
if
(
V_VT
((
VARIANT
*
)
src
)
==
VT_NULL
)
{
*
dst_status
=
DBSTATUS_S_ISNULL
;
*
dst_len
=
get_length
(
DBTYPE_BSTR
);
return
S_OK
;
}
else
{
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
;
}
...
...
dlls/oledb32/tests/convert.c
View file @
d3c3a38f
...
...
@@ -977,6 +977,14 @@ static void test_converttobstr(void)
ok
(
!
lstrcmpW
(
b
,
dst
),
"got %s
\n
"
,
wine_dbgstr_w
(
dst
));
SysFreeString
(
dst
);
SysFreeString
(
b
);
V_VT
(
&
v
)
=
VT_NULL
;
dst
=
(
void
*
)
0x1234
;
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_ISNULL
,
"got %08x
\n
"
,
dst_status
);
ok
(
dst_len
==
sizeof
(
BSTR
),
"got %ld
\n
"
,
dst_len
);
ok
(
dst
==
(
void
*
)
0x1234
,
"got %p
\n
"
,
dst
);
}
static
void
test_converttowstr
(
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