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
ac032593
Commit
ac032593
authored
Jul 14, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 16, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: COM cleanup of IPropertySetStorage interface.
parent
0f36dc8d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
19 deletions
+16
-19
stg_prop.c
dlls/ole32/stg_prop.c
+7
-9
stg_stream.c
dlls/ole32/stg_stream.c
+2
-2
storage32.c
dlls/ole32/storage32.c
+6
-7
storage32.h
dlls/ole32/storage32.h
+1
-1
No files found.
dlls/ole32/stg_prop.c
View file @
ac032593
...
...
@@ -60,7 +60,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(storage);
static
inline
StorageImpl
*
impl_from_IPropertySetStorage
(
IPropertySetStorage
*
iface
)
{
return
(
StorageImpl
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
StorageImpl
,
base
.
pssVtbl
)
);
return
CONTAINING_RECORD
(
iface
,
StorageImpl
,
base
.
IPropertySetStorage_iface
);
}
/* These are documented in MSDN,
...
...
@@ -2100,7 +2100,7 @@ static HRESULT WINAPI IPropertySetStorage_fnQueryInterface(
void
**
ppvObject
)
{
StorageImpl
*
This
=
impl_from_IPropertySetStorage
(
ppstg
);
return
IStorage_QueryInterface
(
(
IStorage
*
)
This
,
riid
,
ppvObject
);
return
IStorage_QueryInterface
(
&
This
->
base
.
IStorage_iface
,
riid
,
ppvObject
);
}
/************************************************************************
...
...
@@ -2112,7 +2112,7 @@ static ULONG WINAPI IPropertySetStorage_fnAddRef(
IPropertySetStorage
*
ppstg
)
{
StorageImpl
*
This
=
impl_from_IPropertySetStorage
(
ppstg
);
return
IStorage_AddRef
(
(
IStorage
*
)
This
);
return
IStorage_AddRef
(
&
This
->
base
.
IStorage_iface
);
}
/************************************************************************
...
...
@@ -2124,7 +2124,7 @@ static ULONG WINAPI IPropertySetStorage_fnRelease(
IPropertySetStorage
*
ppstg
)
{
StorageImpl
*
This
=
impl_from_IPropertySetStorage
(
ppstg
);
return
IStorage_Release
(
(
IStorage
*
)
This
);
return
IStorage_Release
(
&
This
->
base
.
IStorage_iface
);
}
/************************************************************************
...
...
@@ -2173,7 +2173,7 @@ static HRESULT WINAPI IPropertySetStorage_fnCreate(
if
(
FAILED
(
r
))
goto
end
;
r
=
IStorage_CreateStream
(
(
IStorage
*
)
This
,
name
,
grfMode
,
0
,
0
,
&
stm
);
r
=
IStorage_CreateStream
(
&
This
->
base
.
IStorage_iface
,
name
,
grfMode
,
0
,
0
,
&
stm
);
if
(
FAILED
(
r
))
goto
end
;
...
...
@@ -2218,7 +2218,7 @@ static HRESULT WINAPI IPropertySetStorage_fnOpen(
if
(
FAILED
(
r
))
goto
end
;
r
=
IStorage_OpenStream
(
(
IStorage
*
)
This
,
name
,
0
,
grfMode
,
0
,
&
stm
);
r
=
IStorage_OpenStream
(
&
This
->
base
.
IStorage_iface
,
name
,
0
,
grfMode
,
0
,
&
stm
);
if
(
FAILED
(
r
))
goto
end
;
...
...
@@ -2237,7 +2237,6 @@ static HRESULT WINAPI IPropertySetStorage_fnDelete(
REFFMTID
rfmtid
)
{
StorageImpl
*
This
=
impl_from_IPropertySetStorage
(
ppstg
);
IStorage
*
stg
=
NULL
;
WCHAR
name
[
CCH_MAX_PROPSTG_NAME
];
HRESULT
r
;
...
...
@@ -2250,8 +2249,7 @@ static HRESULT WINAPI IPropertySetStorage_fnDelete(
if
(
FAILED
(
r
))
return
r
;
stg
=
(
IStorage
*
)
This
;
return
IStorage_DestroyElement
(
stg
,
name
);
return
IStorage_DestroyElement
(
&
This
->
base
.
IStorage_iface
,
name
);
}
/************************************************************************
...
...
dlls/ole32/stg_stream.c
View file @
ac032593
...
...
@@ -57,7 +57,7 @@ static void StgStreamImpl_Destroy(StgStreamImpl* This)
/*
* Release the reference we are holding on the parent storage.
* IStorage_Release(
(IStorage*)This->parentStorag
e);
* IStorage_Release(
&This->parentStorage->IStorage_ifac
e);
*
* No, don't do this. Some apps call IStorage_Release without
* calling IStream_Release first. If we grab a reference the
...
...
@@ -719,7 +719,7 @@ StgStreamImpl* StgStreamImpl_Construct(
* We want to nail-down the reference to the storage in case the
* stream out-lives the storage in the client application.
*
* -- IStorage_AddRef(
(IStorage*)newStream->parentStorag
e);
* -- IStorage_AddRef(
&newStream->parentStorage->IStorage_ifac
e);
*
* No, don't do this. Some apps call IStorage_Release without
* calling IStream_Release first. If we grab a reference the
...
...
dlls/ole32/storage32.c
View file @
ac032593
...
...
@@ -373,11 +373,11 @@ static HRESULT WINAPI StorageBaseImpl_QueryInterface(
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
)
||
IsEqualGUID
(
&
IID_IStorage
,
riid
))
{
*
ppvObject
=
This
;
*
ppvObject
=
&
This
->
IStorage_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IPropertySetStorage
,
riid
))
{
*
ppvObject
=
&
This
->
pssVtbl
;
*
ppvObject
=
&
This
->
IPropertySetStorage_iface
;
}
if
((
*
ppvObject
)
==
0
)
...
...
@@ -2718,7 +2718,7 @@ static HRESULT StorageImpl_Construct(
list_init
(
&
This
->
base
.
storageHead
);
This
->
base
.
IStorage_iface
.
lpVtbl
=
&
Storage32Impl_Vtbl
;
This
->
base
.
pss
Vtbl
=
&
IPropertySetStorage_Vtbl
;
This
->
base
.
IPropertySetStorage_iface
.
lp
Vtbl
=
&
IPropertySetStorage_Vtbl
;
This
->
base
.
baseVtbl
=
&
StorageImpl_BaseVtbl
;
This
->
base
.
openFlags
=
(
openFlags
&
~
STGM_CREATE
);
This
->
base
.
ref
=
1
;
...
...
@@ -5095,8 +5095,7 @@ static HRESULT TransactedSnapshotImpl_Construct(StorageBaseImpl *parentStorage,
(
*
result
)
->
base
.
IStorage_iface
.
lpVtbl
=
&
TransactedSnapshotImpl_Vtbl
;
/* This is OK because the property set storage functions use the IStorage functions. */
(
*
result
)
->
base
.
pssVtbl
=
parentStorage
->
pssVtbl
;
(
*
result
)
->
base
.
IPropertySetStorage_iface
.
lpVtbl
=
parentStorage
->
IPropertySetStorage_iface
.
lpVtbl
;
(
*
result
)
->
base
.
baseVtbl
=
&
TransactedSnapshotImpl_BaseVtbl
;
list_init
(
&
(
*
result
)
->
base
.
strmHead
);
...
...
@@ -5693,7 +5692,7 @@ static StorageInternalImpl* StorageInternalImpl_Construct(
* Initialize the virtual function table.
*/
newStorage
->
base
.
IStorage_iface
.
lpVtbl
=
&
Storage32InternalImpl_Vtbl
;
newStorage
->
base
.
pss
Vtbl
=
&
IPropertySetStorage_Vtbl
;
newStorage
->
base
.
IPropertySetStorage_iface
.
lp
Vtbl
=
&
IPropertySetStorage_Vtbl
;
newStorage
->
base
.
baseVtbl
=
&
StorageInternalImpl_BaseVtbl
;
newStorage
->
base
.
openFlags
=
(
openFlags
&
~
STGM_CREATE
);
...
...
@@ -9519,7 +9518,7 @@ HRESULT WINAPI ReadClassStm(IStream *pStm,CLSID *pclsid)
/* clear the output args */
*
pclsid
=
CLSID_NULL
;
res
=
IStream_Read
(
pStm
,
(
void
*
)
pclsid
,
sizeof
(
CLSID
),
&
nbByte
);
res
=
IStream_Read
(
pStm
,
pclsid
,
sizeof
(
CLSID
),
&
nbByte
);
if
(
FAILED
(
res
))
return
res
;
...
...
dlls/ole32/storage32.h
View file @
ac032593
...
...
@@ -176,7 +176,7 @@ HRESULT OLECONVERT_CreateCompObjStream(LPSTORAGE pStorage, LPCSTR strOleTypeName
struct
StorageBaseImpl
{
IStorage
IStorage_iface
;
const
IPropertySetStorageVtbl
*
pssVtbl
;
/* interface for adding a properties stream */
IPropertySetStorage
IPropertySetStorage_iface
;
/* interface for adding a properties stream */
LONG
ref
;
/*
...
...
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