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
109db990
Commit
109db990
authored
Nov 17, 2021
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Nov 17, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msdasql: Implement IGetDataSource GetDataSource.
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fbca1266
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
6 deletions
+20
-6
msdasql_main.c
dlls/msdasql/msdasql_main.c
+1
-1
msdasql_private.h
dlls/msdasql/msdasql_private.h
+1
-1
session.c
dlls/msdasql/session.c
+12
-3
provider.c
dlls/msdasql/tests/provider.c
+6
-1
No files found.
dlls/msdasql/msdasql_main.c
View file @
109db990
...
...
@@ -559,7 +559,7 @@ static HRESULT WINAPI dbsess_CreateSession(IDBCreateSession *iface, IUnknown *ou
if
(
outer
)
FIXME
(
"outer currently not supported.
\n
"
);
hr
=
create_db_session
(
riid
,
(
void
**
)
session
);
hr
=
create_db_session
(
riid
,
&
provider
->
MSDASQL_iface
,
(
void
**
)
session
);
return
hr
;
}
...
...
dlls/msdasql/msdasql_private.h
View file @
109db990
...
...
@@ -16,4 +16,4 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
HRESULT
create_db_session
(
REFIID
riid
,
void
**
unk
)
DECLSPEC_HIDDEN
;
HRESULT
create_db_session
(
REFIID
riid
,
IUnknown
*
datasource
,
void
**
unk
)
DECLSPEC_HIDDEN
;
dlls/msdasql/session.c
View file @
109db990
...
...
@@ -43,6 +43,8 @@ struct msdasql_session
ISessionProperties
ISessionProperties_iface
;
IDBCreateCommand
IDBCreateCommand_iface
;
LONG
refs
;
IUnknown
*
datasource
;
};
static
inline
struct
msdasql_session
*
impl_from_IUnknown
(
IUnknown
*
iface
)
...
...
@@ -139,6 +141,8 @@ static ULONG WINAPI session_Release(IUnknown *iface)
if
(
!
refs
)
{
TRACE
(
"destroying %p
\n
"
,
session
);
IUnknown_Release
(
session
->
datasource
);
heap_free
(
session
);
}
return
refs
;
...
...
@@ -173,9 +177,13 @@ ULONG WINAPI datasource_Release(IGetDataSource *iface)
HRESULT
WINAPI
datasource_GetDataSource
(
IGetDataSource
*
iface
,
REFIID
riid
,
IUnknown
**
datasource
)
{
struct
msdasql_session
*
session
=
impl_from_IGetDataSource
(
iface
);
FIXME
(
"%p, %s, %p stub
\n
"
,
session
,
debugstr_guid
(
riid
),
datasource
);
return
E_NOTIMPL
;
TRACE
(
"%p, %s, %p stub
\n
"
,
session
,
debugstr_guid
(
riid
),
datasource
);
if
(
!
datasource
)
return
E_INVALIDARG
;
return
IUnknown_QueryInterface
(
session
->
datasource
,
riid
,
(
void
**
)
datasource
);
}
static
const
IGetDataSourceVtbl
datasourceVtbl
=
...
...
@@ -1155,7 +1163,7 @@ static const IDBCreateCommandVtbl createcommandVtbl =
createcommand_CreateCommand
};
HRESULT
create_db_session
(
REFIID
riid
,
void
**
unk
)
HRESULT
create_db_session
(
REFIID
riid
,
IUnknown
*
datasource
,
void
**
unk
)
{
struct
msdasql_session
*
session
;
HRESULT
hr
;
...
...
@@ -1169,6 +1177,7 @@ HRESULT create_db_session(REFIID riid, void **unk)
session
->
IOpenRowset_iface
.
lpVtbl
=
&
openrowsetVtbl
;
session
->
ISessionProperties_iface
.
lpVtbl
=
&
propertiesVtbl
;
session
->
IDBCreateCommand_iface
.
lpVtbl
=
&
createcommandVtbl
;
IUnknown_QueryInterface
(
datasource
,
&
IID_IUnknown
,
(
void
**
)
&
session
->
datasource
);
session
->
refs
=
1
;
hr
=
IUnknown_QueryInterface
(
&
session
->
session_iface
,
riid
,
unk
);
...
...
dlls/msdasql/tests/provider.c
View file @
109db990
...
...
@@ -399,7 +399,7 @@ static void test_command_rowset(IUnknown *cmd)
static
void
test_sessions
(
void
)
{
IDBProperties
*
props
;
IDBProperties
*
props
,
*
dsource
=
NULL
;
IDBInitialize
*
dbinit
=
NULL
;
IDataInitialize
*
datainit
;
IDBCreateSession
*
dbsession
=
NULL
;
...
...
@@ -456,6 +456,11 @@ static void test_sessions(void)
hr
=
IUnknown_QueryInterface
(
session
,
&
IID_IGetDataSource
,
(
void
**
)
&
datasource
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IGetDataSource_GetDataSource
(
datasource
,
&
IID_IDBProperties
,
(
IUnknown
**
)
&
dsource
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
dsource
==
props
,
"different pointers
\n
"
);
IDBProperties_Release
(
dsource
);
IGetDataSource_Release
(
datasource
);
hr
=
IUnknown_QueryInterface
(
session
,
&
IID_ITransactionJoin
,
(
void
**
)
&
join
);
...
...
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