Commit 81887909 authored by Matthew Mastracci's avatar Matthew Mastracci Committed by Alexandre Julliard

Replace StgCreateStorageEx stub with call to StgCreateDocfile and add

required STGFMT_* enumerations.
parent 05a494c2
......@@ -5585,7 +5585,33 @@ HRESULT WINAPI StgCreateStorageEx(const WCHAR* pwcsName, DWORD grfMode, DWORD st
{
TRACE("(%s, %lx, %lx, %lx, %p, %p, %p, %p)\n", debugstr_w(pwcsName),
grfMode, stgfmt, grfAttrs, pStgOptions, reserved, riid, ppObjectOpen);
return STG_E_UNIMPLEMENTEDFUNCTION;
if (stgfmt != STGFMT_FILE && grfAttrs != 0)
{
ERR("grfAttrs must be 0 if stgfmt != STGFMT_FILE\n");
return STG_E_INVALIDPARAMETER;
}
if (stgfmt != STGFMT_FILE && grfAttrs != 0 && grfAttrs != FILE_FLAG_NO_BUFFERING)
{
ERR("grfAttrs must be 0 or FILE_FLAG_NO_BUFFERING if stgfmt == STGFMT_FILE\n");
return STG_E_INVALIDPARAMETER;
}
if (stgfmt == STGFMT_FILE)
{
ERR("Cannot use STGFMT_FILE - this is NTFS only\n");
return STG_E_INVALIDPARAMETER;
}
if (stgfmt == STGFMT_STORAGE || stgfmt == STGFMT_DOCFILE)
{
FIXME("Stub: calling StgCreateDocfile, but ignoring pStgOptions and grfAttrs\n");
return StgCreateDocfile(pwcsName, grfMode, 0, (IStorage **)ppObjectOpen);
}
ERR("Invalid stgfmt argument\n");
return STG_E_INVALIDPARAMETER;
}
/******************************************************************************
......
......@@ -463,6 +463,11 @@ HRESULT WINAPI MonikerRelativePathTo(LPMONIKER pmkSrc, LPMONIKER pmkDest, LPMONI
#define STGM_NOSNAPSHOT 0x00200000
#define STGM_DIRECT_SWMR 0x00400000
#define STGFMT_STORAGE 0
#define STGFMT_FILE 3
#define STGFMT_ANY 4
#define STGFMT_DOCFILE 5
typedef struct tagSTGOPTIONS
{
USHORT usVersion;
......
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