Stub added for the IEnumObjects interface, so that programs won't crash when calling it.
From: Kevin Martinez 137180189+kevinrmartinez@users.noreply.github.com
--- dlls/shell32/Makefile.in | 1 + dlls/shell32/enumobjects.c | 195 +++++++++++++++++++++++++++++++ dlls/shell32/shell32_classes.idl | 5 + dlls/shell32/shell32_main.h | 2 + dlls/shell32/shellole.c | 1 + include/shobjidl.idl | 23 ++++ 6 files changed, 227 insertions(+) create mode 100644 dlls/shell32/enumobjects.c
diff --git a/dlls/shell32/Makefile.in b/dlls/shell32/Makefile.in index 4a906ac59db..c2df32b62ec 100644 --- a/dlls/shell32/Makefile.in +++ b/dlls/shell32/Makefile.in @@ -21,6 +21,7 @@ SOURCES = \ dragdrophelper.c \ ebrowser.c \ enumidlist.c \ + enumobjects.c \ folders.c \ iconcache.c \ new_menu.c \ diff --git a/dlls/shell32/enumobjects.c b/dlls/shell32/enumobjects.c new file mode 100644 index 00000000000..b4933304cdb --- /dev/null +++ b/dlls/shell32/enumobjects.c @@ -0,0 +1,195 @@ +/* + * IEnumObjects + * + * Copyright 2024 Kevin Martinez + * + * 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 + */ + +#include <stdarg.h> +#include <stdlib.h> +#include <string.h> + +#define COBJMACROS + +#include "wine/debug.h" +#include "windef.h" +#include "winbase.h" +#include "winreg.h" +#include "shlwapi.h" + +#include "shell32_main.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +typedef struct +{ + IEnumObjects IEnumObjects_iface; + LONG ref; + struct list objls; + struct list *current; +} IEnumObjectsImpl; + +static inline IEnumObjectsImpl *impl_from_IEnumObjects(IEnumObjects *iface) +{ + return CONTAINING_RECORD(iface, IEnumObjectsImpl, IEnumObjects_iface); +} + +/************************************************************************** + * IEnumObjects_fnQueryInterface + * + * See IUnknown_QueryInterface. + */ +static HRESULT WINAPI IEnumObjects_fnQueryInterface(IEnumObjects *iface, REFIID riid, void **obj) +{ + IEnumObjectsImpl *This = impl_from_IEnumObjects(iface); + + TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), obj); + + if (IsEqualIID(&IID_IUnknown, riid) || + IsEqualIID(&IID_IEnumObjects, riid)) + { + *obj = &This->IEnumObjects_iface; + } + else + { + WARN("no interface for %s\n", debugstr_guid(riid)); + *obj = NULL; + return E_NOINTERFACE; + } + + IUnknown_AddRef((IUnknown*)*obj); + return S_OK; +} + +/************************************************************************** + * IEnumObjects_fnAddRef + * + * See IUnknown_AddRef. + */ +static ULONG WINAPI IEnumObjects_fnAddRef(IEnumObjects *iface) +{ + IEnumObjectsImpl *This = impl_from_IEnumObjects(iface); + ULONG refCount = InterlockedIncrement(&This->ref); + + TRACE("(%p)->(%lu)\n", This, refCount - 1); + + return refCount; +} + +/************************************************************************** + * IEnumObjects_fnRelease + * + * See IUnknown_Release. + */ + static ULONG WINAPI IEnumObjects_fnRelease(IEnumObjects *iface) +{ + IEnumObjectsImpl *This = impl_from_IEnumObjects(iface); + ULONG refCount = InterlockedDecrement(&This->ref); + + TRACE("(%p)->(%lu)\n", This, refCount + 1); + + if (!refCount) + { + list_remove(&This->objls); + free(This); + } + + return refCount; +} + +/************************************************************************** + * IEnumIDList::Next + */ +static HRESULT WINAPI IEnumObjects_fnNext(IEnumObjects *iface, ULONG celt, REFIID riid, void **rgelt, ULONG *celtFetched) +{ + IEnumObjectsImpl *This = impl_from_IEnumObjects(iface); + + FIXME("%p (%ld, %p, %p, %ln ): stud!\n", This, celt, debugstr_guid(riid), rgelt, celtFetched); + + return E_NOTIMPL; +} + +/************************************************************************** + * IEnumObjects::Skip + */ +static HRESULT WINAPI IEnumObjects_fnSkip(IEnumObjects *iface, ULONG celt) +{ + IEnumObjectsImpl *This = impl_from_IEnumObjects(iface); + + FIXME("(%p)->(%ld): stud!\n", This, celt); + + return E_NOTIMPL; +} + +/************************************************************************** + * IEnumObjects::Reset + */ +static HRESULT WINAPI IEnumObjects_fnReset(IEnumObjects *iface) +{ + IEnumObjectsImpl *This = impl_from_IEnumObjects(iface); + + FIXME("(%p)->() semi-stub\n", This); + + This->current = list_head(&This->objls); + return S_OK; +} + +/************************************************************************** + * IEnumObjects::Clone + */ +static HRESULT WINAPI IEnumObjects_fnClone(IEnumObjects *iface, IEnumObjects **ppenum) +{ + IEnumObjectsImpl *This = impl_from_IEnumObjects(iface); + + WARN("(%p)->(%p): Not implemented.\n",This, ppenum); + + return E_NOTIMPL; +} + +static const IEnumObjectsVtbl eobjlvt = +{ + IEnumObjects_fnQueryInterface, + IEnumObjects_fnAddRef, + IEnumObjects_fnRelease, + IEnumObjects_fnNext, + IEnumObjects_fnSkip, + IEnumObjects_fnReset, + IEnumObjects_fnClone, +}; + +HRESULT WINAPI IEnumObjects_Constructor(IUnknown *outer, REFIID iid, void **obj) +{ + IEnumObjectsImpl *This; + HRESULT hr = S_OK; + + TRACE("(%p, %s, %p)\n", outer, debugstr_guid(iid), obj); + + if (outer) + return CLASS_E_NOAGGREGATION; + + if (!(This = heap_alloc(sizeof(*This)))) + return E_OUTOFMEMORY; + + This->IEnumObjects_iface.lpVtbl = &eobjlvt; + This->ref = 1; + list_init(&This->objls); + This->current = NULL; + + + hr = IEnumObjects_fnQueryInterface(&This->IEnumObjects_iface, iid, obj); + IEnumObjects_fnRelease(&This->IEnumObjects_iface); + return hr; +} diff --git a/dlls/shell32/shell32_classes.idl b/dlls/shell32/shell32_classes.idl index 135ef52f7b0..872ecb31630 100644 --- a/dlls/shell32/shell32_classes.idl +++ b/dlls/shell32/shell32_classes.idl @@ -189,3 +189,8 @@ coclass KnownFolderManager { interface IKnownFolderManager; } uuid(d969a300-e7ff-11d0-a93b-00a0c90f2719) ] coclass NewMenu {} + +[ + threading(apartment), + uuid(2d3468c1-36a7-43b6-ac24-d3f02fd9607a) +] coclass EnumerableObjectCollection { interface IEnumObjects; } diff --git a/dlls/shell32/shell32_main.h b/dlls/shell32/shell32_main.h index 6b5575c6879..65250b09bd2 100644 --- a/dlls/shell32/shell32_main.h +++ b/dlls/shell32/shell32_main.h @@ -123,6 +123,8 @@ LPEXTRACTICONW IExtractIconW_Constructor(LPCITEMIDLIST);
HRESULT WINAPI CustomDestinationList_Constructor(IUnknown *outer, REFIID riid, void **obj);
+HRESULT WINAPI IEnumObjects_Constructor(IUnknown *outer, REFIID riid, void **obj); + /* initialisation for FORMATETC */ #define InitFormatEtc(fe, cf, med) \ {\ diff --git a/dlls/shell32/shellole.c b/dlls/shell32/shellole.c index aa9bd3e0f3e..4cc73e4ef24 100644 --- a/dlls/shell32/shellole.c +++ b/dlls/shell32/shellole.c @@ -87,6 +87,7 @@ static const struct { {&CLSID_ShellImageDataFactory, ShellImageDataFactory_Constructor}, {&CLSID_FileOperation, IFileOperation_Constructor}, {&CLSID_ActiveDesktop, ActiveDesktop_Constructor}, + {&CLSID_EnumerableObjectCollection, IEnumObjects_Constructor}, {NULL, NULL} };
diff --git a/include/shobjidl.idl b/include/shobjidl.idl index 886cff89ef9..23ea0b57153 100644 --- a/include/shobjidl.idl +++ b/include/shobjidl.idl @@ -4126,3 +4126,26 @@ interface IFileOperation : IUnknown HRESULT PerformOperations(); HRESULT GetAnyOperationsAborted([out] BOOL *aborted); } + +/***************************************************************************** + * IEnumObjects interface + */ +[ + object, + uuid(5632b1a4-e38a-400a-928a-d4cd63230295), + pointer_default(unique) +] +interface IEnumObjects : IUnknown +{ + //fixme: typedef IEnumObjects *?; + + HRESULT Next( + [in] ULONG celt, + [in] REFIID riid, + [out, iid_is(riid)] void **rgelt, + [out, optional] ULONG *pceltFetched ); + + HRESULT Skip( [in] ULONG celt ); + HRESULT Reset(); + HRESULT Clone( [out] IEnumObjects **ppenum ); +}
Fabian Maurer (@DarkShadow44) commented about dlls/shell32/enumobjects.c:
- See IUnknown_QueryInterface.
- */
+static HRESULT WINAPI IEnumObjects_fnQueryInterface(IEnumObjects *iface, REFIID riid, void **obj) +{
- IEnumObjectsImpl *This = impl_from_IEnumObjects(iface);
- TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), obj);
- if (IsEqualIID(&IID_IUnknown, riid) ||
IsEqualIID(&IID_IEnumObjects, riid))
- {
*obj = &This->IEnumObjects_iface;
- }
- else
- {
WARN("no interface for %s\n", debugstr_guid(riid));
Why not FIXME?
Fabian Maurer (@DarkShadow44) commented about dlls/shell32/enumobjects.c:
- TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), obj);
- if (IsEqualIID(&IID_IUnknown, riid) ||
IsEqualIID(&IID_IEnumObjects, riid))
- {
*obj = &This->IEnumObjects_iface;
- }
- else
- {
WARN("no interface for %s\n", debugstr_guid(riid));
*obj = NULL;
return E_NOINTERFACE;
- }
- IUnknown_AddRef((IUnknown*)*obj);
- return S_OK;
I think the `return E_NOINTERFACE` is normally the last thing in the function. Probably doesn't matter though.
Fabian Maurer (@DarkShadow44) commented about dlls/shell32/Makefile.in:
dragdrophelper.c \ ebrowser.c \ enumidlist.c \
- enumobjects.c \
Not sure what the rules are, does this warrant an extra file? I always thought Wine wants to keep the number of files low.
Fabian Maurer (@DarkShadow44) commented about dlls/shell32/enumobjects.c:
- IUnknown_AddRef((IUnknown*)*obj);
- return S_OK;
+}
+/**************************************************************************
- IEnumObjects_fnAddRef
- See IUnknown_AddRef.
- */
+static ULONG WINAPI IEnumObjects_fnAddRef(IEnumObjects *iface) +{
- IEnumObjectsImpl *This = impl_from_IEnumObjects(iface);
- ULONG refCount = InterlockedIncrement(&This->ref);
- TRACE("(%p)->(%lu)\n", This, refCount - 1);
I think we normally trace the refcount as is. Also, AFAIK camelcase is discouraged.
Same for Release.
Fabian Maurer (@DarkShadow44) commented about dlls/shell32/enumobjects.c:
- {
list_remove(&This->objls);
free(This);
- }
- return refCount;
+}
+/**************************************************************************
- IEnumIDList::Next
- */
+static HRESULT WINAPI IEnumObjects_fnNext(IEnumObjects *iface, ULONG celt, REFIID riid, void **rgelt, ULONG *celtFetched) +{
- IEnumObjectsImpl *This = impl_from_IEnumObjects(iface);
- FIXME("%p (%ld, %p, %p, %ln ): stud!\n", This, celt, debugstr_guid(riid), rgelt, celtFetched);
stud -> stub
Fabian Maurer (@DarkShadow44) commented about dlls/shell32/enumobjects.c:
- IEnumObjectsImpl *This = impl_from_IEnumObjects(iface);
- FIXME("(%p)->() semi-stub\n", This);
- This->current = list_head(&This->objls);
- return S_OK;
+}
+/**************************************************************************
- IEnumObjects::Clone
- */
+static HRESULT WINAPI IEnumObjects_fnClone(IEnumObjects *iface, IEnumObjects **ppenum) +{
- IEnumObjectsImpl *This = impl_from_IEnumObjects(iface);
- WARN("(%p)->(%p): Not implemented.\n",This, ppenum);
Why not FIXME?
Fabian Maurer (@DarkShadow44) commented about dlls/shell32/enumobjects.c:
+{
- IEnumObjectsImpl *This = impl_from_IEnumObjects(iface);
- FIXME("%p (%ld, %p, %p, %ln ): stud!\n", This, celt, debugstr_guid(riid), rgelt, celtFetched);
- return E_NOTIMPL;
+}
+/**************************************************************************
- IEnumObjects::Skip
- */
+static HRESULT WINAPI IEnumObjects_fnSkip(IEnumObjects *iface, ULONG celt) +{
- IEnumObjectsImpl *This = impl_from_IEnumObjects(iface);
- FIXME("(%p)->(%ld): stud!\n", This, celt);
stud -> stub
Fabian Maurer (@DarkShadow44) commented about dlls/shell32/shellole.c:
{&CLSID_ShellImageDataFactory, ShellImageDataFactory_Constructor}, {&CLSID_FileOperation, IFileOperation_Constructor}, {&CLSID_ActiveDesktop, ActiveDesktop_Constructor},
- {&CLSID_EnumerableObjectCollection, IEnumObjects_Constructor},
You probably want to use the same indentation as the surrounding code.
Fabian Maurer (@DarkShadow44) commented about include/shobjidl.idl:
HRESULT PerformOperations(); HRESULT GetAnyOperationsAborted([out] BOOL *aborted);
}
+/*****************************************************************************
- IEnumObjects interface
- */
IMHO, comments like that don't add much. Same for the other files, not sure what the consensus is though (if there even is any).
Fabian Maurer (@DarkShadow44) commented about include/shobjidl.idl:
HRESULT PerformOperations(); HRESULT GetAnyOperationsAborted([out] BOOL *aborted);
}
+/*****************************************************************************
- IEnumObjects interface
- */
+[
- object,
- uuid(5632b1a4-e38a-400a-928a-d4cd63230295),
- pointer_default(unique)
+] +interface IEnumObjects : IUnknown +{
- //fixme: typedef IEnumObjects *?;
Those types of comments are not allowed. What exactly is missing?
Fabian Maurer (@DarkShadow44) commented about dlls/shell32/enumobjects.c:
+static const IEnumObjectsVtbl eobjlvt = +{
- IEnumObjects_fnQueryInterface,
- IEnumObjects_fnAddRef,
- IEnumObjects_fnRelease,
- IEnumObjects_fnNext,
- IEnumObjects_fnSkip,
- IEnumObjects_fnReset,
- IEnumObjects_fnClone,
+};
+HRESULT WINAPI IEnumObjects_Constructor(IUnknown *outer, REFIID iid, void **obj) +{
- IEnumObjectsImpl *This;
- HRESULT hr = S_OK;
Don't need to assign it if you override it later anyways.
Fabian Maurer (@DarkShadow44) commented about dlls/shell32/enumobjects.c:
- return S_OK;
+}
+/**************************************************************************
- IEnumObjects::Clone
- */
+static HRESULT WINAPI IEnumObjects_fnClone(IEnumObjects *iface, IEnumObjects **ppenum) +{
- IEnumObjectsImpl *This = impl_from_IEnumObjects(iface);
- WARN("(%p)->(%p): Not implemented.\n",This, ppenum);
- return E_NOTIMPL;
+}
+static const IEnumObjectsVtbl eobjlvt =
IMHO a name like `enum_objects_vtbl` would be better, it's easier to understand than `eobjlvt`
Fabian Maurer (@DarkShadow44) commented about dlls/shell32/enumobjects.c:
+#include "wine/debug.h" +#include "windef.h" +#include "winbase.h" +#include "winreg.h" +#include "shlwapi.h"
+#include "shell32_main.h"
+WINE_DEFAULT_DEBUG_CHANNEL(shell);
+typedef struct +{
- IEnumObjects IEnumObjects_iface;
- LONG ref;
- struct list objls;
- struct list *current;
Do we really need those two if they're never really used?
Fabian Maurer (@DarkShadow44) commented about dlls/shell32/enumobjects.c:
- HRESULT hr = S_OK;
- TRACE("(%p, %s, %p)\n", outer, debugstr_guid(iid), obj);
- if (outer)
return CLASS_E_NOAGGREGATION;
- if (!(This = heap_alloc(sizeof(*This))))
return E_OUTOFMEMORY;
- This->IEnumObjects_iface.lpVtbl = &eobjlvt;
- This->ref = 1;
- list_init(&This->objls);
- This->current = NULL;
I'd remove the duplicate empty line.
I did a small review, just a bunch of minor issues I saw as a hobby contributor. Not all needs necessarily fixing (like the empty line), just trying to help improve things in my eyes :)
On Sat Jul 20 01:24:55 2024 +0000, Fabian Maurer wrote:
Why not FIXME?
I haven't read rules about this, in Microsoft's own documentation this method isn't implemented. https://learn.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjid...
So I believed FIXME didn't apply as there's really nothing to fix. No software should be calling that method as far as I know.
On Sat Jul 20 01:24:55 2024 +0000, Fabian Maurer wrote:
You probably want to use the same indentation as the surrounding code.
Yeah, don't know what happened there, I will fix it real quick.
On Sat Jul 20 01:24:53 2024 +0000, Fabian Maurer wrote:
Why not FIXME?
As I'm new developing for Wine, I just followed the guide on how to write a COM class into Wine. https://wiki.winehq.org/Wine_Developer%27s_Guide/COM_in_Wine
On Sat Jul 20 01:24:54 2024 +0000, Fabian Maurer wrote:
Not sure what the rules are, does this warrant an extra file? I always thought Wine wants to keep the number of files low.
Not sure about the rules either. I'll move my code to any file if I'm instructed, I just don't know which one would be appropriate.
On Sat Jul 20 02:25:19 2024 +0000, Kevin Martinez wrote:
As I'm new developing for Wine, I just followed the guide on how to write a COM class into Wine. https://wiki.winehq.org/Wine_Developer%27s_Guide/COM_in_Wine
Yeah, Wine code isn't exactly consistent either. I prefer FIXME since it is immediately visible.
You seem to have a pretty big bug in your code - I'd recommend a bunch of simple tests to make sure everything is correct.
``` 5632b1a4-e38a-400a-928a-d4cd63230295 interface IEnumObjects : IUnknown ```
According to me it should be ``` 5632b1a4-e38a-400a-928a-d4cd63230295 interface IObjectCollection : IObjectArray
2c1c7e2e-2d0e-4059-831e-1e6f82335c2e interface IEnumObjects : IUnknown ```
Please be careful with your uuids.
On Sat Jul 20 02:17:23 2024 +0000, Kevin Martinez wrote:
Yeah, don't know what happened there, I will fix it real quick.
It's tab vs spaces
On Sat Jul 20 02:16:16 2024 +0000, Kevin Martinez wrote:
I haven't read rules about this, in Microsoft's own documentation this method isn't implemented. https://learn.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjid... So I believed FIXME didn't apply as there's really nothing to fix. No software should be calling that method as far as I know.
Sadly MSDN is wrong sometimes, I tested it (mostly chatgpt code) and it works: https://gist.github.com/DarkShadow44/63f13a72d8aba4fa7aaca5c3a8375d43
On Sat Jul 20 01:24:55 2024 +0000, Fabian Maurer wrote:
stud -> stub
That, and don't use %n, unless you want to write 57 to celtFetched. Use %p.
Alfred Agrell (@Alcaro) commented about dlls/shell32/enumobjects.c:
free(This);
- }
- return refCount;
+}
+/**************************************************************************
- IEnumIDList::Next
- */
+static HRESULT WINAPI IEnumObjects_fnNext(IEnumObjects *iface, ULONG celt, REFIID riid, void **rgelt, ULONG *celtFetched) +{
- IEnumObjectsImpl *This = impl_from_IEnumObjects(iface);
- FIXME("%p (%ld, %p, %p, %ln ): stud!\n", This, celt, debugstr_guid(riid), rgelt, celtFetched);
- return E_NOTIMPL;
I'd return S_FALSE instead, so it looks like an empty container. (And set celtFetched to 0, if non-null.)
On Sat Jul 20 02:33:31 2024 +0000, Kevin Martinez wrote:
Not sure about the rules either. I'll move my code to any file if I'm instructed, I just don't know which one would be appropriate.
I'd keep the extra file. It may be slightly overkill for now, but it will make sense once the object ceases being a stub.
Alfred Agrell (@Alcaro) commented about dlls/shell32/enumobjects.c:
- struct list *current;
+} IEnumObjectsImpl;
+static inline IEnumObjectsImpl *impl_from_IEnumObjects(IEnumObjects *iface) +{
- return CONTAINING_RECORD(iface, IEnumObjectsImpl, IEnumObjects_iface);
+}
+/**************************************************************************
- IEnumObjects_fnQueryInterface
- See IUnknown_QueryInterface.
- */
+static HRESULT WINAPI IEnumObjects_fnQueryInterface(IEnumObjects *iface, REFIID riid, void **obj) +{
- IEnumObjectsImpl *This = impl_from_IEnumObjects(iface);
Wine would usually name that object `struct enum_objects` (without typedef alias), and the function `enum_objects_QueryInterface`. (Similar for every other function in this file.)
On Sat Jul 20 01:24:54 2024 +0000, Fabian Maurer wrote:
I think the `return E_NOINTERFACE` is normally the last thing in the function. Probably doesn't matter though.
If an object implements multiple interfaces, the approach minimizing the amount of boilerplate is https://gitlab.winehq.org/wine/wine/-/blob/df9bdcfdc1074fc17eb906dfa87e9492c....
For objects like this, it doesn't matter.
On Sat Jul 20 01:24:56 2024 +0000, Fabian Maurer wrote:
Those types of comments are not allowed. What exactly is missing?
I'd like to know that too. COM interfaces can't contain typedefs, they can only contain functions.
On Sat Jul 20 14:40:10 2024 +0000, Fabian Maurer wrote:
Sadly MSDN is wrong sometimes, I tested it (mostly chatgpt code) and it works: https://gist.github.com/DarkShadow44/63f13a72d8aba4fa7aaca5c3a8375d43
If nothing should call it, then it should be FIXME or ERR, so we can notice that someone's contradicting our expectations.
On Mon Jul 22 12:49:59 2024 +0000, Alfred Agrell wrote:
If an object implements multiple interfaces, the approach minimizing the amount of boilerplate is https://gitlab.winehq.org/wine/wine/-/blob/df9bdcfdc1074fc17eb906dfa87e9492c.... For objects like this, it doesn't matter.
Actually, it does matter - this object should implement IObjectCollection, not just IEnumObjects ([source](https://chromium.googlesource.com/chromium/chromium/+/7e279a29c6ff61e6132039...)). That's how you insert anything into it.
I don't know if that's needed to get the game in BUG-53620 working, though. If no, feel free to leave it as is for now. (Which game is it, anyways?)
On Mon Jul 22 13:32:08 2024 +0000, Alfred Agrell wrote:
Actually, it does matter - this object should implement IObjectCollection, not just IEnumObjects ([source](https://chromium.googlesource.com/chromium/chromium/+/7e279a29c6ff61e6132039...)). That's how you insert anything into it. I don't know if that's needed to get the game in BUG-53620 working, though. If no, feel free to leave it as is for now. (Which game is it, anyways?)
I think [bug 56891](https://bugs.winehq.org/show_bug.cgi?id=56891) needs it (careful, that download is NSFW)
On Mon Jul 22 14:49:47 2024 +0000, Fabian Maurer wrote:
I think [bug 56891](https://bugs.winehq.org/show_bug.cgi?id=56891) needs it (careful, that download is NSFW)
Ohhh, now I get it! I'm not sure what game is [BUG-53620](https://bugs.winehq.org/show_bug.cgi?id=53620), the ones that doesn't work for me are two visual novels by Kaeru Soft, and the demo of each tittle:
[noshoujo (NSFW)(non-https)](http://www.kaeru-soft.jp/noshoujo/spe_trial.html)
[nemunono (NSFW)(non-https)](http://www.kaeru-soft.jp/nemunono/dl_trial2.html)
Those two are actually calling IObjectCollection, but I confused the GUID with IEnumObjects, just as @DarkShadow44 pointed out in another comment. Which means that I have another stub to add in this file.
I see two options: I can scrap this submission and try again with stubs for both interfaces, resolving the other threads in the process. Or I can resolve these threads, along with the fixed GUID for **IEnumObjects**, and submit IObjectCollection later. What do you guys think? @Alcaro @DarkShadow44
P.S. The demos listed also require the IShellLink PropertyStore methods to be implemented, I believe I managed to implement it, I'm developing the tests to submit it. Meaning that on current Wine even with my patch they won't run.
On Tue Jul 23 12:05:13 2024 +0000, Fabian Maurer wrote:
You seem to have a pretty big bug in your code - I'd recommend a bunch of simple tests to make sure everything is correct.
5632b1a4-e38a-400a-928a-d4cd63230295 interface IEnumObjects : IUnknown
According to me it should be
5632b1a4-e38a-400a-928a-d4cd63230295 interface IObjectCollection : IObjectArray 2c1c7e2e-2d0e-4059-831e-1e6f82335c2e interface IEnumObjects : IUnknown
Please be careful with your uuids.
I have confirmed this bug, certainly I have confused the GUID of the interface, thanks for pointing it out.
On Mon Jul 22 12:49:59 2024 +0000, Alfred Agrell wrote:
I'd like to know that too. COM interfaces can't contain typedefs, they can only contain functions.
I'm not sure myself. I saw other entries doing that, but didn't know what its purpose is. If it doesn't accomplishes anything for this interface, then I guess I'll delete the comment.
On Tue Jul 23 12:02:17 2024 +0000, Kevin Martinez wrote:
Ohhh, now I get it! I'm not sure what game is [BUG-53620](https://bugs.winehq.org/show_bug.cgi?id=53620), the ones that doesn't work for me are two visual novels by Kaeru Soft, and the demo of each tittle: [noshoujo (NSFW)(non-https)](http://www.kaeru-soft.jp/noshoujo/spe_trial.html) [nemunono (NSFW)(non-https)](http://www.kaeru-soft.jp/nemunono/dl_trial2.html) Those two are actually calling IObjectCollection, but I confused the GUID with IEnumObjects, just as @DarkShadow44 pointed out in another comment. Which means that I have another stub to add in this file. I see two options: I can scrap this submission and try again with stubs for both interfaces, resolving the other threads in the process. Or I can resolve these threads, along with the fixed GUID for **IEnumObjects**, and submit IObjectCollection later. What do you guys think? @Alcaro @DarkShadow44 P.S. The demos listed also require the IShellLink PropertyStore methods to be implemented, I believe I managed to implement it, I'm developing the tests to submit it. Meaning that on current Wine even with my patch they won't run.
If Noshoujo uses IObjectCollection, and BUG-56891's Mebae uses IEnumObjects, then yes, both should be implemented (to the degree needed for them to not crash).
Personally I'd make one MR for each game (unless they need fixes in wildly different locations and should be split further), but I have no strong feelings on that topic. If some other approach makes more sense to you, do that.
There is, however, no need to scrap anything; if this MR's scope grows, you can simply rename it.
On Tue Jul 23 13:55:33 2024 +0000, Alfred Agrell wrote:
If Noshoujo uses IObjectCollection, and BUG-56891's Mebae uses IEnumObjects, then yes, both should be implemented (to the degree needed for them to not crash). Personally I'd make one MR for each game (unless they need fixes in wildly different locations and should be split further), but I have no strong feelings on that topic. If some other approach makes more sense to you, do that. There is, however, no need to scrap anything; if this MR's scope grows, you can simply rename it.
I was just worried about the scope of the MR, but if I can just rename it then I'll implement the stubs for both interfaces right here then. Thanks for the feedback.