coml2: Move StgIsStorageILockBytes from ole32.
This commit is contained in:
parent
5a0321ac8c
commit
eab7899eb5
3 changed files with 23 additions and 23 deletions
|
@ -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.@)
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue