Commit e633b453 authored by Vitaly Lipatov's avatar Vitaly Lipatov Committed by Alexandre Julliard

Added some documentation.

parent e41ba5ca
...@@ -155,6 +155,24 @@ static const ILockBytesVtbl HGLOBALLockBytesImpl_Vtbl = ...@@ -155,6 +155,24 @@ static const ILockBytesVtbl HGLOBALLockBytesImpl_Vtbl =
/****************************************************************************** /******************************************************************************
* CreateILockBytesOnHGlobal [OLE32.@] * CreateILockBytesOnHGlobal [OLE32.@]
*
* Create a byte array object which is intended to be the compound file foundation.
* This object supports a COM implementation of the ILockBytes interface.
*
* PARAMS
* hGlobal [ I] Global memory handle
* fDeleteOnRelease [ I] Whether the handle should be freed when the object is released.
* ppLkbyt [ O] Address of ILockBytes pointer that receives
* the interface pointer to the new byte array object.
*
* RETURNS
* Success: S_OK
*
* NOTES
* The supplied ILockBytes pointer can be used by the StgCreateDocfileOnILockBytes
* function to build a compound file on top of this byte array object.
* The ILockBytes interface instance calls the GlobalReAlloc function to grow
* the memory block as required.
*/ */
HRESULT WINAPI CreateILockBytesOnHGlobal(HGLOBAL hGlobal, HRESULT WINAPI CreateILockBytesOnHGlobal(HGLOBAL hGlobal,
BOOL fDeleteOnRelease, BOOL fDeleteOnRelease,
...@@ -176,6 +194,17 @@ HRESULT WINAPI CreateILockBytesOnHGlobal(HGLOBAL hGlobal, ...@@ -176,6 +194,17 @@ HRESULT WINAPI CreateILockBytesOnHGlobal(HGLOBAL hGlobal,
/****************************************************************************** /******************************************************************************
* GetHGlobalFromILockBytes [OLE32.@] * GetHGlobalFromILockBytes [OLE32.@]
*
* Retrieve a global memory handle to a byte array object created
* using the CreateILockBytesOnHGlobal function.
*
* PARAMS
* plkbyt [ I] Pointer to the ILockBytes interface on byte array object
* phglobal [ O] Address to store a global memory handle
* RETURNS
* S_OK if *phglobal has a correct value
* E_INVALIDARG if any parameters are invalid
*
*/ */
HRESULT WINAPI GetHGlobalFromILockBytes(ILockBytes* plkbyt, HGLOBAL* phglobal) HRESULT WINAPI GetHGlobalFromILockBytes(ILockBytes* plkbyt, HGLOBAL* phglobal)
{ {
...@@ -224,10 +253,10 @@ HRESULT WINAPI GetHGlobalFromILockBytes(ILockBytes* plkbyt, HGLOBAL* phglobal) ...@@ -224,10 +253,10 @@ HRESULT WINAPI GetHGlobalFromILockBytes(ILockBytes* plkbyt, HGLOBAL* phglobal)
/****************************************************************************** /******************************************************************************
* This is the constructor for the HGLOBALLockBytesImpl class. * This is the constructor for the HGLOBALLockBytesImpl class.
* *
* Params: * PARAMS
* hGlobal - Handle that will support the stream. can be NULL. * hGlobal [ I] Handle that will support the stream. can be NULL.
* fDeleteOnRelease - Flag set to TRUE if the HGLOBAL will be released * fDeleteOnRelease [ I] Flag set to TRUE if the HGLOBAL will be released
* when the IStream object is destroyed. * when the IStream object is destroyed.
*/ */
HGLOBALLockBytesImpl* HGLOBALLockBytesImpl_Construct(HGLOBAL hGlobal, HGLOBALLockBytesImpl* HGLOBALLockBytesImpl_Construct(HGLOBAL hGlobal,
BOOL fDeleteOnRelease) BOOL fDeleteOnRelease)
......
...@@ -23,6 +23,14 @@ ...@@ -23,6 +23,14 @@
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* NOTES
* The compound file implementation of IStorage used for create
* and manage substorages and streams within a storage object
* residing in a compound file object.
*
* MSDN
* http://msdn.microsoft.com/library/default.asp?url=/library/en-us/stg/stg/istorage_compound_file_implementation.asp
*/ */
#include <assert.h> #include <assert.h>
...@@ -1583,6 +1591,13 @@ HRESULT WINAPI StorageImpl_MoveElementTo( ...@@ -1583,6 +1591,13 @@ HRESULT WINAPI StorageImpl_MoveElementTo(
/************************************************************************* /*************************************************************************
* Commit (IStorage) * Commit (IStorage)
*
* Ensures that any changes made to a storage object open in transacted mode
* are reflected in the parent storage
*
* NOTES
* Wine doesn't implement transacted mode, which seems to be a basic
* optimization, so we can ignore this stub for now.
*/ */
HRESULT WINAPI StorageImpl_Commit( HRESULT WINAPI StorageImpl_Commit(
IStorage* iface, IStorage* iface,
...@@ -1594,6 +1609,8 @@ HRESULT WINAPI StorageImpl_Commit( ...@@ -1594,6 +1609,8 @@ HRESULT WINAPI StorageImpl_Commit(
/************************************************************************* /*************************************************************************
* Revert (IStorage) * Revert (IStorage)
*
* Discard all changes that have been made since the last commit operation
*/ */
HRESULT WINAPI StorageImpl_Revert( HRESULT WINAPI StorageImpl_Revert(
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