Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
70f1c343
Commit
70f1c343
authored
Dec 08, 2010
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 09, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Use an iface instead of a vtbl pointer in IEnumFiltersImpl.
parent
320d8d2a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
enumfilters.c
dlls/quartz/enumfilters.c
+14
-9
No files found.
dlls/quartz/enumfilters.c
View file @
70f1c343
...
...
@@ -26,7 +26,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(quartz);
typedef
struct
IEnumFiltersImpl
{
const
IEnumFiltersVtbl
*
lpVtbl
;
IEnumFilters
IEnumFilters_iface
;
LONG
refCount
;
IBaseFilter
**
ppFilters
;
int
nFilters
;
...
...
@@ -35,6 +35,11 @@ typedef struct IEnumFiltersImpl
static
const
struct
IEnumFiltersVtbl
IEnumFiltersImpl_Vtbl
;
static
inline
IEnumFiltersImpl
*
impl_from_IEnumFilters
(
IEnumFilters
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IEnumFiltersImpl
,
IEnumFilters_iface
);
}
HRESULT
IEnumFiltersImpl_Construct
(
IBaseFilter
**
ppFilters
,
ULONG
nFilters
,
IEnumFilters
**
ppEnum
)
{
/* Note: The incoming IBaseFilter interfaces are not AddRef'd here as in Windows,
...
...
@@ -50,7 +55,7 @@ HRESULT IEnumFiltersImpl_Construct(IBaseFilter ** ppFilters, ULONG nFilters, IEn
return
E_OUTOFMEMORY
;
}
pEnumFilters
->
lpVtbl
=
&
IEnumFiltersImpl_Vtbl
;
pEnumFilters
->
IEnumFilters_iface
.
lpVtbl
=
&
IEnumFiltersImpl_Vtbl
;
pEnumFilters
->
refCount
=
1
;
pEnumFilters
->
uIndex
=
0
;
pEnumFilters
->
nFilters
=
nFilters
;
...
...
@@ -63,7 +68,7 @@ HRESULT IEnumFiltersImpl_Construct(IBaseFilter ** ppFilters, ULONG nFilters, IEn
memcpy
(
pEnumFilters
->
ppFilters
,
ppFilters
,
nFilters
*
sizeof
(
IBaseFilter
*
));
*
ppEnum
=
(
IEnumFilters
*
)(
&
pEnumFilters
->
lpVtbl
)
;
*
ppEnum
=
&
pEnumFilters
->
IEnumFilters_iface
;
return
S_OK
;
}
...
...
@@ -91,7 +96,7 @@ static HRESULT WINAPI IEnumFiltersImpl_QueryInterface(IEnumFilters * iface, REFI
static
ULONG
WINAPI
IEnumFiltersImpl_AddRef
(
IEnumFilters
*
iface
)
{
IEnumFiltersImpl
*
This
=
(
IEnumFiltersImpl
*
)
iface
;
IEnumFiltersImpl
*
This
=
impl_from_IEnumFilters
(
iface
)
;
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
refCount
);
TRACE
(
"(%p)->()
\n
"
,
iface
);
...
...
@@ -101,7 +106,7 @@ static ULONG WINAPI IEnumFiltersImpl_AddRef(IEnumFilters * iface)
static
ULONG
WINAPI
IEnumFiltersImpl_Release
(
IEnumFilters
*
iface
)
{
IEnumFiltersImpl
*
This
=
(
IEnumFiltersImpl
*
)
iface
;
IEnumFiltersImpl
*
This
=
impl_from_IEnumFilters
(
iface
)
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
refCount
);
TRACE
(
"(%p)->()
\n
"
,
iface
);
...
...
@@ -120,7 +125,7 @@ static HRESULT WINAPI IEnumFiltersImpl_Next(IEnumFilters * iface, ULONG cFilters
{
ULONG
cFetched
;
ULONG
i
;
IEnumFiltersImpl
*
This
=
(
IEnumFiltersImpl
*
)
iface
;
IEnumFiltersImpl
*
This
=
impl_from_IEnumFilters
(
iface
)
;
cFetched
=
min
(
This
->
nFilters
,
This
->
uIndex
+
cFilters
)
-
This
->
uIndex
;
...
...
@@ -147,7 +152,7 @@ static HRESULT WINAPI IEnumFiltersImpl_Next(IEnumFilters * iface, ULONG cFilters
static
HRESULT
WINAPI
IEnumFiltersImpl_Skip
(
IEnumFilters
*
iface
,
ULONG
cFilters
)
{
IEnumFiltersImpl
*
This
=
(
IEnumFiltersImpl
*
)
iface
;
IEnumFiltersImpl
*
This
=
impl_from_IEnumFilters
(
iface
)
;
TRACE
(
"(%p)->(%u)
\n
"
,
iface
,
cFilters
);
...
...
@@ -161,7 +166,7 @@ static HRESULT WINAPI IEnumFiltersImpl_Skip(IEnumFilters * iface, ULONG cFilters
static
HRESULT
WINAPI
IEnumFiltersImpl_Reset
(
IEnumFilters
*
iface
)
{
IEnumFiltersImpl
*
This
=
(
IEnumFiltersImpl
*
)
iface
;
IEnumFiltersImpl
*
This
=
impl_from_IEnumFilters
(
iface
)
;
TRACE
(
"(%p)->()
\n
"
,
iface
);
...
...
@@ -172,7 +177,7 @@ static HRESULT WINAPI IEnumFiltersImpl_Reset(IEnumFilters * iface)
static
HRESULT
WINAPI
IEnumFiltersImpl_Clone
(
IEnumFilters
*
iface
,
IEnumFilters
**
ppEnum
)
{
HRESULT
hr
;
IEnumFiltersImpl
*
This
=
(
IEnumFiltersImpl
*
)
iface
;
IEnumFiltersImpl
*
This
=
impl_from_IEnumFilters
(
iface
)
;
TRACE
(
"(%p)->(%p)
\n
"
,
iface
,
ppEnum
);
...
...
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