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
669107f6
Commit
669107f6
authored
Apr 23, 2021
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Feb 20, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msado15: Semi-stub _Recordset get/put Filter.
parent
6254f663
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
5 deletions
+60
-5
recordset.c
dlls/msado15/recordset.c
+22
-4
msado15.c
dlls/msado15/tests/msado15.c
+38
-1
No files found.
dlls/msado15/recordset.c
View file @
669107f6
...
...
@@ -48,6 +48,7 @@ struct recordset
CursorTypeEnum
cursor_type
;
IRowset
*
row_set
;
EditModeEnum
editmode
;
VARIANT
filter
;
};
struct
fields
...
...
@@ -1588,14 +1589,30 @@ static HRESULT WINAPI recordset_get_EditMode( _Recordset *iface, EditModeEnum *m
static
HRESULT
WINAPI
recordset_get_Filter
(
_Recordset
*
iface
,
VARIANT
*
criteria
)
{
FIXME
(
"%p, %p
\n
"
,
iface
,
criteria
);
return
E_NOTIMPL
;
struct
recordset
*
recordset
=
impl_from_Recordset
(
iface
);
TRACE
(
"%p, %p
\n
"
,
iface
,
criteria
);
if
(
!
criteria
)
return
MAKE_ADO_HRESULT
(
adErrInvalidArgument
);
VariantCopy
(
criteria
,
&
recordset
->
filter
);
return
S_OK
;
}
static
HRESULT
WINAPI
recordset_put_Filter
(
_Recordset
*
iface
,
VARIANT
criteria
)
{
FIXME
(
"%p, %s
\n
"
,
iface
,
debugstr_variant
(
&
criteria
)
);
return
E_NOTIMPL
;
struct
recordset
*
recordset
=
impl_from_Recordset
(
iface
);
TRACE
(
"%p, %s
\n
"
,
recordset
,
debugstr_variant
(
&
criteria
)
);
if
(
V_VT
(
&
criteria
)
!=
VT_I2
&&
V_VT
(
&
criteria
)
!=
VT_I4
&&
V_VT
(
&
criteria
)
!=
VT_BSTR
)
return
MAKE_ADO_HRESULT
(
adErrInvalidArgument
);
if
(
V_VT
(
&
criteria
)
==
VT_BSTR
&&
recordset
->
state
==
adStateOpen
)
{
FIXME
(
"Validating fields not preformed
\n
"
);
}
VariantCopy
(
&
recordset
->
filter
,
&
criteria
);
return
S_OK
;
}
static
HRESULT
WINAPI
recordset_get_PageCount
(
_Recordset
*
iface
,
ADO_LONGPTR
*
count
)
...
...
@@ -2131,6 +2148,7 @@ HRESULT Recordset_create( void **obj )
recordset
->
cursor_type
=
adOpenForwardOnly
;
recordset
->
row_set
=
NULL
;
recordset
->
editmode
=
adEditNone
;
VariantInit
(
&
recordset
->
filter
);
*
obj
=
&
recordset
->
Recordset_iface
;
TRACE
(
"returning iface %p
\n
"
,
*
obj
);
...
...
dlls/msado15/tests/msado15.c
View file @
669107f6
...
...
@@ -59,7 +59,7 @@ static void test_Recordset(void)
CursorTypeEnum
cursor
;
BSTR
name
;
HRESULT
hr
;
VARIANT
bookmark
;
VARIANT
bookmark
,
filter
;
EditModeEnum
editmode
;
hr
=
CoCreateInstance
(
&
CLSID_Recordset
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID__Recordset
,
(
void
**
)
&
recordset
);
...
...
@@ -123,6 +123,26 @@ static void test_Recordset(void)
hr
=
_Recordset_put_Bookmark
(
recordset
,
bookmark
);
ok
(
hr
==
MAKE_ADO_HRESULT
(
adErrObjectClosed
),
"got %08lx
\n
"
,
hr
);
VariantInit
(
&
filter
);
hr
=
_Recordset_put_Filter
(
recordset
,
filter
);
ok
(
hr
==
MAKE_ADO_HRESULT
(
adErrInvalidArgument
),
"got %08lx
\n
"
,
hr
);
V_VT
(
&
filter
)
=
VT_BSTR
;
V_BSTR
(
&
filter
)
=
SysAllocString
(
L"field1 = 1"
);
hr
=
_Recordset_put_Filter
(
recordset
,
filter
);
ok
(
hr
==
S_OK
,
"got %08lx
\n
"
,
hr
);
VariantClear
(
&
filter
);
V_VT
(
&
filter
)
=
VT_I4
;
V_I4
(
&
filter
)
=
0
;
hr
=
_Recordset_put_Filter
(
recordset
,
filter
);
ok
(
hr
==
S_OK
,
"got %08lx
\n
"
,
hr
);
V_VT
(
&
filter
)
=
VT_I2
;
V_I2
(
&
filter
)
=
0
;
hr
=
_Recordset_put_Filter
(
recordset
,
filter
);
ok
(
hr
==
S_OK
,
"got %08lx
\n
"
,
hr
);
VariantInit
(
&
missing
);
hr
=
_Recordset_AddNew
(
recordset
,
missing
,
missing
);
ok
(
hr
==
MAKE_ADO_HRESULT
(
adErrObjectClosed
),
"got %08lx
\n
"
,
hr
);
...
...
@@ -248,6 +268,23 @@ static void test_Recordset(void)
ok
(
fields2
==
fields
,
"expected same object
\n
"
);
Fields_Release
(
fields2
);
V_VT
(
&
filter
)
=
VT_BSTR
;
V_BSTR
(
&
filter
)
=
SysAllocString
(
L"field1 = 1"
);
hr
=
_Recordset_put_Filter
(
recordset
,
filter
);
todo_wine
ok
(
hr
==
MAKE_ADO_HRESULT
(
adErrItemNotFound
),
"got %08lx
\n
"
,
hr
);
VariantClear
(
&
filter
);
V_VT
(
&
filter
)
=
VT_BSTR
;
V_BSTR
(
&
filter
)
=
SysAllocString
(
L"field = 1"
);
hr
=
_Recordset_put_Filter
(
recordset
,
filter
);
ok
(
hr
==
S_OK
,
"got %08lx
\n
"
,
hr
);
VariantClear
(
&
filter
);
V_VT
(
&
filter
)
=
VT_I4
;
V_I4
(
&
filter
)
=
0
;
hr
=
_Recordset_put_Filter
(
recordset
,
filter
);
ok
(
hr
==
S_OK
,
"got %08lx
\n
"
,
hr
);
count
=
-
1
;
hr
=
Fields_get_Count
(
fields2
,
&
count
);
ok
(
count
==
1
,
"got %ld
\n
"
,
count
);
...
...
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