IStorage::DestroyElement
This method removes the specified storage or stream object from this storage object.
HRESULT DestroyElement(
WCHAR *pwcsName
);
Parameters
- pwcsName
[in] Pointer to a wide character string that contains the name of the storage or stream to be removed.
Return Values
One of the values described in the following table is returned.
Value | Description |
---|---|
S_OK | The element was successfully removed. |
E_PENDING | Asynchronous Storage only: Part or all of the elements data is currently unavailable. For more information see IFillLockBytes and Asynchronous Storage. |
STG_E_ACCESSDENIED | The caller does not have sufficient permissions for removing the element. |
STG_E_FILENOTFOUND | The element with the specified name does not exist. |
STG_E_INSUFFICIENTMEMORY | The element was not removed due to a lack of memory. |
STG_E_INVALIDNAME | Invalid value for pwcsName. |
STG_E_INVALIDPOINTER | The pointer specified for the element was invalid. |
STG_E_INVALIDPARAMETER | One of the parameters was invalid. |
STG_E_REVERTED | The storage object has been invalidated by a revert operation above it in the transaction tree. |
STG_E_TOOMANYOPENFILES | The element was not removed because there are too many open files. |
Remarks
The DestroyElement method deletes a substorage or stream from the current storage object. After a successful call to DestroyElement, any open instance of the destroyed element from the parent storage becomes invalid.
If a storage object is opened in transacted mode, destruction of an element requires that the call to DestroyElement be followed by a call to IStorage::Commit.
Requirements
Runs on | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 2.0 and later | Objidl.h |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
See Also
IFillLockBytes, IStorage::Commit
Last updated on Tuesday, July 13, 2004
© 1992-2000 Microsoft Corporation. All rights reserved.