Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
4ff5c020
Commit
4ff5c020
authored
14 years ago
by
Michael Stefaniuc
Committed by
Alexandre Julliard
14 years ago
Browse files
Options
Downloads
Patches
Plain Diff
ole32: COM cleanup for the IEnumSTATSTG iface.
parent
40bf2f0e
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/ole32/storage32.c
+19
-15
19 additions, 15 deletions
dlls/ole32/storage32.c
with
19 additions
and
15 deletions
dlls/ole32/storage32.c
+
19
−
15
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
=
(
IEnumSTATSTG
Impl
*
)
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
=
(
IEnumSTATSTG
Impl
*
)
iface
;
IEnumSTATSTGImpl
*
const
This
=
impl_from_
IEnumSTATSTG
(
iface
)
;
return
InterlockedIncrement
(
&
This
->
ref
);
}
static
ULONG
WINAPI
IEnumSTATSTGImpl_Release
(
IEnumSTATSTG
*
iface
)
{
IEnumSTATSTGImpl
*
const
This
=
(
IEnumSTATSTG
Impl
*
)
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
=
(
IEnumSTATSTG
Impl
*
)
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
=
(
IEnumSTATSTG
Impl
*
)
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
=
(
IEnumSTATSTG
Impl
*
)
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
=
(
IEnumSTATSTG
Impl
*
)
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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment