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
3a1f5224
Commit
3a1f5224
authored
Mar 28, 2023
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Mar 30, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msado15: Handle DBTYPE_STR type when loading recordset data.
parent
58e6c4d1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
recordset.c
dlls/msado15/recordset.c
+25
-0
No files found.
dlls/msado15/recordset.c
View file @
3a1f5224
...
...
@@ -970,6 +970,22 @@ static HRESULT map_index( struct fields *fields, VARIANT *index, ULONG *ret )
return
MAKE_ADO_HRESULT
(
adErrItemNotFound
);
}
static
inline
WCHAR
*
heap_strdupAtoW
(
const
char
*
str
)
{
LPWSTR
ret
=
NULL
;
if
(
str
)
{
DWORD
len
;
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
-
1
,
NULL
,
0
);
ret
=
malloc
(
len
*
sizeof
(
WCHAR
));
if
(
ret
)
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
-
1
,
ret
,
len
);
}
return
ret
;
}
static
HRESULT
WINAPI
fields_get_Item
(
Fields
*
iface
,
VARIANT
index
,
Field
**
obj
)
{
struct
fields
*
fields
=
impl_from_Fields
(
iface
);
...
...
@@ -1948,6 +1964,15 @@ static HRESULT load_all_recordset_data(struct recordset *recordset, IUnknown *ro
case
DBTYPE_I4
:
V_I4
(
&
copy
)
=
*
(
LONG
*
)(
data
+
bindings
[
datacol
].
obValue
);
break
;
case
DBTYPE_STR
:
{
WCHAR
*
str
=
heap_strdupAtoW
(
(
char
*
)(
data
+
bindings
[
datacol
].
obValue
)
);
V_VT
(
&
copy
)
=
VT_BSTR
;
V_BSTR
(
&
copy
)
=
SysAllocString
(
str
);
free
(
str
);
break
;
}
case
DBTYPE_WSTR
:
{
V_VT
(
&
copy
)
=
VT_BSTR
;
...
...
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