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
29c5ba5a
Commit
29c5ba5a
authored
Nov 02, 2009
by
Vincent Povirk
Committed by
Alexandre Julliard
Nov 03, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Add and use a destroyDirEntry function for deleting directory entries.
We need this so we can free any related resources in memory.
parent
bdc4755d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
6 deletions
+29
-6
storage32.c
dlls/ole32/storage32.c
+29
-6
No files found.
dlls/ole32/storage32.c
View file @
29c5ba5a
...
...
@@ -183,6 +183,10 @@ static HRESULT createDirEntry(
const
StgProperty
*
newData
,
ULONG
*
index
);
static
HRESULT
destroyDirEntry
(
StorageImpl
*
storage
,
ULONG
index
);
static
void
updatePropertyChain
(
StorageBaseImpl
*
storage
,
ULONG
newPropertyIndex
,
...
...
@@ -1257,6 +1261,27 @@ static HRESULT createDirEntry(
return
hr
;
}
/***************************************************************************
*
* Internal Method
*
* Mark a directory entry in the file as free.
*/
static
HRESULT
destroyDirEntry
(
StorageImpl
*
storage
,
ULONG
index
)
{
HRESULT
hr
;
BYTE
emptyData
[
PROPSET_BLOCK_SIZE
];
memset
(
&
emptyData
,
0
,
PROPSET_BLOCK_SIZE
);
hr
=
StorageImpl_WriteRawDirEntry
(
storage
,
index
,
emptyData
);
return
hr
;
}
/****************************************************************************
*
* Internal Method
...
...
@@ -1802,13 +1827,11 @@ static HRESULT WINAPI StorageBaseImpl_DestroyElement(
foundPropertyIndexToDelete
);
/*
* Invalidate the property
by zeroing its name member.
* Invalidate the property
*/
propertyToDelete
.
sizeOfNameString
=
0
;
StorageImpl_WriteProperty
(
This
->
ancestorStorage
,
foundPropertyIndexToDelete
,
&
propertyToDelete
);
if
(
SUCCEEDED
(
hr
))
destroyDirEntry
(
This
->
ancestorStorage
,
foundPropertyIndexToDelete
);
return
hr
;
}
...
...
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