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
5b79c5a5
Commit
5b79c5a5
authored
Nov 30, 2009
by
Vincent Povirk
Committed by
Alexandre Julliard
Dec 09, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Store the parent of internal storage objects.
parent
8518323e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
11 deletions
+29
-11
storage32.c
dlls/ole32/storage32.c
+29
-11
No files found.
dlls/ole32/storage32.c
View file @
5b79c5a5
...
...
@@ -82,11 +82,13 @@ struct StorageInternalImpl
* Entry in the parent's stream tracking list
*/
struct
list
ParentListEntry
;
StorageBaseImpl
*
parentStorage
;
};
typedef
struct
StorageInternalImpl
StorageInternalImpl
;
/* Method definitions for the Storage32InternalImpl class. */
static
StorageInternalImpl
*
StorageInternalImpl_Construct
(
Storage
Impl
*
ancestor
Storage
,
static
StorageInternalImpl
*
StorageInternalImpl_Construct
(
Storage
BaseImpl
*
parent
Storage
,
DWORD
openFlags
,
DirRef
storageDirEntry
);
static
void
StorageImpl_Destroy
(
StorageBaseImpl
*
iface
);
static
BOOL
StorageImpl_ReadBigBlock
(
StorageImpl
*
This
,
ULONG
blockIndex
,
void
*
buffer
);
...
...
@@ -585,7 +587,7 @@ static HRESULT WINAPI StorageBaseImpl_OpenStorage(
}
newStorage
=
StorageInternalImpl_Construct
(
This
->
ancestorStorage
,
This
,
grfMode
,
storageEntryRef
);
...
...
@@ -3842,49 +3844,63 @@ static void StorageInternalImpl_Destroy( StorageBaseImpl *iface)
static
HRESULT
StorageInternalImpl_CreateDirEntry
(
StorageBaseImpl
*
base
,
const
DirEntry
*
newData
,
DirRef
*
index
)
{
return
StorageBaseImpl_CreateDirEntry
(
&
base
->
ancestorStorage
->
base
,
StorageInternalImpl
*
This
=
(
StorageInternalImpl
*
)
base
;
return
StorageBaseImpl_CreateDirEntry
(
This
->
parentStorage
,
newData
,
index
);
}
static
HRESULT
StorageInternalImpl_WriteDirEntry
(
StorageBaseImpl
*
base
,
DirRef
index
,
const
DirEntry
*
data
)
{
return
StorageBaseImpl_WriteDirEntry
(
&
base
->
ancestorStorage
->
base
,
StorageInternalImpl
*
This
=
(
StorageInternalImpl
*
)
base
;
return
StorageBaseImpl_WriteDirEntry
(
This
->
parentStorage
,
index
,
data
);
}
static
HRESULT
StorageInternalImpl_ReadDirEntry
(
StorageBaseImpl
*
base
,
DirRef
index
,
DirEntry
*
data
)
{
return
StorageBaseImpl_ReadDirEntry
(
&
base
->
ancestorStorage
->
base
,
StorageInternalImpl
*
This
=
(
StorageInternalImpl
*
)
base
;
return
StorageBaseImpl_ReadDirEntry
(
This
->
parentStorage
,
index
,
data
);
}
static
HRESULT
StorageInternalImpl_DestroyDirEntry
(
StorageBaseImpl
*
base
,
DirRef
index
)
{
return
StorageBaseImpl_DestroyDirEntry
(
&
base
->
ancestorStorage
->
base
,
StorageInternalImpl
*
This
=
(
StorageInternalImpl
*
)
base
;
return
StorageBaseImpl_DestroyDirEntry
(
This
->
parentStorage
,
index
);
}
static
HRESULT
StorageInternalImpl_StreamReadAt
(
StorageBaseImpl
*
base
,
DirRef
index
,
ULARGE_INTEGER
offset
,
ULONG
size
,
void
*
buffer
,
ULONG
*
bytesRead
)
{
return
StorageBaseImpl_StreamReadAt
(
&
base
->
ancestorStorage
->
base
,
StorageInternalImpl
*
This
=
(
StorageInternalImpl
*
)
base
;
return
StorageBaseImpl_StreamReadAt
(
This
->
parentStorage
,
index
,
offset
,
size
,
buffer
,
bytesRead
);
}
static
HRESULT
StorageInternalImpl_StreamWriteAt
(
StorageBaseImpl
*
base
,
DirRef
index
,
ULARGE_INTEGER
offset
,
ULONG
size
,
const
void
*
buffer
,
ULONG
*
bytesWritten
)
{
return
StorageBaseImpl_StreamWriteAt
(
&
base
->
ancestorStorage
->
base
,
StorageInternalImpl
*
This
=
(
StorageInternalImpl
*
)
base
;
return
StorageBaseImpl_StreamWriteAt
(
This
->
parentStorage
,
index
,
offset
,
size
,
buffer
,
bytesWritten
);
}
static
HRESULT
StorageInternalImpl_StreamSetSize
(
StorageBaseImpl
*
base
,
DirRef
index
,
ULARGE_INTEGER
newsize
)
{
return
StorageBaseImpl_StreamSetSize
(
&
base
->
ancestorStorage
->
base
,
StorageInternalImpl
*
This
=
(
StorageInternalImpl
*
)
base
;
return
StorageBaseImpl_StreamSetSize
(
This
->
parentStorage
,
index
,
newsize
);
}
...
...
@@ -4345,7 +4361,7 @@ static const StorageBaseImplVtbl StorageInternalImpl_BaseVtbl =
*/
static
StorageInternalImpl
*
StorageInternalImpl_Construct
(
Storage
Impl
*
ancestor
Storage
,
Storage
BaseImpl
*
parent
Storage
,
DWORD
openFlags
,
DirRef
storageDirEntry
)
{
...
...
@@ -4369,7 +4385,9 @@ static StorageInternalImpl* StorageInternalImpl_Construct(
/*
* Keep the ancestor storage pointer but do not nail a reference to it.
*/
newStorage
->
base
.
ancestorStorage
=
ancestorStorage
;
newStorage
->
base
.
ancestorStorage
=
parentStorage
->
ancestorStorage
;
newStorage
->
parentStorage
=
parentStorage
;
/*
* Keep a reference to the directory entry of this storage
...
...
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