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
91669063
Commit
91669063
authored
Oct 25, 2021
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Oct 25, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msdasql: Support IDBProperties interface.
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
00d2ca25
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
77 additions
and
2 deletions
+77
-2
msdasql_main.c
dlls/msdasql/msdasql_main.c
+75
-0
database.c
dlls/oledb32/tests/database.c
+2
-2
No files found.
dlls/msdasql/msdasql_main.c
View file @
91669063
...
...
@@ -23,6 +23,7 @@
#include "windef.h"
#include "winbase.h"
#include "objbase.h"
#include "oledb.h"
#include "rpcproxy.h"
#include "wine/debug.h"
...
...
@@ -102,6 +103,7 @@ HRESULT WINAPI DllGetClassObject( REFCLSID rclsid, REFIID riid, void **ppv )
struct
msdasql
{
IUnknown
MSDASQL_iface
;
IDBProperties
IDBProperties_iface
;
LONG
ref
;
};
...
...
@@ -111,6 +113,11 @@ static inline struct msdasql *impl_from_IUnknown(IUnknown *iface)
return
CONTAINING_RECORD
(
iface
,
struct
msdasql
,
MSDASQL_iface
);
}
static
inline
struct
msdasql
*
impl_from_IDBProperties
(
IDBProperties
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
msdasql
,
IDBProperties_iface
);
}
static
HRESULT
WINAPI
msdsql_QueryInterface
(
IUnknown
*
iface
,
REFIID
riid
,
void
**
out
)
{
struct
msdasql
*
provider
=
impl_from_IUnknown
(
iface
);
...
...
@@ -122,6 +129,10 @@ static HRESULT WINAPI msdsql_QueryInterface(IUnknown *iface, REFIID riid, void *
{
*
out
=
&
provider
->
MSDASQL_iface
;
}
else
if
(
IsEqualGUID
(
riid
,
&
IID_IDBProperties
))
{
*
out
=
&
provider
->
IDBProperties_iface
;
}
else
{
FIXME
(
"(%s, %p)
\n
"
,
debugstr_guid
(
riid
),
out
);
...
...
@@ -165,6 +176,69 @@ static const IUnknownVtbl msdsql_vtbl =
msdsql_Release
};
static
HRESULT
WINAPI
dbprops_QueryInterface
(
IDBProperties
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
{
struct
msdasql
*
provider
=
impl_from_IDBProperties
(
iface
);
return
IUnknown_QueryInterface
(
&
provider
->
MSDASQL_iface
,
riid
,
ppvObject
);
}
static
ULONG
WINAPI
dbprops_AddRef
(
IDBProperties
*
iface
)
{
struct
msdasql
*
provider
=
impl_from_IDBProperties
(
iface
);
return
IUnknown_AddRef
(
&
provider
->
MSDASQL_iface
);
}
static
ULONG
WINAPI
dbprops_Release
(
IDBProperties
*
iface
)
{
struct
msdasql
*
provider
=
impl_from_IDBProperties
(
iface
);
return
IUnknown_Release
(
&
provider
->
MSDASQL_iface
);
}
static
HRESULT
WINAPI
dbprops_GetProperties
(
IDBProperties
*
iface
,
ULONG
cPropertyIDSets
,
const
DBPROPIDSET
rgPropertyIDSets
[],
ULONG
*
pcPropertySets
,
DBPROPSET
**
prgPropertySets
)
{
struct
msdasql
*
provider
=
impl_from_IDBProperties
(
iface
);
FIXME
(
"(%p)->(%d %p %p %p)
\n
"
,
provider
,
cPropertyIDSets
,
rgPropertyIDSets
,
pcPropertySets
,
prgPropertySets
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
dbprops_GetPropertyInfo
(
IDBProperties
*
iface
,
ULONG
cPropertyIDSets
,
const
DBPROPIDSET
rgPropertyIDSets
[],
ULONG
*
pcPropertyInfoSets
,
DBPROPINFOSET
**
prgPropertyInfoSets
,
OLECHAR
**
ppDescBuffer
)
{
struct
msdasql
*
provider
=
impl_from_IDBProperties
(
iface
);
FIXME
(
"(%p)->(%d %p %p %p %p)
\n
"
,
provider
,
cPropertyIDSets
,
rgPropertyIDSets
,
pcPropertyInfoSets
,
prgPropertyInfoSets
,
ppDescBuffer
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
dbprops_SetProperties
(
IDBProperties
*
iface
,
ULONG
cPropertySets
,
DBPROPSET
rgPropertySets
[])
{
struct
msdasql
*
provider
=
impl_from_IDBProperties
(
iface
);
FIXME
(
"(%p)->(%d %p)
\n
"
,
provider
,
cPropertySets
,
rgPropertySets
);
return
E_NOTIMPL
;
}
static
const
struct
IDBPropertiesVtbl
dbprops_vtbl
=
{
dbprops_QueryInterface
,
dbprops_AddRef
,
dbprops_Release
,
dbprops_GetProperties
,
dbprops_GetPropertyInfo
,
dbprops_SetProperties
};
static
HRESULT
create_msdasql_provider
(
REFIID
riid
,
void
**
ppv
)
{
struct
msdasql
*
provider
;
...
...
@@ -175,6 +249,7 @@ static HRESULT create_msdasql_provider(REFIID riid, void **ppv)
return
E_OUTOFMEMORY
;
provider
->
MSDASQL_iface
.
lpVtbl
=
&
msdsql_vtbl
;
provider
->
IDBProperties_iface
.
lpVtbl
=
&
dbprops_vtbl
;
provider
->
ref
=
1
;
hr
=
IUnknown_QueryInterface
(
&
provider
->
MSDASQL_iface
,
riid
,
ppv
);
...
...
dlls/oledb32/tests/database.c
View file @
91669063
...
...
@@ -994,7 +994,7 @@ static void test_odbc_provider(void)
};
hr
=
CoCreateInstance
(
&
CLSID_MSDASQL
,
NULL
,
CLSCTX_ALL
,
&
IID_IDBProperties
,
(
void
**
)
&
props
);
todo_wine
ok
(
hr
==
S_OK
,
"Failed to create object 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to create object 0x%08x
\n
"
,
hr
);
if
(
FAILED
(
hr
))
{
return
;
...
...
@@ -1006,7 +1006,7 @@ static void test_odbc_provider(void)
infocount
=
0
;
hr
=
IDBProperties_GetPropertyInfo
(
props
,
1
,
&
propidset
,
&
infocount
,
&
propinfoset
,
&
desc
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
todo_wine
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
{
ULONG
i
;
...
...
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