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
2085922d
Commit
2085922d
authored
Dec 10, 2010
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 10, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
browseui: Use ifaces instead of vtbl pointers in ACLMulti.
parent
0e3c6078
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
21 deletions
+26
-21
aclmulti.c
dlls/browseui/aclmulti.c
+26
-21
No files found.
dlls/browseui/aclmulti.c
View file @
2085922d
...
...
@@ -49,23 +49,28 @@ struct ACLMultiSublist {
};
typedef
struct
tagACLMulti
{
const
IEnumStringVtbl
*
vtbl
;
const
IACListVtbl
*
aclVtbl
;
const
IObjMgrVtbl
*
objmgrVtbl
;
IEnumString
IEnumString_iface
;
IACList
IACList_iface
;
IObjMgr
IObjMgr_iface
;
LONG
refCount
;
INT
nObjs
;
INT
currObj
;
struct
ACLMultiSublist
*
objs
;
}
ACLMulti
;
static
inline
ACLMulti
*
impl_from_IEnumString
(
IEnumString
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
ACLMulti
,
IEnumString_iface
);
}
static
inline
ACLMulti
*
impl_from_IACList
(
IACList
*
iface
)
{
return
(
ACLMulti
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
ACLMulti
,
aclVtbl
)
);
return
CONTAINING_RECORD
(
iface
,
ACLMulti
,
IACList_iface
);
}
static
inline
ACLMulti
*
impl_from_IObjMgr
(
IObjMgr
*
iface
)
{
return
(
ACLMulti
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
ACLMulti
,
objmgrVtbl
)
);
return
CONTAINING_RECORD
(
iface
,
ACLMulti
,
IObjMgr_iface
);
}
static
void
release_obj
(
struct
ACLMultiSublist
*
obj
)
...
...
@@ -90,7 +95,7 @@ static void ACLMulti_Destructor(ACLMulti *This)
static
HRESULT
WINAPI
ACLMulti_QueryInterface
(
IEnumString
*
iface
,
REFIID
iid
,
LPVOID
*
ppvOut
)
{
ACLMulti
*
This
=
(
ACLMulti
*
)
iface
;
ACLMulti
*
This
=
impl_from_IEnumString
(
iface
)
;
*
ppvOut
=
NULL
;
if
(
IsEqualIID
(
iid
,
&
IID_IUnknown
)
||
IsEqualIID
(
iid
,
&
IID_IEnumString
))
...
...
@@ -99,11 +104,11 @@ static HRESULT WINAPI ACLMulti_QueryInterface(IEnumString *iface, REFIID iid, LP
}
else
if
(
IsEqualIID
(
iid
,
&
IID_IACList
))
{
*
ppvOut
=
&
This
->
aclVtbl
;
*
ppvOut
=
&
This
->
IACList_iface
;
}
else
if
(
IsEqualIID
(
iid
,
&
IID_IObjMgr
))
{
*
ppvOut
=
&
This
->
objmgrVtbl
;
*
ppvOut
=
&
This
->
IObjMgr_iface
;
}
if
(
*
ppvOut
)
...
...
@@ -118,13 +123,13 @@ static HRESULT WINAPI ACLMulti_QueryInterface(IEnumString *iface, REFIID iid, LP
static
ULONG
WINAPI
ACLMulti_AddRef
(
IEnumString
*
iface
)
{
ACLMulti
*
This
=
(
ACLMulti
*
)
iface
;
ACLMulti
*
This
=
impl_from_IEnumString
(
iface
)
;
return
InterlockedIncrement
(
&
This
->
refCount
);
}
static
ULONG
WINAPI
ACLMulti_Release
(
IEnumString
*
iface
)
{
ACLMulti
*
This
=
(
ACLMulti
*
)
iface
;
ACLMulti
*
This
=
impl_from_IEnumString
(
iface
)
;
ULONG
ret
;
ret
=
InterlockedDecrement
(
&
This
->
refCount
);
...
...
@@ -173,7 +178,7 @@ static HRESULT WINAPI ACLMulti_Remove(IObjMgr *iface, IUnknown *obj)
static
HRESULT
WINAPI
ACLMulti_Next
(
IEnumString
*
iface
,
ULONG
celt
,
LPOLESTR
*
rgelt
,
ULONG
*
pceltFetched
)
{
ACLMulti
*
This
=
(
ACLMulti
*
)
iface
;
ACLMulti
*
This
=
impl_from_IEnumString
(
iface
)
;
TRACE
(
"(%p, %d, %p, %p)
\n
"
,
iface
,
celt
,
rgelt
,
pceltFetched
);
while
(
This
->
currObj
<
This
->
nObjs
)
...
...
@@ -196,7 +201,7 @@ static HRESULT WINAPI ACLMulti_Next(IEnumString *iface, ULONG celt, LPOLESTR *rg
static
HRESULT
WINAPI
ACLMulti_Reset
(
IEnumString
*
iface
)
{
ACLMulti
*
This
=
(
ACLMulti
*
)
iface
;
ACLMulti
*
This
=
impl_from_IEnumString
(
iface
)
;
int
i
;
This
->
currObj
=
0
;
...
...
@@ -252,19 +257,19 @@ static const IEnumStringVtbl ACLMultiVtbl =
static
HRESULT
WINAPI
ACLMulti_IObjMgr_QueryInterface
(
IObjMgr
*
iface
,
REFIID
iid
,
LPVOID
*
ppvOut
)
{
ACLMulti
*
This
=
impl_from_IObjMgr
(
iface
);
return
ACLMulti_QueryInterface
(
(
IEnumString
*
)
This
,
iid
,
ppvOut
);
return
ACLMulti_QueryInterface
(
&
This
->
IEnumString_iface
,
iid
,
ppvOut
);
}
static
ULONG
WINAPI
ACLMulti_IObjMgr_AddRef
(
IObjMgr
*
iface
)
{
ACLMulti
*
This
=
impl_from_IObjMgr
(
iface
);
return
ACLMulti_AddRef
(
(
IEnumString
*
)
This
);
return
ACLMulti_AddRef
(
&
This
->
IEnumString_iface
);
}
static
ULONG
WINAPI
ACLMulti_IObjMgr_Release
(
IObjMgr
*
iface
)
{
ACLMulti
*
This
=
impl_from_IObjMgr
(
iface
);
return
ACLMulti_Release
(
(
IEnumString
*
)
This
);
return
ACLMulti_Release
(
&
This
->
IEnumString_iface
);
}
static
const
IObjMgrVtbl
ACLMulti_ObjMgrVtbl
=
...
...
@@ -280,19 +285,19 @@ static const IObjMgrVtbl ACLMulti_ObjMgrVtbl =
static
HRESULT
WINAPI
ACLMulti_IACList_QueryInterface
(
IACList
*
iface
,
REFIID
iid
,
LPVOID
*
ppvOut
)
{
ACLMulti
*
This
=
impl_from_IACList
(
iface
);
return
ACLMulti_QueryInterface
(
(
IEnumString
*
)
This
,
iid
,
ppvOut
);
return
ACLMulti_QueryInterface
(
&
This
->
IEnumString_iface
,
iid
,
ppvOut
);
}
static
ULONG
WINAPI
ACLMulti_IACList_AddRef
(
IACList
*
iface
)
{
ACLMulti
*
This
=
impl_from_IACList
(
iface
);
return
ACLMulti_AddRef
(
(
IEnumString
*
)
This
);
return
ACLMulti_AddRef
(
&
This
->
IEnumString_iface
);
}
static
ULONG
WINAPI
ACLMulti_IACList_Release
(
IACList
*
iface
)
{
ACLMulti
*
This
=
impl_from_IACList
(
iface
);
return
ACLMulti_Release
(
(
IEnumString
*
)
This
);
return
ACLMulti_Release
(
&
This
->
IEnumString_iface
);
}
static
const
IACListVtbl
ACLMulti_ACListVtbl
=
...
...
@@ -314,9 +319,9 @@ HRESULT ACLMulti_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
if
(
This
==
NULL
)
return
E_OUTOFMEMORY
;
This
->
v
tbl
=
&
ACLMultiVtbl
;
This
->
acl
Vtbl
=
&
ACLMulti_ACListVtbl
;
This
->
objmgr
Vtbl
=
&
ACLMulti_ObjMgrVtbl
;
This
->
IEnumString_iface
.
lpV
tbl
=
&
ACLMultiVtbl
;
This
->
IACList_iface
.
lp
Vtbl
=
&
ACLMulti_ACListVtbl
;
This
->
IObjMgr_iface
.
lp
Vtbl
=
&
ACLMulti_ObjMgrVtbl
;
This
->
refCount
=
1
;
TRACE
(
"returning %p
\n
"
,
This
);
...
...
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