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
e06cdb62
Commit
e06cdb62
authored
Apr 16, 2013
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Apr 16, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oledb32: Implement DataConvert DBTYPE_BSTR->DBTYPE_I8.
parent
975f1dcd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
convert.c
dlls/oledb32/convert.c
+1
-0
convert.c
dlls/oledb32/tests/convert.c
+13
-0
No files found.
dlls/oledb32/convert.c
View file @
e06cdb62
...
...
@@ -292,6 +292,7 @@ static HRESULT WINAPI convert_DataConvert(IDataConvert* iface,
LONGLONG
*
d
=
dst
;
switch
(
src_type
)
{
case
DBTYPE_BSTR
:
hr
=
VarI8FromStr
(
*
(
WCHAR
**
)
src
,
LOCALE_USER_DEFAULT
,
0
,
d
);
break
;
case
DBTYPE_I8
:
*
d
=
*
(
LONGLONG
*
)
src
;
hr
=
S_OK
;
break
;
default:
FIXME
(
"Unimplemented conversion %04x -> I8
\n
"
,
src_type
);
return
E_NOTIMPL
;
}
...
...
dlls/oledb32/tests/convert.c
View file @
e06cdb62
...
...
@@ -925,6 +925,8 @@ static void test_converttoi8(void)
BYTE
src
[
20
];
DBSTATUS
dst_status
;
DBLENGTH
dst_len
;
static
const
WCHAR
ten
[]
=
{
'1'
,
'0'
,
0
};
BSTR
b
;
hr
=
CoCreateInstance
(
&
CLSID_OLEDB_CONVERSIONLIBRARY
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDataConvert
,
(
void
**
)
&
convert
);
if
(
FAILED
(
hr
))
...
...
@@ -942,6 +944,17 @@ static void test_converttoi8(void)
ok
(
dst_len
==
sizeof
(
dst
),
"got %ld
\n
"
,
dst_len
);
ok
(
dst
.
QuadPart
==
1234
,
"got %d
\n
"
,
(
int
)
dst
.
QuadPart
);
dst
.
QuadPart
=
0xcc
;
((
ULARGE_INTEGER
*
)
src
)
->
QuadPart
=
1234
;
b
=
SysAllocString
(
ten
);
*
(
BSTR
*
)
src
=
b
;
hr
=
IDataConvert_DataConvert
(
convert
,
DBTYPE_BSTR
,
DBTYPE_I8
,
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
.
QuadPart
==
10
,
"got %d
\n
"
,
(
int
)
dst
.
QuadPart
);
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