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
4ff5c020
Commit
4ff5c020
authored
Jan 04, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 04, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: COM cleanup for the IEnumSTATSTG iface.
parent
40bf2f0e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
15 deletions
+19
-15
storage32.c
dlls/ole32/storage32.c
+19
-15
No files found.
dlls/ole32/storage32.c
View file @
4ff5c020
...
...
@@ -296,8 +296,7 @@ extern const IPropertySetStorageVtbl IPropertySetStorage_Vtbl;
*/
struct
IEnumSTATSTGImpl
{
const
IEnumSTATSTGVtbl
*
lpVtbl
;
/* Needs to be the first item in the struct
* since we want to cast this in an IEnumSTATSTG pointer */
IEnumSTATSTG
IEnumSTATSTG_iface
;
LONG
ref
;
/* Reference count */
StorageBaseImpl
*
parentStorage
;
/* Reference to the parent storage */
...
...
@@ -306,6 +305,11 @@ struct IEnumSTATSTGImpl
WCHAR
name
[
DIRENTRY_NAME_MAX_LEN
];
/* The most recent name visited */
};
static
inline
IEnumSTATSTGImpl
*
impl_from_IEnumSTATSTG
(
IEnumSTATSTG
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IEnumSTATSTGImpl
,
IEnumSTATSTG_iface
);
}
static
IEnumSTATSTGImpl
*
IEnumSTATSTGImpl_Construct
(
StorageBaseImpl
*
This
,
DirRef
storageDirEntry
);
static
void
IEnumSTATSTGImpl_Destroy
(
IEnumSTATSTGImpl
*
This
);
...
...
@@ -711,7 +715,7 @@ static HRESULT WINAPI StorageBaseImpl_EnumElements(
if
(
newEnum
!=
0
)
{
*
ppenum
=
(
IEnumSTATSTG
*
)
newEnum
;
*
ppenum
=
&
newEnum
->
IEnumSTATSTG_iface
;
IEnumSTATSTG_AddRef
(
*
ppenum
);
...
...
@@ -5292,7 +5296,7 @@ static HRESULT WINAPI IEnumSTATSTGImpl_QueryInterface(
REFIID
riid
,
void
**
ppvObject
)
{
IEnumSTATSTGImpl
*
const
This
=
(
IEnumSTATSTGImpl
*
)
iface
;
IEnumSTATSTGImpl
*
const
This
=
impl_from_IEnumSTATSTG
(
iface
)
;
if
(
ppvObject
==
0
)
return
E_INVALIDARG
;
...
...
@@ -5303,7 +5307,7 @@ static HRESULT WINAPI IEnumSTATSTGImpl_QueryInterface(
IsEqualGUID
(
&
IID_IEnumSTATSTG
,
riid
))
{
*
ppvObject
=
This
;
IEnumSTATSTG_AddRef
(
(
IEnumSTATSTG
*
)
This
);
IEnumSTATSTG_AddRef
(
&
This
->
IEnumSTATSTG_iface
);
return
S_OK
;
}
...
...
@@ -5313,14 +5317,14 @@ static HRESULT WINAPI IEnumSTATSTGImpl_QueryInterface(
static
ULONG
WINAPI
IEnumSTATSTGImpl_AddRef
(
IEnumSTATSTG
*
iface
)
{
IEnumSTATSTGImpl
*
const
This
=
(
IEnumSTATSTGImpl
*
)
iface
;
IEnumSTATSTGImpl
*
const
This
=
impl_from_IEnumSTATSTG
(
iface
)
;
return
InterlockedIncrement
(
&
This
->
ref
);
}
static
ULONG
WINAPI
IEnumSTATSTGImpl_Release
(
IEnumSTATSTG
*
iface
)
{
IEnumSTATSTGImpl
*
const
This
=
(
IEnumSTATSTGImpl
*
)
iface
;
IEnumSTATSTGImpl
*
const
This
=
impl_from_IEnumSTATSTG
(
iface
)
;
ULONG
newRef
;
...
...
@@ -5385,7 +5389,7 @@ static HRESULT WINAPI IEnumSTATSTGImpl_Next(
STATSTG
*
rgelt
,
ULONG
*
pceltFetched
)
{
IEnumSTATSTGImpl
*
const
This
=
(
IEnumSTATSTGImpl
*
)
iface
;
IEnumSTATSTGImpl
*
const
This
=
impl_from_IEnumSTATSTG
(
iface
)
;
DirEntry
currentEntry
;
STATSTG
*
currentReturnStruct
=
rgelt
;
...
...
@@ -5452,9 +5456,9 @@ static HRESULT WINAPI IEnumSTATSTGImpl_Skip(
IEnumSTATSTG
*
iface
,
ULONG
celt
)
{
IEnumSTATSTGImpl
*
const
This
=
(
IEnumSTATSTGImpl
*
)
iface
;
IEnumSTATSTGImpl
*
const
This
=
impl_from_IEnumSTATSTG
(
iface
)
;
ULONG
objectFetched
=
0
;
ULONG
objectFetched
=
0
;
DirRef
currentSearchNode
;
HRESULT
hr
=
S_OK
;
...
...
@@ -5480,7 +5484,7 @@ static HRESULT WINAPI IEnumSTATSTGImpl_Skip(
static
HRESULT
WINAPI
IEnumSTATSTGImpl_Reset
(
IEnumSTATSTG
*
iface
)
{
IEnumSTATSTGImpl
*
const
This
=
(
IEnumSTATSTGImpl
*
)
iface
;
IEnumSTATSTGImpl
*
const
This
=
impl_from_IEnumSTATSTG
(
iface
)
;
if
(
This
->
parentStorage
->
reverted
)
return
STG_E_REVERTED
;
...
...
@@ -5494,7 +5498,7 @@ static HRESULT WINAPI IEnumSTATSTGImpl_Clone(
IEnumSTATSTG
*
iface
,
IEnumSTATSTG
**
ppenum
)
{
IEnumSTATSTGImpl
*
const
This
=
(
IEnumSTATSTGImpl
*
)
iface
;
IEnumSTATSTGImpl
*
const
This
=
impl_from_IEnumSTATSTG
(
iface
)
;
IEnumSTATSTGImpl
*
newClone
;
...
...
@@ -5517,7 +5521,7 @@ static HRESULT WINAPI IEnumSTATSTGImpl_Clone(
*/
memcpy
(
newClone
->
name
,
This
->
name
,
sizeof
(
newClone
->
name
));
*
ppenum
=
(
IEnumSTATSTG
*
)
newClon
e
;
*
ppenum
=
&
newClone
->
IEnumSTATSTG_ifac
e
;
/*
* Don't forget to nail down a reference to the clone before
...
...
@@ -5559,7 +5563,7 @@ static IEnumSTATSTGImpl* IEnumSTATSTGImpl_Construct(
/*
* Set-up the virtual function table and reference count.
*/
newEnumeration
->
lpVtbl
=
&
IEnumSTATSTGImpl_Vtbl
;
newEnumeration
->
IEnumSTATSTG_iface
.
lpVtbl
=
&
IEnumSTATSTGImpl_Vtbl
;
newEnumeration
->
ref
=
0
;
/*
...
...
@@ -5574,7 +5578,7 @@ static IEnumSTATSTGImpl* IEnumSTATSTGImpl_Construct(
/*
* Make sure the current node of the iterator is the first one.
*/
IEnumSTATSTGImpl_Reset
(
(
IEnumSTATSTG
*
)
newEnumeration
);
IEnumSTATSTGImpl_Reset
(
&
newEnumeration
->
IEnumSTATSTG_iface
);
}
return
newEnumeration
;
...
...
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