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
201b72e8
Commit
201b72e8
authored
Apr 03, 2012
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Apr 03, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
devenum: COM cleanup for IEnumMoniker.
parent
1e40dea1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
42 deletions
+36
-42
devenum_private.h
dlls/devenum/devenum_private.h
+0
-8
mediacatenum.c
dlls/devenum/mediacatenum.c
+36
-34
No files found.
dlls/devenum/devenum_private.h
View file @
201b72e8
...
...
@@ -72,14 +72,6 @@ typedef struct
typedef
struct
{
const
IEnumMonikerVtbl
*
lpVtbl
;
LONG
ref
;
DWORD
index
;
HKEY
hkey
;
}
EnumMonikerImpl
;
typedef
struct
{
const
IMonikerVtbl
*
lpVtbl
;
LONG
ref
;
HKEY
hkey
;
...
...
dlls/devenum/mediacatenum.c
View file @
201b72e8
...
...
@@ -30,12 +30,19 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
devenum
);
static
ULONG
WINAPI
DEVENUM_IEnumMoniker_AddRef
(
LPENUMMONIKER
iface
);
static
ULONG
WINAPI
DEVENUM_IMediaCatMoniker_AddRef
(
LPMONIKER
iface
);
static
ULONG
WINAPI
DEVENUM_IPropertyBag_AddRef
(
LPPROPERTYBAG
iface
);
typedef
struct
{
IEnumMoniker
IEnumMoniker_iface
;
LONG
ref
;
DWORD
index
;
HKEY
hkey
;
}
EnumMonikerImpl
;
typedef
struct
{
IPropertyBag
IPropertyBag_iface
;
LONG
ref
;
HKEY
hkey
;
...
...
@@ -706,54 +713,48 @@ MediaCatMoniker * DEVENUM_IMediaCatMoniker_Construct(void)
return
pMoniker
;
}
/**********************************************************************
* DEVENUM_IEnumMoniker_QueryInterface (also IUnknown)
*/
static
HRESULT
WINAPI
DEVENUM_IEnumMoniker_QueryInterface
(
LPENUMMONIKER
iface
,
REFIID
riid
,
LPVOID
*
ppvObj
)
static
inline
EnumMonikerImpl
*
impl_from_IEnumMoniker
(
IEnumMoniker
*
iface
)
{
EnumMonikerImpl
*
This
=
(
EnumMonikerImpl
*
)
iface
;
return
CONTAINING_RECORD
(
iface
,
EnumMonikerImpl
,
IEnumMoniker_iface
);
}
TRACE
(
"(%p)->(%s, %p)
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppvObj
);
static
HRESULT
WINAPI
DEVENUM_IEnumMoniker_QueryInterface
(
IEnumMoniker
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
TRACE
(
"(%p)->(%s, %p)
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppv
);
if
(
This
==
NULL
||
ppvObj
==
NULL
)
return
E_POINTER
;
if
(
!
ppv
)
return
E_POINTER
;
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_IEnumMoniker
))
{
*
ppv
Obj
=
iface
;
DEVENUM_
IEnumMoniker_AddRef
(
iface
);
*
ppv
=
iface
;
IEnumMoniker_AddRef
(
iface
);
return
S_OK
;
}
FIXME
(
"- no interface IID: %s
\n
"
,
debugstr_guid
(
riid
));
*
ppv
=
NULL
;
return
E_NOINTERFACE
;
}
/**********************************************************************
* DEVENUM_IEnumMoniker_AddRef (also IUnknown)
*/
static
ULONG
WINAPI
DEVENUM_IEnumMoniker_AddRef
(
LPENUMMONIKER
iface
)
static
ULONG
WINAPI
DEVENUM_IEnumMoniker_AddRef
(
IEnumMoniker
*
iface
)
{
EnumMonikerImpl
*
This
=
(
EnumMonikerImpl
*
)
iface
;
EnumMonikerImpl
*
This
=
impl_from_IEnumMoniker
(
iface
)
;
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)
->() AddRef from %d
\n
"
,
iface
,
ref
-
1
);
TRACE
(
"(%p)
ref=%d
\n
"
,
This
,
ref
);
return
ref
;
}
/**********************************************************************
* DEVENUM_IEnumMoniker_Release (also IUnknown)
*/
static
ULONG
WINAPI
DEVENUM_IEnumMoniker_Release
(
LPENUMMONIKER
iface
)
static
ULONG
WINAPI
DEVENUM_IEnumMoniker_Release
(
IEnumMoniker
*
iface
)
{
EnumMonikerImpl
*
This
=
(
EnumMonikerImpl
*
)
iface
;
EnumMonikerImpl
*
This
=
impl_from_IEnumMoniker
(
iface
)
;
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)
->() Release from %d
\n
"
,
iface
,
ref
+
1
);
TRACE
(
"(%p)
ref=%d
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
...
...
@@ -765,13 +766,14 @@ static ULONG WINAPI DEVENUM_IEnumMoniker_Release(LPENUMMONIKER iface)
return
ref
;
}
static
HRESULT
WINAPI
DEVENUM_IEnumMoniker_Next
(
LPENUMMONIKER
iface
,
ULONG
celt
,
IMoniker
**
rgelt
,
ULONG
*
pceltFetched
)
static
HRESULT
WINAPI
DEVENUM_IEnumMoniker_Next
(
IEnumMoniker
*
iface
,
ULONG
celt
,
IMoniker
**
rgelt
,
ULONG
*
pceltFetched
)
{
EnumMonikerImpl
*
This
=
impl_from_IEnumMoniker
(
iface
);
WCHAR
buffer
[
MAX_PATH
+
1
];
LONG
res
;
ULONG
fetched
=
0
;
MediaCatMoniker
*
pMoniker
;
EnumMonikerImpl
*
This
=
(
EnumMonikerImpl
*
)
iface
;
TRACE
(
"(%p)->(%d, %p, %p)
\n
"
,
iface
,
celt
,
rgelt
,
pceltFetched
);
...
...
@@ -808,9 +810,9 @@ static HRESULT WINAPI DEVENUM_IEnumMoniker_Next(LPENUMMONIKER iface, ULONG celt,
return
S_OK
;
}
static
HRESULT
WINAPI
DEVENUM_IEnumMoniker_Skip
(
LPENUMMONIKER
iface
,
ULONG
celt
)
static
HRESULT
WINAPI
DEVENUM_IEnumMoniker_Skip
(
IEnumMoniker
*
iface
,
ULONG
celt
)
{
EnumMonikerImpl
*
This
=
(
EnumMonikerImpl
*
)
iface
;
EnumMonikerImpl
*
This
=
impl_from_IEnumMoniker
(
iface
)
;
DWORD
subKeys
;
TRACE
(
"(%p)->(%d)
\n
"
,
iface
,
celt
);
...
...
@@ -831,9 +833,9 @@ static HRESULT WINAPI DEVENUM_IEnumMoniker_Skip(LPENUMMONIKER iface, ULONG celt)
return
S_OK
;
}
static
HRESULT
WINAPI
DEVENUM_IEnumMoniker_Reset
(
LPENUMMONIKER
iface
)
static
HRESULT
WINAPI
DEVENUM_IEnumMoniker_Reset
(
IEnumMoniker
*
iface
)
{
EnumMonikerImpl
*
This
=
(
EnumMonikerImpl
*
)
iface
;
EnumMonikerImpl
*
This
=
impl_from_IEnumMoniker
(
iface
)
;
TRACE
(
"(%p)->()
\n
"
,
iface
);
...
...
@@ -842,7 +844,7 @@ static HRESULT WINAPI DEVENUM_IEnumMoniker_Reset(LPENUMMONIKER iface)
return
S_OK
;
}
static
HRESULT
WINAPI
DEVENUM_IEnumMoniker_Clone
(
LPENUMMONIKER
iface
,
IEnumMoniker
**
ppenum
)
static
HRESULT
WINAPI
DEVENUM_IEnumMoniker_Clone
(
IEnumMoniker
*
iface
,
IEnumMoniker
**
ppenum
)
{
FIXME
(
"(%p)->(%p): stub
\n
"
,
iface
,
ppenum
);
...
...
@@ -869,12 +871,12 @@ HRESULT DEVENUM_IEnumMoniker_Construct(HKEY hkey, IEnumMoniker ** ppEnumMoniker)
if
(
!
pEnumMoniker
)
return
E_OUTOFMEMORY
;
pEnumMoniker
->
lpVtbl
=
&
IEnumMoniker_Vtbl
;
pEnumMoniker
->
IEnumMoniker_iface
.
lpVtbl
=
&
IEnumMoniker_Vtbl
;
pEnumMoniker
->
ref
=
1
;
pEnumMoniker
->
index
=
0
;
pEnumMoniker
->
hkey
=
hkey
;
*
ppEnumMoniker
=
(
IEnumMoniker
*
)
pEnumMoniker
;
*
ppEnumMoniker
=
&
pEnumMoniker
->
IEnumMoniker_iface
;
DEVENUM_LockModule
();
...
...
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