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
2f4e22d0
Commit
2f4e22d0
authored
Oct 28, 2021
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Oct 28, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msdasql: Add ISessionProperties to session.
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4ba940af
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
0 deletions
+63
-0
session.c
dlls/msdasql/session.c
+58
-0
provider.c
dlls/msdasql/tests/provider.c
+5
-0
No files found.
dlls/msdasql/session.c
View file @
2f4e22d0
...
...
@@ -39,6 +39,7 @@ struct msdasql_session
IUnknown
session_iface
;
IGetDataSource
IGetDataSource_iface
;
IOpenRowset
IOpenRowset_iface
;
ISessionProperties
ISessionProperties_iface
;
LONG
refs
;
};
...
...
@@ -57,6 +58,11 @@ static inline struct msdasql_session *impl_from_IOpenRowset( IOpenRowset *iface
return
CONTAINING_RECORD
(
iface
,
struct
msdasql_session
,
IOpenRowset_iface
);
}
static
inline
struct
msdasql_session
*
impl_from_ISessionProperties
(
ISessionProperties
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
msdasql_session
,
ISessionProperties_iface
);
}
static
HRESULT
WINAPI
session_QueryInterface
(
IUnknown
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
struct
msdasql_session
*
session
=
impl_from_IUnknown
(
iface
);
...
...
@@ -79,6 +85,11 @@ static HRESULT WINAPI session_QueryInterface(IUnknown *iface, REFIID riid, void
TRACE
(
"(%p)->(IID_IOpenRowset %p)
\n
"
,
iface
,
ppv
);
*
ppv
=
&
session
->
IOpenRowset_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_ISessionProperties
,
riid
))
{
TRACE
(
"(%p)->(IID_ISessionProperties %p)
\n
"
,
iface
,
ppv
);
*
ppv
=
&
session
->
ISessionProperties_iface
;
}
if
(
*
ppv
)
{
...
...
@@ -189,6 +200,52 @@ static const IOpenRowsetVtbl openrowsetVtbl =
openrowset_OpenRowset
};
static
HRESULT
WINAPI
properties_QueryInterface
(
ISessionProperties
*
iface
,
REFIID
riid
,
void
**
out
)
{
struct
msdasql_session
*
session
=
impl_from_ISessionProperties
(
iface
);
return
IUnknown_QueryInterface
(
&
session
->
session_iface
,
riid
,
out
);
}
static
ULONG
WINAPI
properties_AddRef
(
ISessionProperties
*
iface
)
{
struct
msdasql_session
*
session
=
impl_from_ISessionProperties
(
iface
);
return
IUnknown_AddRef
(
&
session
->
session_iface
);
}
static
ULONG
WINAPI
properties_Release
(
ISessionProperties
*
iface
)
{
struct
msdasql_session
*
session
=
impl_from_ISessionProperties
(
iface
);
return
IUnknown_Release
(
&
session
->
session_iface
);
}
static
HRESULT
WINAPI
properties_GetProperties
(
ISessionProperties
*
iface
,
ULONG
set_count
,
const
DBPROPIDSET
id_sets
[],
ULONG
*
count
,
DBPROPSET
**
sets
)
{
struct
msdasql_session
*
session
=
impl_from_ISessionProperties
(
iface
);
FIXME
(
"%p %d %p %p %p
\n
"
,
session
,
set_count
,
id_sets
,
count
,
sets
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
properties_SetProperties
(
ISessionProperties
*
iface
,
ULONG
count
,
DBPROPSET
sets
[])
{
struct
msdasql_session
*
session
=
impl_from_ISessionProperties
(
iface
);
FIXME
(
"%p %d %p
\n
"
,
session
,
count
,
sets
);
return
S_OK
;
}
static
const
ISessionPropertiesVtbl
propertiesVtbl
=
{
properties_QueryInterface
,
properties_AddRef
,
properties_Release
,
properties_GetProperties
,
properties_SetProperties
};
HRESULT
create_db_session
(
REFIID
riid
,
void
**
unk
)
{
struct
msdasql_session
*
session
;
...
...
@@ -201,6 +258,7 @@ HRESULT create_db_session(REFIID riid, void **unk)
session
->
session_iface
.
lpVtbl
=
&
unkfactoryVtbl
;
session
->
IGetDataSource_iface
.
lpVtbl
=
&
datasourceVtbl
;
session
->
IOpenRowset_iface
.
lpVtbl
=
&
openrowsetVtbl
;
session
->
ISessionProperties_iface
.
lpVtbl
=
&
propertiesVtbl
;
session
->
refs
=
1
;
hr
=
IUnknown_QueryInterface
(
&
session
->
session_iface
,
riid
,
unk
);
...
...
dlls/msdasql/tests/provider.c
View file @
2f4e22d0
...
...
@@ -160,6 +160,7 @@ static void test_sessions(void)
IOpenRowset
*
openrowset
=
NULL
;
IDBCreateCommand
*
create_command
=
NULL
;
IGetDataSource
*
datasource
=
NULL
;
ISessionProperties
*
session_props
=
NULL
;
IUnknown
*
cmd
=
NULL
;
HRESULT
hr
;
BSTR
connect_str
;
...
...
@@ -208,6 +209,10 @@ static void test_sessions(void)
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
IGetDataSource_Release
(
datasource
);
hr
=
IUnknown_QueryInterface
(
session
,
&
IID_ISessionProperties
,
(
void
**
)
&
session_props
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ISessionProperties_Release
(
session_props
);
hr
=
IUnknown_QueryInterface
(
session
,
&
IID_IOpenRowset
,
(
void
**
)
&
openrowset
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
...
...
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