From: Fabian Maurer dark.shadow4@web.de
--- dlls/coml2/coml2.spec | 2 +- dlls/coml2/storage32.c | 27 +++++++++++++++++++++++++++ dlls/ole32/ole32.spec | 2 +- dlls/ole32/storage32.c | 38 -------------------------------------- 4 files changed, 29 insertions(+), 40 deletions(-)
diff --git a/dlls/coml2/coml2.spec b/dlls/coml2/coml2.spec index ae4ffcd8af8..9cac5f9d01f 100644 --- a/dlls/coml2/coml2.spec +++ b/dlls/coml2/coml2.spec @@ -16,7 +16,7 @@ @ stdcall GetHGlobalFromILockBytes(ptr ptr) @ stub PropStgNameToFmtId @ stub ReadClassStg -@ stub ReadClassStm +@ stdcall ReadClassStm(ptr ptr) @ stub StgCreateDocfile @ stub StgCreateDocfileOnILockBytes @ stub StgCreatePropSetStg diff --git a/dlls/coml2/storage32.c b/dlls/coml2/storage32.c index 1a14b14851e..051555566ef 100644 --- a/dlls/coml2/storage32.c +++ b/dlls/coml2/storage32.c @@ -50,6 +50,33 @@
WINE_DEFAULT_DEBUG_CHANNEL(storage);
+/*********************************************************************** + * ReadClassStm (coml2.@) + */ +HRESULT WINAPI ReadClassStm(IStream *pStm, CLSID *pclsid) +{ + ULONG nbByte; + HRESULT res; + + TRACE("(%p,%p)\n", pStm, pclsid); + + if (!pStm || !pclsid) + return E_INVALIDARG; + + /* clear the output args */ + *pclsid = CLSID_NULL; + + res = IStream_Read(pStm, pclsid, sizeof(CLSID), &nbByte); + + if (FAILED(res)) + return res; + + if (nbByte != sizeof(CLSID)) + return STG_E_READFAULT; + else + return S_OK; +} + enum stream_1ole_flags { OleStream_LinkedObject = 0x00000001, OleStream_Convert = 0x00000004 diff --git a/dlls/ole32/ole32.spec b/dlls/ole32/ole32.spec index 4e6f83dd445..6b8dd4abec9 100644 --- a/dlls/ole32/ole32.spec +++ b/dlls/ole32/ole32.spec @@ -247,7 +247,7 @@ @ stdcall PropVariantClear(ptr) combase.PropVariantClear @ stdcall PropVariantCopy(ptr ptr) combase.PropVariantCopy @ stdcall ReadClassStg(ptr ptr) -@ stdcall ReadClassStm(ptr ptr) +@ stdcall -import ReadClassStm(ptr ptr) @ stdcall ReadFmtUserTypeStg(ptr ptr ptr) @ stub ReadOleStg @ stub ReadStringStream diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 5b11db7ff96..e463400d2bb 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -9484,44 +9484,6 @@ HRESULT WINAPI WriteClassStm(IStream *pStm,REFCLSID rclsid) return IStream_Write(pStm,rclsid,sizeof(CLSID),NULL); }
-/*********************************************************************** - * ReadClassStm (OLE32.@) - * - * Reads a CLSID from a stream. - * - * PARAMS - * pStm [I] Stream to read from. - * rclsid [O] CLSID to read. - * - * RETURNS - * Success: S_OK. - * Failure: HRESULT code. - */ -HRESULT WINAPI ReadClassStm(IStream *pStm,CLSID *pclsid) -{ - ULONG nbByte; - HRESULT res; - - TRACE("(%p,%p)\n",pStm,pclsid); - - if (!pStm || !pclsid) - return E_INVALIDARG; - - /* clear the output args */ - *pclsid = CLSID_NULL; - - res = IStream_Read(pStm, pclsid, sizeof(CLSID), &nbByte); - - if (FAILED(res)) - return res; - - if (nbByte != sizeof(CLSID)) - return STG_E_READFAULT; - else - return S_OK; -} - - /************************************************************************ * OleConvert Functions ***********************************************************************/