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
c2a6738f
Commit
c2a6738f
authored
Feb 02, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 02, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oledb32: Added a stub IDataInitialize for DataLinks object.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7380a7c2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
97 additions
and
1 deletion
+97
-1
dslocator.c
dlls/oledb32/dslocator.c
+86
-1
database.c
dlls/oledb32/tests/database.c
+11
-0
No files found.
dlls/oledb32/dslocator.c
View file @
c2a6738f
...
...
@@ -39,7 +39,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(oledb);
typedef
struct
DSLocatorImpl
{
IDataSourceLocator
IDataSourceLocator_iface
;
IDataSourceLocator
IDataSourceLocator_iface
;
IDataInitialize
IDataInitialize_iface
;
LONG
ref
;
HWND
hwnd
;
...
...
@@ -50,6 +51,10 @@ static inline DSLocatorImpl *impl_from_IDataSourceLocator( IDataSourceLocator *i
return
CONTAINING_RECORD
(
iface
,
DSLocatorImpl
,
IDataSourceLocator_iface
);
}
static
inline
DSLocatorImpl
*
impl_from_IDataInitialize
(
IDataInitialize
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
DSLocatorImpl
,
IDataInitialize_iface
);
}
static
HRESULT
WINAPI
dslocator_QueryInterface
(
IDataSourceLocator
*
iface
,
REFIID
riid
,
void
**
ppvoid
)
{
...
...
@@ -64,6 +69,10 @@ static HRESULT WINAPI dslocator_QueryInterface(IDataSourceLocator *iface, REFIID
{
*
ppvoid
=
&
This
->
IDataSourceLocator_iface
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IDataInitialize
))
{
*
ppvoid
=
&
This
->
IDataInitialize_iface
;
}
if
(
*
ppvoid
)
{
...
...
@@ -191,6 +200,81 @@ static const IDataSourceLocatorVtbl DSLocatorVtbl =
dslocator_PromptEdit
};
static
HRESULT
WINAPI
datainitialize_QueryInterface
(
IDataInitialize
*
iface
,
REFIID
riid
,
void
**
obj
)
{
DSLocatorImpl
*
This
=
impl_from_IDataInitialize
(
iface
);
return
IDataSourceLocator_QueryInterface
(
&
This
->
IDataSourceLocator_iface
,
riid
,
obj
);
}
static
ULONG
WINAPI
datainitialize_AddRef
(
IDataInitialize
*
iface
)
{
DSLocatorImpl
*
This
=
impl_from_IDataInitialize
(
iface
);
return
IDataSourceLocator_AddRef
(
&
This
->
IDataSourceLocator_iface
);
}
static
ULONG
WINAPI
datainitialize_Release
(
IDataInitialize
*
iface
)
{
DSLocatorImpl
*
This
=
impl_from_IDataInitialize
(
iface
);
return
IDataSourceLocator_Release
(
&
This
->
IDataSourceLocator_iface
);
}
static
HRESULT
WINAPI
datainitialize_GetDataSource
(
IDataInitialize
*
iface
,
IUnknown
*
outer
,
DWORD
context
,
LPWSTR
initstring
,
REFIID
riid
,
IUnknown
**
datasource
)
{
FIXME
(
"(%p)->(%p %#x %s %s %p): stub
\n
"
,
iface
,
outer
,
context
,
debugstr_w
(
initstring
),
debugstr_guid
(
riid
),
datasource
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
datainitialize_GetInitializationString
(
IDataInitialize
*
iface
,
IUnknown
*
datasource
,
boolean
include_password
,
LPWSTR
*
initstring
)
{
FIXME
(
"(%p)->(%d %p): stub
\n
"
,
iface
,
include_password
,
initstring
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
datainitialize_CreateDBInstance
(
IDataInitialize
*
iface
,
REFCLSID
prov
,
IUnknown
*
outer
,
DWORD
clsctx
,
LPWSTR
reserved
,
REFIID
riid
,
IUnknown
**
datasource
)
{
FIXME
(
"(%p)->(%s %p %#x %p %s %p): stub
\n
"
,
iface
,
debugstr_guid
(
prov
),
outer
,
clsctx
,
reserved
,
debugstr_guid
(
riid
),
datasource
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
datainitialize_CreateDBInstanceEx
(
IDataInitialize
*
iface
,
REFCLSID
prov
,
IUnknown
*
outer
,
DWORD
clsctx
,
LPWSTR
reserved
,
COSERVERINFO
*
server_info
,
DWORD
cmq
,
MULTI_QI
*
results
)
{
FIXME
(
"(%p)->(%s %p %#x %p %p %u %p): stub
\n
"
,
iface
,
debugstr_guid
(
prov
),
outer
,
clsctx
,
reserved
,
server_info
,
cmq
,
results
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
datainitialize_LoadStringFromStorage
(
IDataInitialize
*
iface
,
LPWSTR
filename
,
LPWSTR
*
initstring
)
{
FIXME
(
"(%p)->(%s %p): stub
\n
"
,
iface
,
debugstr_w
(
filename
),
initstring
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
datainitialize_WriteStringToStorage
(
IDataInitialize
*
iface
,
LPWSTR
filename
,
LPWSTR
initstring
,
DWORD
disposition
)
{
FIXME
(
"(%p)->(%s %s %#x): stub
\n
"
,
iface
,
debugstr_w
(
filename
),
debugstr_w
(
initstring
),
disposition
);
return
E_NOTIMPL
;
}
static
const
IDataInitializeVtbl
ds_datainitialize_vtbl
=
{
datainitialize_QueryInterface
,
datainitialize_AddRef
,
datainitialize_Release
,
datainitialize_GetDataSource
,
datainitialize_GetInitializationString
,
datainitialize_CreateDBInstance
,
datainitialize_CreateDBInstanceEx
,
datainitialize_LoadStringFromStorage
,
datainitialize_WriteStringToStorage
,
};
HRESULT
create_dslocator
(
IUnknown
*
outer
,
void
**
obj
)
{
DSLocatorImpl
*
This
;
...
...
@@ -205,6 +289,7 @@ HRESULT create_dslocator(IUnknown *outer, void **obj)
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
IDataSourceLocator_iface
.
lpVtbl
=
&
DSLocatorVtbl
;
This
->
IDataInitialize_iface
.
lpVtbl
=
&
ds_datainitialize_vtbl
;
This
->
ref
=
1
;
This
->
hwnd
=
0
;
...
...
dlls/oledb32/tests/database.c
View file @
c2a6738f
...
...
@@ -855,6 +855,7 @@ static void test_dslocator(void)
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
{
IDataInitialize
*
datainit
,
*
datainit2
;
COMPATIBLE_LONG
hwnd
=
0
;
if
(
0
)
/* Crashes under Window 7 */
...
...
@@ -887,6 +888,16 @@ static void test_dslocator(void)
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hwnd
==
0
,
"got %p
\n
"
,
(
HWND
)
hwnd
);
hr
=
IDataSourceLocator_QueryInterface
(
dslocator
,
&
IID_IDataInitialize
,
(
void
**
)
&
datainit
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
IDataSourceLocator_QueryInterface
(
dslocator
,
&
IID_IDataInitialize
,
(
void
**
)
&
datainit2
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
datainit
==
datainit2
,
"Got %p, previous %p
\n
"
,
datainit
,
datainit2
);
IDataInitialize_Release
(
datainit2
);
IDataInitialize_Release
(
datainit
);
IDataSourceLocator_Release
(
dslocator
);
}
}
...
...
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