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
2111d70c
Commit
2111d70c
authored
Aug 02, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 02, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oledb32: Added IConnectionPointContainer stub.
parent
452a64e3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
92 additions
and
0 deletions
+92
-0
rowpos.c
dlls/oledb32/rowpos.c
+52
-0
database.c
dlls/oledb32/tests/database.c
+40
-0
No files found.
dlls/oledb32/rowpos.c
View file @
2111d70c
...
...
@@ -33,6 +33,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(oledb);
typedef
struct
{
IRowPosition
IRowPosition_iface
;
IConnectionPointContainer
IConnectionPointContainer_iface
;
LONG
ref
;
IRowset
*
rowset
;
...
...
@@ -43,6 +44,11 @@ static inline rowpos *impl_from_IRowPosition(IRowPosition *iface)
return
CONTAINING_RECORD
(
iface
,
rowpos
,
IRowPosition_iface
);
}
static
inline
rowpos
*
impl_from_IConnectionPointContainer
(
IConnectionPointContainer
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
rowpos
,
IConnectionPointContainer_iface
);
}
static
HRESULT
WINAPI
rowpos_QueryInterface
(
IRowPosition
*
iface
,
REFIID
riid
,
void
**
obj
)
{
rowpos
*
This
=
impl_from_IRowPosition
(
iface
);
...
...
@@ -56,6 +62,10 @@ static HRESULT WINAPI rowpos_QueryInterface(IRowPosition* iface, REFIID riid, vo
{
*
obj
=
iface
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IConnectionPointContainer
))
{
*
obj
=
&
This
->
IConnectionPointContainer_iface
;
}
else
{
FIXME
(
"interface %s not implemented
\n
"
,
debugstr_guid
(
riid
));
...
...
@@ -143,6 +153,47 @@ static const struct IRowPositionVtbl rowpos_vtbl =
rowpos_SetRowPosition
};
static
HRESULT
WINAPI
cpc_QueryInterface
(
IConnectionPointContainer
*
iface
,
REFIID
riid
,
void
**
obj
)
{
rowpos
*
This
=
impl_from_IConnectionPointContainer
(
iface
);
return
IRowPosition_QueryInterface
(
&
This
->
IRowPosition_iface
,
riid
,
obj
);
}
static
ULONG
WINAPI
cpc_AddRef
(
IConnectionPointContainer
*
iface
)
{
rowpos
*
This
=
impl_from_IConnectionPointContainer
(
iface
);
return
IRowPosition_AddRef
(
&
This
->
IRowPosition_iface
);
}
static
ULONG
WINAPI
cpc_Release
(
IConnectionPointContainer
*
iface
)
{
rowpos
*
This
=
impl_from_IConnectionPointContainer
(
iface
);
return
IRowPosition_Release
(
&
This
->
IRowPosition_iface
);
}
static
HRESULT
WINAPI
cpc_EnumConnectionPoints
(
IConnectionPointContainer
*
iface
,
IEnumConnectionPoints
**
enum_points
)
{
rowpos
*
This
=
impl_from_IConnectionPointContainer
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
enum_points
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
cpc_FindConnectionPoint
(
IConnectionPointContainer
*
iface
,
REFIID
riid
,
IConnectionPoint
**
point
)
{
rowpos
*
This
=
impl_from_IConnectionPointContainer
(
iface
);
FIXME
(
"(%p)->(%s %p): stub
\n
"
,
This
,
debugstr_guid
(
riid
),
point
);
return
E_NOTIMPL
;
}
static
const
struct
IConnectionPointContainerVtbl
rowpos_cpc_vtbl
=
{
cpc_QueryInterface
,
cpc_AddRef
,
cpc_Release
,
cpc_EnumConnectionPoints
,
cpc_FindConnectionPoint
};
HRESULT
create_oledb_rowpos
(
IUnknown
*
outer
,
void
**
obj
)
{
rowpos
*
This
;
...
...
@@ -157,6 +208,7 @@ HRESULT create_oledb_rowpos(IUnknown *outer, void **obj)
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
IRowPosition_iface
.
lpVtbl
=
&
rowpos_vtbl
;
This
->
IConnectionPointContainer_iface
.
lpVtbl
=
&
rowpos_cpc_vtbl
;
This
->
ref
=
1
;
This
->
rowset
=
NULL
;
...
...
dlls/oledb32/tests/database.c
View file @
2111d70c
...
...
@@ -17,6 +17,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include <stdio.h>
#define COBJMACROS
#define NONAMELESSUNION
...
...
@@ -37,6 +38,21 @@ DEFINE_GUID(CSLID_MSDAER, 0xc8b522cf,0x5cf3,0x11ce,0xad,0xe5,0x00,0xaa,0x00,0x44
static
WCHAR
initstring_default
[]
=
{
'D'
,
'a'
,
't'
,
'a'
,
' '
,
'S'
,
'o'
,
'u'
,
'r'
,
'c'
,
'e'
,
'='
,
'd'
,
'u'
,
'm'
,
'm'
,
'y'
,
';'
,
0
};
static
const
char
*
debugstr_guid
(
REFIID
riid
)
{
static
char
buf
[
50
];
if
(
!
riid
)
return
"(null)"
;
sprintf
(
buf
,
"{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}"
,
riid
->
Data1
,
riid
->
Data2
,
riid
->
Data3
,
riid
->
Data4
[
0
],
riid
->
Data4
[
1
],
riid
->
Data4
[
2
],
riid
->
Data4
[
3
],
riid
->
Data4
[
4
],
riid
->
Data4
[
5
],
riid
->
Data4
[
6
],
riid
->
Data4
[
7
]);
return
buf
;
}
static
void
test_GetDataSource
(
WCHAR
*
initstring
)
{
IDataInitialize
*
datainit
=
NULL
;
...
...
@@ -188,12 +204,36 @@ static void test_initializationstring(void)
static
void
test_rowposition
(
void
)
{
IEnumConnectionPoints
*
enum_points
;
IConnectionPointContainer
*
cpc
;
IConnectionPoint
*
cp
;
IRowPosition
*
rowpos
;
HRESULT
hr
;
IID
iid
;
hr
=
CoCreateInstance
(
&
CLSID_OLEDB_ROWPOSITIONLIBRARY
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IRowPosition
,
(
void
**
)
&
rowpos
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
IRowPosition_QueryInterface
(
rowpos
,
&
IID_IConnectionPointContainer
,
(
void
**
)
&
cpc
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IConnectionPointContainer_EnumConnectionPoints
(
cpc
,
&
enum_points
);
todo_wine
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
{
hr
=
IEnumConnectionPoints_Next
(
enum_points
,
1
,
&
cp
,
NULL
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IConnectionPoint_GetConnectionInterface
(
cp
,
&
iid
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
IsEqualIID
(
&
iid
,
&
IID_IRowPositionChange
),
"got %s
\n
"
,
debugstr_guid
(
&
iid
));
IConnectionPoint_Release
(
cp
);
hr
=
IEnumConnectionPoints_Next
(
enum_points
,
1
,
&
cp
,
NULL
);
ok
(
hr
==
S_FALSE
,
"got 0x%08x
\n
"
,
hr
);
IEnumConnectionPoints_Release
(
enum_points
);
}
IConnectionPointContainer_Release
(
cpc
);
IRowPosition_Release
(
rowpos
);
}
...
...
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