Split off from https://gitlab.winehq.org/wine/wine/-/merge_requests/3106
-- v2: coml2: Move WriteClassStg from ole32 coml2: Move WriteClassStm from ole32 coml2: Move ReadClassStg from ole32 coml2: Move ReadClassStm from ole32 coml2: Move GetConvertStg from ole32
From: Fabian Maurer dark.shadow4@web.de
--- dlls/coml2/Makefile.in | 7 +++++++ dlls/coml2/coml2.spec | 2 ++ dlls/{ole32 => coml2}/memlockbytes.c | 0 dlls/ole32/Makefile.in | 3 +-- dlls/ole32/ole32.spec | 4 ++-- 5 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 dlls/coml2/Makefile.in create mode 100644 dlls/coml2/coml2.spec rename dlls/{ole32 => coml2}/memlockbytes.c (100%)
diff --git a/dlls/coml2/Makefile.in b/dlls/coml2/Makefile.in new file mode 100644 index 00000000000..9887ccff873 --- /dev/null +++ b/dlls/coml2/Makefile.in @@ -0,0 +1,7 @@ +EXTRADEFS = -DWINOLE32API= +MODULE = coml2.dll +IMPORTLIB = coml2 +IMPORTS = uuid + +SOURCES = \ + memlockbytes.c diff --git a/dlls/coml2/coml2.spec b/dlls/coml2/coml2.spec new file mode 100644 index 00000000000..7070e5ca3b2 --- /dev/null +++ b/dlls/coml2/coml2.spec @@ -0,0 +1,2 @@ +@ stdcall CreateILockBytesOnHGlobal(ptr long ptr) +@ stdcall GetHGlobalFromILockBytes(ptr ptr) diff --git a/dlls/ole32/memlockbytes.c b/dlls/coml2/memlockbytes.c similarity index 100% rename from dlls/ole32/memlockbytes.c rename to dlls/coml2/memlockbytes.c diff --git a/dlls/ole32/Makefile.in b/dlls/ole32/Makefile.in index b65de3bd68a..ee0fcc41f7d 100644 --- a/dlls/ole32/Makefile.in +++ b/dlls/ole32/Makefile.in @@ -1,7 +1,7 @@ EXTRADEFS = -D_OLE32_ MODULE = ole32.dll IMPORTLIB = ole32 -IMPORTS = uuid advapi32 user32 gdi32 combase rpcrt4 kernelbase +IMPORTS = uuid advapi32 user32 gdi32 combase rpcrt4 kernelbase coml2 DELAYIMPORTS = oleaut32
SOURCES = \ @@ -26,7 +26,6 @@ SOURCES = \ irot.idl \ itemmoniker.c \ marshal.c \ - memlockbytes.c \ moniker.c \ nodrop.svg \ ole2.c \ diff --git a/dlls/ole32/ole32.spec b/dlls/ole32/ole32.spec index e9982036eeb..e61b90b20e3 100644 --- a/dlls/ole32/ole32.spec +++ b/dlls/ole32/ole32.spec @@ -101,7 +101,7 @@ @ stdcall CreateErrorInfo(ptr) combase.CreateErrorInfo @ stdcall CreateFileMoniker(wstr ptr) @ stdcall CreateGenericComposite(ptr ptr ptr) -@ stdcall CreateILockBytesOnHGlobal(ptr long ptr) +@ stdcall -import CreateILockBytesOnHGlobal(ptr long ptr) @ stdcall CreateItemMoniker(wstr wstr ptr) @ stdcall CreateObjrefMoniker(ptr ptr) @ stdcall CreateOleAdviseHolder(ptr) @@ -121,7 +121,7 @@ @ stdcall GetConvertStg(ptr) @ stub GetDocumentBitStg @ stdcall GetErrorInfo(long ptr) combase.GetErrorInfo -@ stdcall GetHGlobalFromILockBytes(ptr ptr) +@ stdcall -import GetHGlobalFromILockBytes(ptr ptr) @ stdcall GetHGlobalFromStream(ptr ptr) combase.GetHGlobalFromStream @ stub GetHookInterface @ stdcall GetRunningObjectTable(long ptr)
From: Fabian Maurer dark.shadow4@web.de
--- dlls/coml2/Makefile.in | 3 +- dlls/coml2/coml2.spec | 1 + dlls/coml2/storage32.c | 86 ++++++++++++++++++++++++++++++++++++++++++ dlls/ole32/ole32.spec | 2 +- dlls/ole32/storage32.c | 30 --------------- 5 files changed, 90 insertions(+), 32 deletions(-) create mode 100644 dlls/coml2/storage32.c
diff --git a/dlls/coml2/Makefile.in b/dlls/coml2/Makefile.in index 9887ccff873..5aa96ded363 100644 --- a/dlls/coml2/Makefile.in +++ b/dlls/coml2/Makefile.in @@ -4,4 +4,5 @@ IMPORTLIB = coml2 IMPORTS = uuid
SOURCES = \ - memlockbytes.c + memlockbytes.c \ + storage32.c diff --git a/dlls/coml2/coml2.spec b/dlls/coml2/coml2.spec index 7070e5ca3b2..fb55f26e46c 100644 --- a/dlls/coml2/coml2.spec +++ b/dlls/coml2/coml2.spec @@ -1,2 +1,3 @@ @ stdcall CreateILockBytesOnHGlobal(ptr long ptr) +@ stdcall GetConvertStg(ptr) @ stdcall GetHGlobalFromILockBytes(ptr ptr) diff --git a/dlls/coml2/storage32.c b/dlls/coml2/storage32.c new file mode 100644 index 00000000000..be26358df49 --- /dev/null +++ b/dlls/coml2/storage32.c @@ -0,0 +1,86 @@ +/* + * Compound Storage (32 bit version) + * Storage implementation + * + * This file contains the compound file implementation + * of the storage interface. + * + * Copyright 1999 Francis Beaudet + * Copyright 1999 Sylvain St-Germain + * Copyright 1999 Thuy Nguyen + * Copyright 2005 Mike McCormack + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + * NOTES + * The compound file implementation of IStorage used for create + * and manage substorages and streams within a storage object + * residing in a compound file object. + */ + +#include <assert.h> +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#define COBJMACROS +#include "windef.h" +#include "winbase.h" +#include "winnls.h" +#include "winuser.h" +#include "wine/debug.h" + +#include "ole2.h" /* For Write/ReadClassStm */ + +#include "winreg.h" +#include "wine/wingdi16.h" + +WINE_DEFAULT_DEBUG_CHANNEL(storage); + +enum stream_1ole_flags { + OleStream_LinkedObject = 0x00000001, + OleStream_Convert = 0x00000004 +}; + +/*********************************************************************** + * GetConvertStg (OLE32.@) + */ +HRESULT WINAPI GetConvertStg(IStorage *stg) +{ + static const DWORD version_magic = 0x02000001; + DWORD header[2]; + IStream *stream; + HRESULT hr; + + TRACE("%p\n", stg); + + if (!stg) return E_INVALIDARG; + + hr = IStorage_OpenStream(stg, L"\1Ole", NULL, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &stream); + if (FAILED(hr)) return hr; + + hr = IStream_Read(stream, header, sizeof(header), NULL); + IStream_Release(stream); + if (FAILED(hr)) return hr; + + if (header[0] != version_magic) + { + ERR("got wrong version magic for 1Ole stream, %#lx.\n", header[0]); + return E_FAIL; + } + + return header[1] & OleStream_Convert ? S_OK : S_FALSE; +} diff --git a/dlls/ole32/ole32.spec b/dlls/ole32/ole32.spec index e61b90b20e3..4e6f83dd445 100644 --- a/dlls/ole32/ole32.spec +++ b/dlls/ole32/ole32.spec @@ -118,7 +118,7 @@ @ stdcall FmtIdToPropStgName(ptr wstr) @ stdcall FreePropVariantArray(long ptr) combase.FreePropVariantArray @ stdcall GetClassFile(wstr ptr) -@ stdcall GetConvertStg(ptr) +@ stdcall -import GetConvertStg(ptr) @ stub GetDocumentBitStg @ stdcall GetErrorInfo(long ptr) combase.GetErrorInfo @ stdcall -import GetHGlobalFromILockBytes(ptr ptr) diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 0d3f9922d78..5b11db7ff96 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -10565,36 +10565,6 @@ HRESULT WINAPI OleConvertIStorageToOLESTREAMEx ( LPSTORAGE stg, CLIPFORMAT cf, L return E_NOTIMPL; }
-/*********************************************************************** - * GetConvertStg (OLE32.@) - */ -HRESULT WINAPI GetConvertStg(IStorage *stg) -{ - static const DWORD version_magic = 0x02000001; - DWORD header[2]; - IStream *stream; - HRESULT hr; - - TRACE("%p\n", stg); - - if (!stg) return E_INVALIDARG; - - hr = IStorage_OpenStream(stg, L"\1Ole", NULL, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &stream); - if (FAILED(hr)) return hr; - - hr = IStream_Read(stream, header, sizeof(header), NULL); - IStream_Release(stream); - if (FAILED(hr)) return hr; - - if (header[0] != version_magic) - { - ERR("got wrong version magic for 1Ole stream, %#lx.\n", header[0]); - return E_FAIL; - } - - return header[1] & OleStream_Convert ? S_OK : S_FALSE; -} - /*********************************************************************** * SetConvertStg (OLE32.@) */
From: Fabian Maurer dark.shadow4@web.de
--- dlls/coml2/coml2.spec | 1 + dlls/coml2/storage32.c | 37 +++++++++++++++++++++++++++++++++++++ dlls/ole32/ole32.spec | 2 +- dlls/ole32/storage32.c | 38 -------------------------------------- 4 files changed, 39 insertions(+), 39 deletions(-)
diff --git a/dlls/coml2/coml2.spec b/dlls/coml2/coml2.spec index fb55f26e46c..6573dfffcfb 100644 --- a/dlls/coml2/coml2.spec +++ b/dlls/coml2/coml2.spec @@ -1,3 +1,4 @@ @ stdcall CreateILockBytesOnHGlobal(ptr long ptr) @ stdcall GetConvertStg(ptr) @ stdcall GetHGlobalFromILockBytes(ptr ptr) +@ stdcall ReadClassStm(ptr ptr) diff --git a/dlls/coml2/storage32.c b/dlls/coml2/storage32.c index be26358df49..8e98175d619 100644 --- a/dlls/coml2/storage32.c +++ b/dlls/coml2/storage32.c @@ -50,6 +50,43 @@
WINE_DEFAULT_DEBUG_CHANNEL(storage);
+/*********************************************************************** + * 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; +} + 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 ***********************************************************************/
From: Fabian Maurer dark.shadow4@web.de
--- dlls/coml2/coml2.spec | 1 + dlls/coml2/storage32.c | 35 +++++++++++++++++++++++++++++++++++ dlls/ole32/ole32.spec | 2 +- dlls/ole32/storage32.c | 35 ----------------------------------- 4 files changed, 37 insertions(+), 36 deletions(-)
diff --git a/dlls/coml2/coml2.spec b/dlls/coml2/coml2.spec index 6573dfffcfb..cd3bce931b3 100644 --- a/dlls/coml2/coml2.spec +++ b/dlls/coml2/coml2.spec @@ -1,4 +1,5 @@ @ stdcall CreateILockBytesOnHGlobal(ptr long ptr) @ stdcall GetConvertStg(ptr) @ stdcall GetHGlobalFromILockBytes(ptr ptr) +@ stdcall ReadClassStg(ptr ptr) @ stdcall ReadClassStm(ptr ptr) diff --git a/dlls/coml2/storage32.c b/dlls/coml2/storage32.c index 8e98175d619..0a206cb5855 100644 --- a/dlls/coml2/storage32.c +++ b/dlls/coml2/storage32.c @@ -50,6 +50,41 @@
WINE_DEFAULT_DEBUG_CHANNEL(storage);
+/*********************************************************************** + * ReadClassStg (OLE32.@) + * + * This method reads the CLSID previously written to a storage object with + * the WriteClassStg. + * + * PARAMS + * pstg [I] IStorage pointer + * pclsid [O] Pointer to where the CLSID is written + * + * RETURNS + * Success: S_OK. + * Failure: HRESULT code. + */ +HRESULT WINAPI ReadClassStg(IStorage *pstg, CLSID *pclsid) +{ + STATSTG pstatstg; + HRESULT hRes; + + TRACE("(%p, %p)\n", pstg, pclsid); + + if (!pstg || !pclsid) + return E_INVALIDARG; + + /* + * read a STATSTG structure (contains the clsid) from the storage + */ + hRes = IStorage_Stat(pstg, &pstatstg, STATFLAG_NONAME); + + if (SUCCEEDED(hRes)) + *pclsid = pstatstg.clsid; + + return hRes; +} + /*********************************************************************** * ReadClassStm (OLE32.@) * diff --git a/dlls/ole32/ole32.spec b/dlls/ole32/ole32.spec index 6b8dd4abec9..e9b5a927491 100644 --- a/dlls/ole32/ole32.spec +++ b/dlls/ole32/ole32.spec @@ -246,7 +246,7 @@ @ stdcall PropSysFreeString(wstr) @ stdcall PropVariantClear(ptr) combase.PropVariantClear @ stdcall PropVariantCopy(ptr ptr) combase.PropVariantCopy -@ stdcall ReadClassStg(ptr ptr) +@ stdcall -import ReadClassStg(ptr ptr) @ stdcall -import ReadClassStm(ptr ptr) @ stdcall ReadFmtUserTypeStg(ptr ptr ptr) @ stub ReadOleStg diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index e463400d2bb..33586de5e68 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -9042,41 +9042,6 @@ HRESULT WINAPI WriteClassStg(IStorage* pStg, REFCLSID rclsid) return IStorage_SetClass(pStg, rclsid); }
-/*********************************************************************** - * ReadClassStg (OLE32.@) - * - * This method reads the CLSID previously written to a storage object with - * the WriteClassStg. - * - * PARAMS - * pstg [I] IStorage pointer - * pclsid [O] Pointer to where the CLSID is written - * - * RETURNS - * Success: S_OK. - * Failure: HRESULT code. - */ -HRESULT WINAPI ReadClassStg(IStorage *pstg,CLSID *pclsid){ - - STATSTG pstatstg; - HRESULT hRes; - - TRACE("(%p, %p)\n", pstg, pclsid); - - if(!pstg || !pclsid) - return E_INVALIDARG; - - /* - * read a STATSTG structure (contains the clsid) from the storage - */ - hRes=IStorage_Stat(pstg,&pstatstg,STATFLAG_NONAME); - - if(SUCCEEDED(hRes)) - *pclsid=pstatstg.clsid; - - return hRes; -} - /*********************************************************************** * OleLoadFromStream (OLE32.@) *
From: Fabian Maurer dark.shadow4@web.de
--- dlls/coml2/coml2.spec | 1 + dlls/coml2/storage32.c | 23 +++++++++++++++++++++++ dlls/ole32/ole32.spec | 2 +- dlls/ole32/storage32.c | 23 ----------------------- 4 files changed, 25 insertions(+), 24 deletions(-)
diff --git a/dlls/coml2/coml2.spec b/dlls/coml2/coml2.spec index cd3bce931b3..4ffa41e2d08 100644 --- a/dlls/coml2/coml2.spec +++ b/dlls/coml2/coml2.spec @@ -3,3 +3,4 @@ @ stdcall GetHGlobalFromILockBytes(ptr ptr) @ stdcall ReadClassStg(ptr ptr) @ stdcall ReadClassStm(ptr ptr) +@ stdcall WriteClassStm(ptr ptr) diff --git a/dlls/coml2/storage32.c b/dlls/coml2/storage32.c index 0a206cb5855..c13a73835f5 100644 --- a/dlls/coml2/storage32.c +++ b/dlls/coml2/storage32.c @@ -85,6 +85,29 @@ HRESULT WINAPI ReadClassStg(IStorage *pstg, CLSID *pclsid) return hRes; }
+/*********************************************************************** + * 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); +} + /*********************************************************************** * ReadClassStm (OLE32.@) * diff --git a/dlls/ole32/ole32.spec b/dlls/ole32/ole32.spec index e9b5a927491..416e04832e4 100644 --- a/dlls/ole32/ole32.spec +++ b/dlls/ole32/ole32.spec @@ -295,7 +295,7 @@ @ stdcall WdtpInterfacePointer_UserSize(ptr long long ptr ptr) combase.WdtpInterfacePointer_UserSize @ stdcall WdtpInterfacePointer_UserUnmarshal(ptr ptr ptr ptr) combase.WdtpInterfacePointer_UserUnmarshal @ stdcall WriteClassStg(ptr ptr) -@ stdcall WriteClassStm(ptr ptr) +@ stdcall -import WriteClassStm(ptr ptr) @ stdcall WriteFmtUserTypeStg(ptr long ptr) @ stub WriteOleStg @ stub WriteStringStream 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 ***********************************************************************/
From: Fabian Maurer dark.shadow4@web.de
--- dlls/coml2/coml2.spec | 1 + dlls/coml2/storage32.c | 16 ++++++++++++++++ dlls/ole32/ole32.spec | 2 +- dlls/ole32/storage32.c | 16 ---------------- 4 files changed, 18 insertions(+), 17 deletions(-)
diff --git a/dlls/coml2/coml2.spec b/dlls/coml2/coml2.spec index 4ffa41e2d08..71c099244c4 100644 --- a/dlls/coml2/coml2.spec +++ b/dlls/coml2/coml2.spec @@ -3,4 +3,5 @@ @ stdcall GetHGlobalFromILockBytes(ptr ptr) @ stdcall ReadClassStg(ptr ptr) @ stdcall ReadClassStm(ptr ptr) +@ stdcall WriteClassStg(ptr ptr) @ stdcall WriteClassStm(ptr ptr) diff --git a/dlls/coml2/storage32.c b/dlls/coml2/storage32.c index c13a73835f5..970b8d77f4a 100644 --- a/dlls/coml2/storage32.c +++ b/dlls/coml2/storage32.c @@ -50,6 +50,22 @@
WINE_DEFAULT_DEBUG_CHANNEL(storage);
+/****************************************************************************** + * WriteClassStg [OLE32.@] + * + * This method will store the specified CLSID in the specified storage object + */ +HRESULT WINAPI WriteClassStg(IStorage *pStg, REFCLSID rclsid) +{ + if (!pStg) + return E_INVALIDARG; + + if (!rclsid) + return STG_E_INVALIDPOINTER; + + return IStorage_SetClass(pStg, rclsid); +} + /*********************************************************************** * ReadClassStg (OLE32.@) * diff --git a/dlls/ole32/ole32.spec b/dlls/ole32/ole32.spec index 416e04832e4..4a86152baf7 100644 --- a/dlls/ole32/ole32.spec +++ b/dlls/ole32/ole32.spec @@ -294,7 +294,7 @@ @ stdcall WdtpInterfacePointer_UserMarshal(ptr long ptr ptr ptr) combase.WdtpInterfacePointer_UserMarshal @ stdcall WdtpInterfacePointer_UserSize(ptr long long ptr ptr) combase.WdtpInterfacePointer_UserSize @ stdcall WdtpInterfacePointer_UserUnmarshal(ptr ptr ptr ptr) combase.WdtpInterfacePointer_UserUnmarshal -@ stdcall WriteClassStg(ptr ptr) +@ stdcall -import WriteClassStg(ptr ptr) @ stdcall -import WriteClassStm(ptr ptr) @ stdcall WriteFmtUserTypeStg(ptr long ptr) @ stub WriteOleStg diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 5d1299a5797..3335186ff90 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -9026,22 +9026,6 @@ HRESULT WINAPI StgIsStorageILockBytes(ILockBytes *plkbyt) return S_FALSE; }
-/****************************************************************************** - * WriteClassStg [OLE32.@] - * - * This method will store the specified CLSID in the specified storage object - */ -HRESULT WINAPI WriteClassStg(IStorage* pStg, REFCLSID rclsid) -{ - if(!pStg) - return E_INVALIDARG; - - if(!rclsid) - return STG_E_INVALIDPOINTER; - - return IStorage_SetClass(pStg, rclsid); -} - /*********************************************************************** * OleLoadFromStream (OLE32.@) *
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=140383
Your paranoid android.
=== debian11b (64 bit WoW report) ===
d3d10core: d3d10core.c:16289: Test failed: Format 0x37: slope 1.000000: scale 1.000000, clamp 0.000000: Got value 0xffff (1.00000000e+000), expected 0x1ec (7.50743877e-003).
On Sat Nov 25 21:39:49 2023 +0000, Nikolay Sivov wrote:
As far as I can tell they all should use -import. Also, what do you need storage32.h for?
Thanks, for some reason I thought I needed that header. I'll add it later part by part when it's actually needed.
Nikolay Sivov (@nsivov) commented about dlls/coml2/storage32.c:
+#include "ole2.h" /* For Write/ReadClassStm */
+#include "winreg.h" +#include "wine/wingdi16.h"
+WINE_DEFAULT_DEBUG_CHANNEL(storage);
+enum stream_1ole_flags {
- OleStream_LinkedObject = 0x00000001,
- OleStream_Convert = 0x00000004
+};
+/***********************************************************************
GetConvertStg (OLE32.@)
- */
It's better to change this to a new module name. For other function headers, please remove argument description lines, leaving just three lines like here.
I would also include configure.ac changes when adding a stub, otherwise this only builds after running make_makefiles, which CI does. I don't know if this is required.
Regarding more formatting changes, I would do more for those simple functions, including trace messages and some naming, but others might disagree.