Commit 83d33b6f authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

oledb32: Added GetDataSource() for DataLinks object.

parent c2a6738f
......@@ -587,12 +587,10 @@ static WCHAR *strstriW(const WCHAR *str, const WCHAR *sub)
return r;
}
static HRESULT WINAPI datainit_GetDataSource(IDataInitialize *iface, IUnknown *outer, DWORD clsctx,
LPWSTR initstring, REFIID riid, IUnknown **datasource)
HRESULT get_data_source(IUnknown *outer, DWORD clsctx, LPWSTR initstring, REFIID riid, IUnknown **datasource)
{
static const WCHAR providerW[] = {'P','r','o','v','i','d','e','r','=',0};
static const WCHAR msdasqlW[] = {'M','S','D','A','S','Q','L',0};
datainit *This = impl_from_IDataInitialize(iface);
BOOL datasource_created = FALSE;
IDBProperties *dbprops;
DBPROPSET *propset;
......@@ -600,7 +598,6 @@ static HRESULT WINAPI datainit_GetDataSource(IDataInitialize *iface, IUnknown *o
CLSID provclsid;
HRESULT hr;
TRACE("(%p)->(%p 0x%x %s %s %p)\n", This, outer, clsctx, debugstr_w(initstring), debugstr_guid(riid), datasource);
/* first get provider name */
provclsid = IID_NULL;
......@@ -727,6 +724,16 @@ static HRESULT WINAPI datainit_GetDataSource(IDataInitialize *iface, IUnknown *o
return hr;
}
static HRESULT WINAPI datainit_GetDataSource(IDataInitialize *iface, IUnknown *outer, DWORD clsctx,
LPWSTR initstring, REFIID riid, IUnknown **datasource)
{
datainit *This = impl_from_IDataInitialize(iface);
TRACE("(%p)->(%p 0x%x %s %s %p)\n", This, outer, clsctx, debugstr_w(initstring), debugstr_guid(riid), datasource);
return get_data_source(outer, clsctx, initstring, riid, datasource);
}
/* returns character length of string representation */
static int get_propvalue_length(DBPROP *prop)
{
......
......@@ -221,9 +221,10 @@ static ULONG WINAPI datainitialize_Release(IDataInitialize *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),
TRACE("(%p)->(%p %#x %s %s %p)\n", iface, outer, context, debugstr_w(initstring), debugstr_guid(riid),
datasource);
return E_NOTIMPL;
return get_data_source(outer, context, initstring, riid, datasource);
}
static HRESULT WINAPI datainitialize_GetInitializationString(IDataInitialize *iface, IUnknown *datasource,
......
......@@ -23,6 +23,9 @@ HRESULT create_error_info(IUnknown *outer, void **obj) DECLSPEC_HIDDEN;
HRESULT create_oledb_rowpos(IUnknown *outer, void **obj) DECLSPEC_HIDDEN;
HRESULT create_dslocator(IUnknown *outer, void **obj) DECLSPEC_HIDDEN;
HRESULT get_data_source(IUnknown *outer, DWORD clsctx, LPWSTR initstring, REFIID riid,
IUnknown **datasource) DECLSPEC_HIDDEN;
static inline void *heap_alloc(size_t len)
{
return HeapAlloc(GetProcessHeap(), 0, len);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment