ole32: Only print a FIXME if necessary in StgOpenStorageEx.

This commit is contained in:
Mike McCormack 2006-07-11 11:38:24 +09:00 committed by Alexandre Julliard
parent 5cb1045a2c
commit 55ab809854
1 changed files with 22 additions and 17 deletions

View File

@ -5829,28 +5829,33 @@ HRESULT WINAPI StgOpenStorageEx(const WCHAR* pwcsName, DWORD grfMode, DWORD stgf
return STG_E_INVALIDPARAMETER; return STG_E_INVALIDPARAMETER;
} }
if (stgfmt == STGFMT_DOCFILE && grfAttrs != 0 && grfAttrs != FILE_FLAG_NO_BUFFERING) switch (stgfmt)
{
ERR("grfAttrs must be 0 or FILE_FLAG_NO_BUFFERING if stgfmt == STGFMT_DOCFILE\n");
return STG_E_INVALIDPARAMETER;
}
if (stgfmt == STGFMT_FILE)
{ {
case STGFMT_FILE:
ERR("Cannot use STGFMT_FILE - this is NTFS only\n"); ERR("Cannot use STGFMT_FILE - this is NTFS only\n");
return STG_E_INVALIDPARAMETER; return STG_E_INVALIDPARAMETER;
case STGFMT_STORAGE:
break;
case STGFMT_DOCFILE:
if (grfAttrs && grfAttrs != FILE_FLAG_NO_BUFFERING)
{
ERR("grfAttrs must be 0 or FILE_FLAG_NO_BUFFERING if stgfmt == STGFMT_DOCFILE\n");
return STG_E_INVALIDPARAMETER;
}
FIXME("Stub: calling StgOpenStorage, but ignoring pStgOptions and grfAttrs\n");
break;
case STGFMT_ANY:
WARN("STGFMT_ANY assuming storage\n");
break;
default:
return STG_E_INVALIDPARAMETER;
} }
if (stgfmt == STGFMT_STORAGE || stgfmt == STGFMT_DOCFILE || stgfmt == STGFMT_ANY) return StgOpenStorage(pwcsName, NULL, grfMode, (SNB)NULL, 0, (IStorage **)ppObjectOpen);
{
if (stgfmt == STGFMT_ANY)
WARN("STGFMT_ANY assuming storage\n");
FIXME("Stub: calling StgOpenStorage, but ignoring pStgOptions and grfAttrs\n");
return StgOpenStorage(pwcsName, NULL, grfMode, (SNB)NULL, 0, (IStorage **)ppObjectOpen);
}
ERR("Invalid stgfmt argument\n");
return STG_E_INVALIDPARAMETER;
} }