Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
0fd66499
Commit
0fd66499
authored
12 years ago
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
oledb32: Add IDataInitialize interface support.
parent
eda7615d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
dlls/oledb32/Makefile.in
+1
-0
1 addition, 0 deletions
dlls/oledb32/Makefile.in
dlls/oledb32/datainit.c
+193
-0
193 additions, 0 deletions
dlls/oledb32/datainit.c
dlls/oledb32/main.c
+7
-0
7 additions, 0 deletions
dlls/oledb32/main.c
dlls/oledb32/oledb_private.h
+1
-0
1 addition, 0 deletions
dlls/oledb32/oledb_private.h
with
202 additions
and
0 deletions
dlls/oledb32/Makefile.in
+
1
−
0
View file @
0fd66499
...
...
@@ -4,6 +4,7 @@ IMPORTS = uuid oleaut32 ole32 user32 advapi32
C_SRCS
=
\
convert.c
\
datainit.c
\
main.c
IDL_I_SRCS
=
convert.idl
...
...
This diff is collapsed.
Click to expand it.
dlls/oledb32/datainit.c
0 → 100644
+
193
−
0
View file @
0fd66499
/*
* Copyright (C) 2012 Alistair Leslie-Hughes
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include
<stdarg.h>
#define COBJMACROS
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include
"windef.h"
#include
"winbase.h"
#include
"winnls.h"
#include
"ole2.h"
#include
"msdasc.h"
#include
"oledberr.h"
#include
"oledb_private.h"
#include
"wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
oledb
);
typedef
struct
datainit
{
IDataInitialize
IDataInitialize_iface
;
LONG
ref
;
}
datainit
;
static
inline
datainit
*
impl_from_IDataInitialize
(
IDataInitialize
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
datainit
,
IDataInitialize_iface
);
}
static
HRESULT
WINAPI
datainit_QueryInterface
(
IDataInitialize
*
iface
,
REFIID
riid
,
void
**
obj
)
{
datainit
*
This
=
impl_from_IDataInitialize
(
iface
);
TRACE
(
"(%p)->(%s, %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
obj
);
*
obj
=
NULL
;
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IDataInitialize
))
{
*
obj
=
&
This
->
IDataInitialize_iface
;
}
else
{
FIXME
(
"interface %s not implemented
\n
"
,
debugstr_guid
(
riid
));
return
E_NOINTERFACE
;
}
IDataInitialize_AddRef
(
iface
);
return
S_OK
;
}
static
ULONG
WINAPI
datainit_AddRef
(
IDataInitialize
*
iface
)
{
datainit
*
This
=
impl_from_IDataInitialize
(
iface
);
TRACE
(
"(%p)
\n
"
,
This
);
return
InterlockedIncrement
(
&
This
->
ref
);
}
static
ULONG
WINAPI
datainit_Release
(
IDataInitialize
*
iface
)
{
datainit
*
This
=
impl_from_IDataInitialize
(
iface
);
LONG
ref
;
TRACE
(
"(%p)
\n
"
,
This
);
ref
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
ref
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
}
/*** IDataInitialize methods ***/
static
HRESULT
WINAPI
datainit_GetDataSource
(
IDataInitialize
*
iface
,
IUnknown
*
pUnkOuter
,
DWORD
dwClsCtx
,
LPWSTR
pwszInitializationString
,
REFIID
riid
,
IUnknown
**
ppDataSource
)
{
datainit
*
This
=
impl_from_IDataInitialize
(
iface
);
FIXME
(
"(%p)->(%p %d %s %s %p)
\n
"
,
This
,
pUnkOuter
,
dwClsCtx
,
debugstr_w
(
pwszInitializationString
),
debugstr_guid
(
riid
),
ppDataSource
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
datainit_GetInitializationString
(
IDataInitialize
*
iface
,
IUnknown
*
pDataSource
,
boolean
fIncludePassword
,
LPWSTR
*
ppwszInitString
)
{
datainit
*
This
=
impl_from_IDataInitialize
(
iface
);
FIXME
(
"(%p)->(%p %d %p)
\n
"
,
This
,
pDataSource
,
fIncludePassword
,
ppwszInitString
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
datainit_CreateDBInstance
(
IDataInitialize
*
iface
,
REFCLSID
clsidProvider
,
IUnknown
*
pUnkOuter
,
DWORD
dwClsCtx
,
LPWSTR
pwszReserved
,
REFIID
riid
,
IUnknown
**
ppDataSource
)
{
datainit
*
This
=
impl_from_IDataInitialize
(
iface
);
FIXME
(
"(%p)->()
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
datainit_RemoteCreateDBInstanceEx
(
IDataInitialize
*
iface
,
REFCLSID
clsidProvider
,
IUnknown
*
pUnkOuter
,
DWORD
dwClsCtx
,
LPWSTR
pwszReserved
,
COSERVERINFO
*
pServerInfo
,
DWORD
cmq
,
GUID
**
rgpIID
,
IUnknown
**
rgpItf
,
HRESULT
*
rghr
)
{
datainit
*
This
=
impl_from_IDataInitialize
(
iface
);
FIXME
(
"(%p)->()
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
datainit_LoadStringFromStorage
(
IDataInitialize
*
iface
,
LPWSTR
pwszFileName
,
LPWSTR
*
ppwszInitializationString
)
{
datainit
*
This
=
impl_from_IDataInitialize
(
iface
);
FIXME
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_w
(
pwszFileName
),
ppwszInitializationString
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
datainit_WriteStringToStorage
(
IDataInitialize
*
iface
,
LPWSTR
pwszFileName
,
LPWSTR
pwszInitializationString
,
DWORD
dwCreationDisposition
)
{
datainit
*
This
=
impl_from_IDataInitialize
(
iface
);
FIXME
(
"(%p)->(%s %s %d)
\n
"
,
This
,
debugstr_w
(
pwszFileName
),
debugstr_w
(
pwszInitializationString
),
dwCreationDisposition
);
return
E_NOTIMPL
;
}
static
const
struct
IDataInitializeVtbl
datainit_vtbl
=
{
datainit_QueryInterface
,
datainit_AddRef
,
datainit_Release
,
datainit_GetDataSource
,
datainit_GetInitializationString
,
datainit_CreateDBInstance
,
datainit_RemoteCreateDBInstanceEx
,
datainit_LoadStringFromStorage
,
datainit_WriteStringToStorage
};
HRESULT
create_data_init
(
IUnknown
*
outer
,
void
**
obj
)
{
datainit
*
This
;
TRACE
(
"(%p)
\n
"
,
obj
);
if
(
outer
)
return
CLASS_E_NOAGGREGATION
;
*
obj
=
NULL
;
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
This
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
IDataInitialize_iface
.
lpVtbl
=
&
datainit_vtbl
;
This
->
ref
=
1
;
*
obj
=
&
This
->
IDataInitialize_iface
;
return
S_OK
;
}
This diff is collapsed.
Click to expand it.
dlls/oledb32/main.c
+
7
−
0
View file @
0fd66499
...
...
@@ -27,6 +27,7 @@
#include
"winbase.h"
#include
"ole2.h"
#include
"rpcproxy.h"
#include
"msdasc.h"
#include
"initguid.h"
#include
"msdaguid.h"
...
...
@@ -127,6 +128,7 @@ static const IClassFactoryVtbl CF_Vtbl =
};
static
cf
oledb_convert_cf
=
{
{
&
CF_Vtbl
},
create_oledb_convert
};
static
cf
oledb_datainit_cf
=
{
{
&
CF_Vtbl
},
create_data_init
};
/******************************************************************
* DllGetClassObject
...
...
@@ -140,6 +142,11 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **obj)
*
obj
=
&
oledb_convert_cf
;
return
S_OK
;
}
else
if
(
IsEqualCLSID
(
rclsid
,
&
CLSID_MSDAINITIALIZE
)
)
{
*
obj
=
&
oledb_datainit_cf
;
return
S_OK
;
}
return
CLASS_E_CLASSNOTAVAILABLE
;
}
...
...
This diff is collapsed.
Click to expand it.
dlls/oledb32/oledb_private.h
+
1
−
0
View file @
0fd66499
...
...
@@ -18,3 +18,4 @@
*/
HRESULT
create_oledb_convert
(
IUnknown
*
outer
,
void
**
obj
)
DECLSPEC_HIDDEN
;
HRESULT
create_data_init
(
IUnknown
*
outer
,
void
**
obj
)
DECLSPEC_HIDDEN
;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment