Commit 004e9f94 authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

ole32: Implement StgCreatePropStg.

parent 6e012b52
......@@ -263,6 +263,7 @@
@ stdcall StgCreateDocfile(wstr long long ptr)
@ stdcall StgCreateDocfileOnILockBytes(ptr long long ptr)
@ stdcall StgCreatePropSetStg(ptr long ptr)
@ stdcall StgCreatePropStg(ptr ptr ptr long long ptr)
@ stdcall StgCreateStorageEx(wstr long long long ptr ptr ptr ptr)
@ stub StgGetIFillLockBytesOnFile
@ stub StgGetIFillLockBytesOnILockBytes
......
......@@ -2767,3 +2767,46 @@ SERIALIZEDPROPERTYVALUE* WINAPI StgConvertVariantToProperty(const PROPVARIANT *p
return NULL;
}
HRESULT WINAPI StgCreatePropStg(IUnknown *unk, REFFMTID fmt, const CLSID *clsid,
DWORD flags, DWORD reserved, IPropertyStorage **prop_stg)
{
IStorage *stg;
IStream *stm;
HRESULT r;
TRACE("%p %s %s %08x %d %p\n", unk, debugstr_guid(fmt), debugstr_guid(clsid), flags, reserved, prop_stg);
if (!fmt || reserved)
{
r = E_INVALIDARG;
goto end;
}
if (flags & PROPSETFLAG_NONSIMPLE)
{
r = IUnknown_QueryInterface(unk, &IID_IStorage, (void **)&stg);
if (FAILED(r))
goto end;
/* FIXME: if (flags & PROPSETFLAG_NONSIMPLE), we need to create a
* storage, not a stream. For now, disallow it.
*/
FIXME("PROPSETFLAG_NONSIMPLE not supported\n");
IStorage_Release(stg);
r = STG_E_INVALIDFLAG;
}
else
{
r = IUnknown_QueryInterface(unk, &IID_IStream, (void **)&stm);
if (FAILED(r))
goto end;
r = PropertyStorage_ConstructEmpty(stm, fmt, flags,
STGM_CREATE|STGM_READWRITE|STGM_SHARE_EXCLUSIVE, prop_stg);
}
end:
TRACE("returning 0x%08x\n", r);
return r;
}
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