Module: wine Branch: master Commit: 754631becb83b2d1316385b907c55fbbced34158 URL: https://gitlab.winehq.org/wine/wine/-/commit/754631becb83b2d1316385b907c55fb...
Author: Fabian Maurer dark.shadow4@web.de Date: Sat Nov 25 22:37:38 2023 +0100
coml2: Move WriteClassStm from ole32.
---
dlls/coml2/coml2.spec | 2 +- dlls/coml2/storage32.c | 13 +++++++++++++ dlls/ole32/storage32.c | 23 ----------------------- 3 files changed, 14 insertions(+), 24 deletions(-)
diff --git a/dlls/coml2/coml2.spec b/dlls/coml2/coml2.spec index a41482bc46e..79aaba8346c 100644 --- a/dlls/coml2/coml2.spec +++ b/dlls/coml2/coml2.spec @@ -30,4 +30,4 @@ @ stub StgOpenStorageOnILockBytes @ stub StgSetTimes @ stub WriteClassStg -@ stub WriteClassStm +@ stdcall WriteClassStm(ptr ptr) diff --git a/dlls/coml2/storage32.c b/dlls/coml2/storage32.c index 06a58749c5d..40fc7ff9a2e 100644 --- a/dlls/coml2/storage32.c +++ b/dlls/coml2/storage32.c @@ -74,6 +74,19 @@ HRESULT WINAPI ReadClassStg(IStorage *pstg, CLSID *pclsid) return hRes; }
+/*********************************************************************** + * WriteClassStm (coml2.@) + */ +HRESULT WINAPI WriteClassStm(IStream *pStm, REFCLSID rclsid) +{ + TRACE("(%p,%p)\n", pStm, rclsid); + + if (!pStm || !rclsid) + return E_INVALIDARG; + + return IStream_Write(pStm, rclsid, sizeof(CLSID), NULL); +} + /*********************************************************************** * ReadClassStm (coml2.@) */ diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 33586de5e68..5d1299a5797 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -9426,29 +9426,6 @@ StgIsStorageFile(LPCOLESTR fn) return S_FALSE; }
-/*********************************************************************** - * WriteClassStm (OLE32.@) - * - * Writes a CLSID to a stream. - * - * PARAMS - * pStm [I] Stream to write to. - * rclsid [I] CLSID to write. - * - * RETURNS - * Success: S_OK. - * Failure: HRESULT code. - */ -HRESULT WINAPI WriteClassStm(IStream *pStm,REFCLSID rclsid) -{ - TRACE("(%p,%p)\n",pStm,rclsid); - - if (!pStm || !rclsid) - return E_INVALIDARG; - - return IStream_Write(pStm,rclsid,sizeof(CLSID),NULL); -} - /************************************************************************ * OleConvert Functions ***********************************************************************/