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
f5d64e06
Commit
f5d64e06
authored
Apr 18, 2013
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Apr 25, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oledb32: Implement DataConvert DBTYPE_VARIANT->DBTYPE_UI4.
parent
736a4239
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
7 deletions
+16
-7
convert.c
dlls/oledb32/convert.c
+7
-7
convert.c
dlls/oledb32/tests/convert.c
+9
-0
No files found.
dlls/oledb32/convert.c
View file @
f5d64e06
...
...
@@ -165,6 +165,7 @@ static HRESULT WINAPI convert_DataConvert(IDataConvert* iface,
convert
*
This
=
impl_from_IDataConvert
(
iface
);
DBLENGTH
dst_len_loc
;
DBSTATUS
dst_status_loc
;
VARIANT
tmp
;
HRESULT
hr
;
TRACE
(
"(%p)->(%d, %d, %ld, %p, %p, %p, %ld, %d, %p, %d, %d, %x)
\n
"
,
This
,
...
...
@@ -226,7 +227,6 @@ static HRESULT WINAPI convert_DataConvert(IDataConvert* iface,
case
DBTYPE_I2
:
{
signed
short
*
d
=
dst
;
VARIANT
tmp
;
switch
(
src_type
)
{
case
DBTYPE_EMPTY
:
*
d
=
0
;
hr
=
S_OK
;
break
;
...
...
@@ -258,7 +258,6 @@ static HRESULT WINAPI convert_DataConvert(IDataConvert* iface,
case
DBTYPE_I4
:
{
signed
int
*
d
=
dst
;
VARIANT
tmp
;
switch
(
src_type
)
{
case
DBTYPE_EMPTY
:
*
d
=
0
;
hr
=
S_OK
;
break
;
...
...
@@ -523,14 +522,10 @@ 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
;
break
;
default:
FIXME
(
"Unimplemented conversion %04x -> BSTR
\n
"
,
src_type
);
return
E_NOTIMPL
;
}
break
;
...
...
@@ -608,6 +603,11 @@ static HRESULT WINAPI convert_DataConvert(IDataConvert* iface,
case
DBTYPE_UI4
:
*
d
=
*
(
DWORD
*
)
src
;
hr
=
S_OK
;
break
;
case
DBTYPE_I8
:
hr
=
VarUI4FromI8
(
*
(
LONGLONG
*
)
src
,
d
);
break
;
case
DBTYPE_UI8
:
hr
=
VarUI4FromUI8
(
*
(
ULONGLONG
*
)
src
,
d
);
break
;
case
DBTYPE_VARIANT
:
VariantInit
(
&
tmp
);
if
((
hr
=
VariantChangeType
(
&
tmp
,
(
VARIANT
*
)
src
,
0
,
VT_UI4
))
==
S_OK
)
*
d
=
V_UI4
(
&
tmp
);
break
;
default:
FIXME
(
"Unimplemented conversion %04x -> UI4
\n
"
,
src_type
);
return
E_NOTIMPL
;
}
break
;
...
...
dlls/oledb32/tests/convert.c
View file @
f5d64e06
...
...
@@ -2303,6 +2303,15 @@ todo_wine
ok
(
broken
(
dst_len
==
sizeof
(
dst
))
||
dst_len
==
0x1234
/* W2K+ */
,
"got %ld
\n
"
,
dst_len
);
ok
(
dst
==
0x12345678
,
"got %08x
\n
"
,
dst
);
dst_len
=
dst
=
0x1234
;
V_VT
((
VARIANT
*
)
src
)
=
VT_I2
;
V_I2
((
VARIANT
*
)
src
)
=
0x4321
;
hr
=
IDataConvert_DataConvert
(
convert
,
DBTYPE_VARIANT
,
DBTYPE_UI4
,
0
,
&
dst_len
,
src
,
&
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
==
0x4321
,
"got %08x
\n
"
,
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