Commit eab7899e authored by Fabian Maurer's avatar Fabian Maurer Committed by Alexandre Julliard

coml2: Move StgIsStorageILockBytes from ole32.

parent 5a0321ac
......@@ -23,7 +23,7 @@
@ stub StgCreatePropStg
@ stub StgCreateStorageEx
@ stub StgIsStorageFile
@ stub StgIsStorageILockBytes
@ stdcall StgIsStorageILockBytes(ptr)
@ stub StgOpenPropStg
@ stub StgOpenStorage
@ stub StgOpenStorageEx
......
......@@ -50,6 +50,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(storage);
static const BYTE STORAGE_magic[8] ={0xd0,0xcf,0x11,0xe0,0xa1,0xb1,0x1a,0xe1};
/***********************************************************************
* WriteClassStg [coml2.@]
*/
......@@ -162,3 +164,23 @@ HRESULT WINAPI GetConvertStg(IStorage *stg)
return header[1] & OleStream_Convert ? S_OK : S_FALSE;
}
/******************************************************************************
* StgIsStorageILockBytes [coml2.@]
*/
HRESULT WINAPI StgIsStorageILockBytes(ILockBytes *plkbyt)
{
BYTE sig[sizeof(STORAGE_magic)];
ULARGE_INTEGER offset;
ULONG read = 0;
offset.HighPart = 0;
offset.LowPart = 0;
ILockBytes_ReadAt(plkbyt, offset, sig, sizeof(sig), &read);
if (read == sizeof(sig) && memcmp(sig, STORAGE_magic, sizeof(sig)) == 0)
return S_OK;
return S_FALSE;
}
......@@ -9004,28 +9004,6 @@ HRESULT WINAPI StgSetTimes(OLECHAR const *str, FILETIME const *pctime,
return r;
}
/******************************************************************************
* StgIsStorageILockBytes [OLE32.@]
*
* Determines if the ILockBytes contains a storage object.
*/
HRESULT WINAPI StgIsStorageILockBytes(ILockBytes *plkbyt)
{
BYTE sig[sizeof(STORAGE_magic)];
ULARGE_INTEGER offset;
ULONG read = 0;
offset.HighPart = 0;
offset.LowPart = 0;
ILockBytes_ReadAt(plkbyt, offset, sig, sizeof(sig), &read);
if (read == sizeof(sig) && memcmp(sig, STORAGE_magic, sizeof(sig)) == 0)
return S_OK;
return S_FALSE;
}
/***********************************************************************
* OleLoadFromStream (OLE32.@)
*
......
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