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
d1f4e6a1
Commit
d1f4e6a1
authored
Apr 05, 2010
by
Alex Villacís Lasso
Committed by
Alexandre Julliard
Apr 06, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oledb32: Implement conversion from DBTYPE_GUID to DBTYPE_STR/DBTYPE_WSTR/DBTYPE_BSTR.
parent
75c053aa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
4 deletions
+18
-4
convert.c
dlls/oledb32/convert.c
+16
-0
convert.c
dlls/oledb32/tests/convert.c
+2
-4
No files found.
dlls/oledb32/convert.c
View file @
d1f4e6a1
...
...
@@ -336,6 +336,22 @@ static HRESULT WINAPI convert_DataConvert(IDataConvert* iface,
case
DBTYPE_UI4
:
hr
=
VarBstrFromUI4
(
*
(
DWORD
*
)
src
,
LOCALE_USER_DEFAULT
,
0
,
d
);
break
;
case
DBTYPE_I8
:
hr
=
VarBstrFromI8
(
*
(
LONGLONG
*
)
src
,
LOCALE_USER_DEFAULT
,
0
,
d
);
break
;
case
DBTYPE_UI8
:
hr
=
VarBstrFromUI8
(
*
(
ULONGLONG
*
)
src
,
LOCALE_USER_DEFAULT
,
0
,
d
);
break
;
case
DBTYPE_GUID
:
{
WCHAR
szBuff
[
39
];
const
GUID
*
id
=
(
const
GUID
*
)
src
;
WCHAR
format
[]
=
{
'{'
,
'%'
,
'0'
,
'8'
,
'X'
,
'-'
,
'%'
,
'0'
,
'4'
,
'X'
,
'-'
,
'%'
,
'0'
,
'4'
,
'X'
,
'-'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'-'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'}'
,
0
};
wsprintfW
(
szBuff
,
format
,
id
->
Data1
,
id
->
Data2
,
id
->
Data3
,
id
->
Data4
[
0
],
id
->
Data4
[
1
],
id
->
Data4
[
2
],
id
->
Data4
[
3
],
id
->
Data4
[
4
],
id
->
Data4
[
5
],
id
->
Data4
[
6
],
id
->
Data4
[
7
]
);
*
d
=
SysAllocString
(
szBuff
);
hr
=
*
d
?
S_OK
:
E_OUTOFMEMORY
;
}
break
;
default:
FIXME
(
"Unimplemented conversion %04x -> BSTR
\n
"
,
src_type
);
return
E_NOTIMPL
;
}
break
;
...
...
dlls/oledb32/tests/convert.c
View file @
d1f4e6a1
...
...
@@ -1240,12 +1240,11 @@ static void test_converttowstr(void)
memcpy
(
src
,
&
IID_IDataConvert
,
sizeof
(
GUID
));
memset
(
dst
,
0xcc
,
sizeof
(
dst
));
hr
=
IDataConvert_DataConvert
(
convert
,
DBTYPE_GUID
,
DBTYPE_WSTR
,
0
,
&
dst_len
,
src
,
&
dst
,
sizeof
(
dst
),
0
,
&
dst_status
,
0
,
0
,
0
);
todo_wine
{
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
dst_status
==
DBSTATUS_S_OK
,
"got %08x
\n
"
,
dst_status
);
ok
(
dst_len
==
76
,
"got %d
\n
"
,
dst_len
);
ok
(
!
lstrcmpW
(
dst
,
guid_str
),
"got %s
\n
"
,
wine_dbgstr_w
(
dst
));
}
b
=
SysAllocString
(
ten
);
...
...
@@ -1605,12 +1604,11 @@ static void test_converttostr(void)
memcpy
(
src
,
&
IID_IDataConvert
,
sizeof
(
GUID
));
memset
(
dst
,
0xcc
,
sizeof
(
dst
));
hr
=
IDataConvert_DataConvert
(
convert
,
DBTYPE_GUID
,
DBTYPE_STR
,
0
,
&
dst_len
,
src
,
&
dst
,
sizeof
(
dst
),
0
,
&
dst_status
,
0
,
0
,
0
);
todo_wine
{
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
dst_status
==
DBSTATUS_S_OK
,
"got %08x
\n
"
,
dst_status
);
ok
(
dst_len
==
38
,
"got %d
\n
"
,
dst_len
);
ok
(
!
lstrcmpA
(
dst
,
guid_str
),
"got %s
\n
"
,
dst
);
}
b
=
SysAllocString
(
ten
);
...
...
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