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
05528ea0
Commit
05528ea0
authored
Aug 23, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 23, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oledb32: Implement GetRowPosition().
parent
149c392e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
4 deletions
+52
-4
rowpos.c
dlls/oledb32/rowpos.c
+22
-4
database.c
dlls/oledb32/tests/database.c
+30
-0
No files found.
dlls/oledb32/rowpos.c
View file @
05528ea0
...
...
@@ -47,6 +47,9 @@ struct rowpos
LONG
ref
;
IRowset
*
rowset
;
HROW
row
;
HCHAPTER
chapter
;
DBPOSITIONFLAGS
flags
;
rowpos_cp
cp
;
};
...
...
@@ -83,6 +86,13 @@ static HRESULT rowpos_fireevent(rowpos *rp, DBREASON reason, DBEVENTPHASE phase)
return
hr
;
}
static
void
rowpos_clearposition
(
rowpos
*
rp
)
{
rp
->
row
=
DB_NULL_HROW
;
rp
->
chapter
=
DB_NULL_HCHAPTER
;
rp
->
flags
=
DBPOSITION_NOROW
;
}
static
HRESULT
WINAPI
rowpos_QueryInterface
(
IRowPosition
*
iface
,
REFIID
riid
,
void
**
obj
)
{
rowpos
*
This
=
impl_from_IRowPosition
(
iface
);
...
...
@@ -152,8 +162,7 @@ static HRESULT WINAPI rowpos_ClearRowPosition(IRowPosition* iface)
if
(
hr
!=
S_OK
)
return
rowpos_fireevent
(
This
,
DBREASON_ROWPOSITION_CLEARED
,
DBEVENTPHASE_FAILEDTODO
);
/* FIXME: actually clear stored data */
rowpos_clearposition
(
This
);
return
S_OK
;
}
...
...
@@ -161,8 +170,16 @@ static HRESULT WINAPI rowpos_GetRowPosition(IRowPosition *iface, HCHAPTER *chapt
HROW
*
row
,
DBPOSITIONFLAGS
*
flags
)
{
rowpos
*
This
=
impl_from_IRowPosition
(
iface
);
FIXME
(
"(%p)->(%p %p %p): stub
\n
"
,
This
,
chapter
,
row
,
flags
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p %p %p)
\n
"
,
This
,
chapter
,
row
,
flags
);
*
chapter
=
This
->
chapter
;
*
row
=
This
->
row
;
*
flags
=
This
->
flags
;
if
(
!
This
->
rowset
)
return
E_UNEXPECTED
;
return
S_OK
;
}
static
HRESULT
WINAPI
rowpos_GetRowset
(
IRowPosition
*
iface
,
REFIID
riid
,
IUnknown
**
rowset
)
...
...
@@ -417,6 +434,7 @@ HRESULT create_oledb_rowpos(IUnknown *outer, void **obj)
This
->
IConnectionPointContainer_iface
.
lpVtbl
=
&
rowpos_cpc_vtbl
;
This
->
ref
=
1
;
This
->
rowset
=
NULL
;
rowpos_clearposition
(
This
);
rowposchange_cp_init
(
&
This
->
cp
,
This
);
*
obj
=
&
This
->
IRowPosition_iface
;
...
...
dlls/oledb32/tests/database.c
View file @
05528ea0
...
...
@@ -471,9 +471,12 @@ static void init_onchange_sink(IRowPosition *rowpos)
static
void
test_rowpos_clearrowposition
(
void
)
{
DBPOSITIONFLAGS
flags
;
IRowPosition
*
rowpos
;
HCHAPTER
chapter
;
IUnknown
*
unk
;
HRESULT
hr
;
HROW
row
;
hr
=
CoCreateInstance
(
&
CLSID_OLEDB_ROWPOSITIONLIBRARY
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IRowPosition
,
(
void
**
)
&
rowpos
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
...
...
@@ -484,10 +487,28 @@ static void test_rowpos_clearrowposition(void)
hr
=
IRowPosition_GetRowset
(
rowpos
,
&
IID_IStream
,
&
unk
);
ok
(
hr
==
E_UNEXPECTED
,
"got %08x
\n
"
,
hr
);
chapter
=
1
;
row
=
1
;
flags
=
DBPOSITION_OK
;
hr
=
IRowPosition_GetRowPosition
(
rowpos
,
&
chapter
,
&
row
,
&
flags
);
ok
(
hr
==
E_UNEXPECTED
,
"got %08x
\n
"
,
hr
);
ok
(
chapter
==
DB_NULL_HCHAPTER
,
"got %ld
\n
"
,
chapter
);
ok
(
row
==
DB_NULL_HROW
,
"got %ld
\n
"
,
row
);
ok
(
flags
==
DBPOSITION_NOROW
,
"got %d
\n
"
,
flags
);
init_test_rset
();
hr
=
IRowPosition_Initialize
(
rowpos
,
(
IUnknown
*
)
&
test_rset
.
IRowset_iface
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
chapter
=
1
;
row
=
1
;
flags
=
DBPOSITION_OK
;
hr
=
IRowPosition_GetRowPosition
(
rowpos
,
&
chapter
,
&
row
,
&
flags
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
chapter
==
DB_NULL_HCHAPTER
,
"got %ld
\n
"
,
chapter
);
ok
(
row
==
DB_NULL_HROW
,
"got %ld
\n
"
,
row
);
ok
(
flags
==
DBPOSITION_NOROW
,
"got %d
\n
"
,
flags
);
hr
=
IRowPosition_GetRowset
(
rowpos
,
&
IID_IRowset
,
&
unk
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
...
...
@@ -495,6 +516,15 @@ static void test_rowpos_clearrowposition(void)
hr
=
IRowPosition_ClearRowPosition
(
rowpos
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
chapter
=
1
;
row
=
1
;
flags
=
DBPOSITION_OK
;
hr
=
IRowPosition_GetRowPosition
(
rowpos
,
&
chapter
,
&
row
,
&
flags
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
chapter
==
DB_NULL_HCHAPTER
,
"got %ld
\n
"
,
chapter
);
ok
(
row
==
DB_NULL_HROW
,
"got %ld
\n
"
,
row
);
ok
(
flags
==
DBPOSITION_NOROW
,
"got %d
\n
"
,
flags
);
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