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
1d462aab
Commit
1d462aab
authored
Apr 11, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 11, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oledb32: Destination status and length are optional.
parent
8985e968
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
convert.c
dlls/oledb32/convert.c
+5
-1
convert.c
dlls/oledb32/tests/convert.c
+9
-0
No files found.
dlls/oledb32/convert.c
View file @
1d462aab
...
...
@@ -163,12 +163,17 @@ static HRESULT WINAPI convert_DataConvert(IDataConvert* iface,
DBDATACONVERT
flags
)
{
convert
*
This
=
impl_from_IDataConvert
(
iface
);
DBLENGTH
dst_len_loc
;
DBSTATUS
dst_status_loc
;
HRESULT
hr
;
TRACE
(
"(%p)->(%d, %d, %ld, %p, %p, %p, %ld, %d, %p, %d, %d, %x)
\n
"
,
This
,
src_type
,
dst_type
,
src_len
,
dst_len
,
src
,
dst
,
dst_max_len
,
src_status
,
dst_status
,
precision
,
scale
,
flags
);
if
(
!
dst_len
)
dst_len
=
&
dst_len_loc
;
if
(
!
dst_status
)
dst_status
=
&
dst_status_loc
;
*
dst_status
=
DBSTATUS_E_BADACCESSOR
;
if
(
IDataConvert_CanConvert
(
iface
,
src_type
,
dst_type
)
!=
S_OK
)
...
...
@@ -752,7 +757,6 @@ static HRESULT WINAPI convert_DataConvert(IDataConvert* iface,
default:
FIXME
(
"Unimplemented conversion %04x -> %04x
\n
"
,
src_type
,
dst_type
);
return
E_NOTIMPL
;
}
if
(
hr
==
DISP_E_OVERFLOW
)
...
...
dlls/oledb32/tests/convert.c
View file @
1d462aab
...
...
@@ -2491,6 +2491,7 @@ static void test_converttovar(void)
V_VT
(
&
dst
)
=
VT_EMPTY
;
dst_len
=
0
;
dst_status
=
DBSTATUS_S_DEFAULT
;
hr
=
IDataConvert_DataConvert
(
convert
,
DBTYPE_WSTR
,
DBTYPE_VARIANT
,
sizeof
(
strW
),
&
dst_len
,
strW
,
&
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
);
...
...
@@ -2499,6 +2500,14 @@ static void test_converttovar(void)
ok
(
!
lstrcmpW
(
V_BSTR
(
&
dst
),
strW
),
"got %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
dst
)));
VariantClear
(
&
dst
);
/* with null dest length and status */
V_VT
(
&
dst
)
=
VT_EMPTY
;
hr
=
IDataConvert_DataConvert
(
convert
,
DBTYPE_WSTR
,
DBTYPE_VARIANT
,
sizeof
(
strW
),
NULL
,
strW
,
&
dst
,
sizeof
(
dst
),
0
,
NULL
,
0
,
0
,
0
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
V_VT
(
&
dst
)
==
VT_BSTR
,
"got %d
\n
"
,
V_VT
(
&
dst
));
ok
(
!
lstrcmpW
(
V_BSTR
(
&
dst
),
strW
),
"got %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
dst
)));
VariantClear
(
&
dst
);
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