Commit db69dcb5 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

Add struct StorageBaseImpl at the start of derived structures instead

of trying to keep the first members the same.
parent f7c99e3a
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(storage); WINE_DEFAULT_DEBUG_CHANNEL(storage);
#define _IPropertySetStorage_Offset ((int)(&(((StorageImpl*)0)->pssVtbl))) #define _IPropertySetStorage_Offset ((int)(&(((StorageImpl*)0)->base.pssVtbl)))
#define _ICOM_THIS_From_IPropertySetStorage(class, name) \ #define _ICOM_THIS_From_IPropertySetStorage(class, name) \
class* This = (class*)(((char*)name)-_IPropertySetStorage_Offset) class* This = (class*)(((char*)name)-_IPropertySetStorage_Offset)
......
...@@ -300,19 +300,7 @@ HRESULT WINAPI StorageBaseImpl_SetClass( ...@@ -300,19 +300,7 @@ HRESULT WINAPI StorageBaseImpl_SetClass(
*/ */
struct StorageImpl struct StorageImpl
{ {
IStorageVtbl *lpVtbl; /* Needs to be the first item in the struct struct StorageBaseImpl base;
* since we want to cast this in a Storage32 pointer */
IPropertySetStorageVtbl *pssVtbl; /* interface for adding a properties stream */
/*
* Declare the member of the Storage32BaseImpl class to allow
* casting as a Storage32BaseImpl
*/
ULONG ref;
struct StorageImpl* ancestorStorage;
ULONG rootPropertySetIndex;
void (*v_destructor)(struct StorageImpl*);
/* /*
* The following data members are specific to the Storage32Impl * The following data members are specific to the Storage32Impl
...@@ -409,7 +397,7 @@ HRESULT WINAPI StorageImpl_Stat(IStorage* iface, ...@@ -409,7 +397,7 @@ HRESULT WINAPI StorageImpl_Stat(IStorage* iface,
DWORD grfStatFlag); /* [in] */ DWORD grfStatFlag); /* [in] */
void StorageImpl_Destroy( void StorageImpl_Destroy(
StorageImpl* This); StorageBaseImpl* This);
HRESULT StorageImpl_Construct( HRESULT StorageImpl_Construct(
StorageImpl* This, StorageImpl* This,
...@@ -502,17 +490,7 @@ void Storage32Impl_SetExtDepotBlock(StorageImpl* This, ...@@ -502,17 +490,7 @@ void Storage32Impl_SetExtDepotBlock(StorageImpl* This,
*/ */
struct StorageInternalImpl struct StorageInternalImpl
{ {
IStorageVtbl *lpVtbl; /* Needs to be the first item in the struct struct StorageBaseImpl base;
* since we want to cast this in a Storage32 pointer */
/*
* Declare the member of the Storage32BaseImpl class to allow
* casting as a Storage32BaseImpl
*/
ULONG ref;
struct StorageImpl* ancestorStorage;
ULONG rootPropertySetIndex;
void (*v_destructor)(struct StorageInternalImpl*);
/* /*
* There is no specific data for this class. * There is no specific data for this class.
...@@ -527,7 +505,7 @@ StorageInternalImpl* StorageInternalImpl_Construct( ...@@ -527,7 +505,7 @@ StorageInternalImpl* StorageInternalImpl_Construct(
ULONG rootTropertyIndex); ULONG rootTropertyIndex);
void StorageInternalImpl_Destroy( void StorageInternalImpl_Destroy(
StorageInternalImpl* This); StorageBaseImpl* This);
HRESULT WINAPI StorageInternalImpl_Commit( HRESULT WINAPI StorageInternalImpl_Commit(
IStorage* iface, IStorage* iface,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment