This let's Cablabel S3 Lite 1.4.0.2 start, otherwise it shows a msgbox with the error and freezes.
Signed-off-by: André Hentschel <nerv(a)dawncrow.de>
---
dlls/shell32/shell32_classes.idl | 6 ++
dlls/shell32/shell32_main.h | 1 +
dlls/shell32/shellole.c | 1 +
dlls/shell32/shellpath.c | 112 +++++++++++++++++++++++++++++++
include/shobjidl.idl | 31 +++++++++
5 files changed, 151 insertions(+)
diff --git a/dlls/shell32/shell32_classes.idl b/dlls/shell32/shell32_classes.idl
index f2c5ed4a766..22ef49ae5c7 100644
--- a/dlls/shell32/shell32_classes.idl
+++ b/dlls/shell32/shell32_classes.idl
@@ -74,6 +74,12 @@ coclass KnownFolderManager { interface IKnownFolderManager; }
uuid(86c14003-4d6b-4ef3-a7b4-0506663b2e68)
] coclass ApplicationDestinations { interface IApplicationDestinations; }
+[
+ helpstring("Application Document List"),
+ threading(apartment),
+ uuid(86bec222-30f2-47e0-9f25-60d11cd75c28)
+] coclass ApplicationDocumentLists { interface IApplicationDocumentLists; }
+
[
helpstring("Shell Drag and Drop Helper"),
threading(apartment),
diff --git a/dlls/shell32/shell32_main.h b/dlls/shell32/shell32_main.h
index da50e19de46..99e5d0d4288 100644
--- a/dlls/shell32/shell32_main.h
+++ b/dlls/shell32/shell32_main.h
@@ -112,6 +112,7 @@ HRESULT WINAPI IAutoComplete_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVO
HRESULT WINAPI ApplicationAssociationRegistration_Constructor(IUnknown *outer, REFIID riid, LPVOID *ppv) DECLSPEC_HIDDEN;
HRESULT WINAPI ApplicationDestinations_Constructor(IUnknown *outer, REFIID riid, LPVOID *ppv) DECLSPEC_HIDDEN;
+HRESULT WINAPI ApplicationDocumentLists_Constructor(IUnknown *outer, REFIID riid, LPVOID *ppv) DECLSPEC_HIDDEN;
HRESULT IShellLink_ConstructFromFile(IUnknown * pUnkOuter, REFIID riid, LPCITEMIDLIST pidl, IUnknown **ppv) DECLSPEC_HIDDEN;
diff --git a/dlls/shell32/shellole.c b/dlls/shell32/shellole.c
index 64ae59fd283..9870afe162e 100644
--- a/dlls/shell32/shellole.c
+++ b/dlls/shell32/shellole.c
@@ -68,6 +68,7 @@ static const struct {
{&CLSID_ApplicationAssociationRegistration, ApplicationAssociationRegistration_Constructor},
{&CLSID_ApplicationDestinations, ApplicationDestinations_Constructor},
+ {&CLSID_ApplicationDocumentLists, ApplicationDocumentLists_Constructor},
{&CLSID_AutoComplete, IAutoComplete_Constructor},
{&CLSID_ControlPanel, IControlPanel_Constructor},
{&CLSID_DragDropHelper, IDropTargetHelper_Constructor},
diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c
index 3be759bf616..2da8b8295b5 100644
--- a/dlls/shell32/shellpath.c
+++ b/dlls/shell32/shellpath.c
@@ -1178,6 +1178,118 @@ HRESULT WINAPI ApplicationDestinations_Constructor(IUnknown *outer, REFIID riid,
return hr;
}
+typedef struct
+{
+ IApplicationDocumentLists IApplicationDocumentLists_iface;
+ LONG ref;
+} IApplicationDocumentListsImpl;
+
+static inline IApplicationDocumentListsImpl *impl_from_IApplicationDocumentLists( IApplicationDocumentLists *iface )
+{
+ return CONTAINING_RECORD(iface, IApplicationDocumentListsImpl, IApplicationDocumentLists_iface);
+}
+
+static HRESULT WINAPI ApplicationDocumentLists_QueryInterface(IApplicationDocumentLists *iface,
+ REFIID riid, LPVOID *ppv)
+{
+ IApplicationDocumentListsImpl *This = impl_from_IApplicationDocumentLists(iface);
+
+ TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ppv);
+
+ if (ppv == NULL)
+ return E_POINTER;
+
+ if (IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IApplicationDocumentLists, riid))
+ {
+ *ppv = &This->IApplicationDocumentLists_iface;
+ IUnknown_AddRef((IUnknown*)*ppv);
+
+ TRACE("Returning IApplicationDocumentLists: %p\n", *ppv);
+ return S_OK;
+ }
+
+ *ppv = NULL;
+ FIXME("(%p)->(%s, %p) interface not supported.\n", This, debugstr_guid(riid), ppv);
+
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI ApplicationDocumentLists_AddRef(IApplicationDocumentLists *iface)
+{
+ IApplicationDocumentListsImpl *This = impl_from_IApplicationDocumentLists(iface);
+ ULONG ref = InterlockedIncrement(&This->ref);
+
+ TRACE("(%p), new refcount=%i\n", This, ref);
+
+ return ref;
+}
+
+static ULONG WINAPI ApplicationDocumentLists_Release(IApplicationDocumentLists *iface)
+{
+ IApplicationDocumentListsImpl *This = impl_from_IApplicationDocumentLists(iface);
+ ULONG ref = InterlockedDecrement(&This->ref);
+
+ TRACE("(%p), new refcount=%i\n", This, ref);
+
+ if (ref == 0)
+ heap_free(This);
+
+ return ref;
+}
+
+static HRESULT WINAPI ApplicationDocumentLists_SetAppID(IApplicationDocumentLists *iface,
+ const WCHAR *appid)
+{
+ IApplicationDocumentListsImpl *This = impl_from_IApplicationDocumentLists(iface);
+
+ FIXME("(%p, %s) stub!\n", This, debugstr_w(appid));
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ApplicationDocumentLists_GetList(IApplicationDocumentLists *iface,
+ uint list_type, uint item_count,
+ REFIID riid, void **obj)
+{
+ IApplicationDocumentListsImpl *This = impl_from_IApplicationDocumentLists(iface);
+
+ FIXME("(%p, %u, %u, %s, %p): stub\n", This, list_type, item_count, debugstr_guid(riid), obj);
+
+ return E_NOTIMPL;
+}
+
+static const IApplicationDocumentListsVtbl ApplicationDocumentListsVtbl =
+{
+ ApplicationDocumentLists_QueryInterface,
+ ApplicationDocumentLists_AddRef,
+ ApplicationDocumentLists_Release,
+ ApplicationDocumentLists_SetAppID,
+ ApplicationDocumentLists_GetList
+};
+
+HRESULT WINAPI ApplicationDocumentLists_Constructor(IUnknown *outer, REFIID riid, LPVOID *ppv)
+{
+ IApplicationDocumentListsImpl *This;
+ HRESULT hr;
+
+ TRACE("(%p, %s, %p)\n", outer, debugstr_guid(riid), ppv);
+
+ if (outer)
+ return CLASS_E_NOAGGREGATION;
+
+ if (!(This = SHAlloc(sizeof(*This))))
+ return E_OUTOFMEMORY;
+
+ This->IApplicationDocumentLists_iface.lpVtbl = &ApplicationDocumentListsVtbl;
+ This->ref = 0;
+
+ hr = IUnknown_QueryInterface(&This->IApplicationDocumentLists_iface, riid, ppv);
+ if (FAILED(hr))
+ SHFree(This);
+
+ return hr;
+}
+
typedef struct
{
const KNOWNFOLDERID *id;
diff --git a/include/shobjidl.idl b/include/shobjidl.idl
index 52e0c5c9db1..92e4da36c77 100644
--- a/include/shobjidl.idl
+++ b/include/shobjidl.idl
@@ -3485,6 +3485,29 @@ interface IApplicationDestinations : IUnknown
HRESULT RemoveAllDestinations();
}
+[
+ object,
+ uuid(3c594f9f-9f30-47a1-979a-c9e83d3d0a06),
+ pointer_default(unique)
+]
+interface IApplicationDocumentLists : IUnknown
+{
+ typedef [v1_enum] enum APPDOCLISTTYPE
+ {
+ ADLT_RECENT = 0,
+ ADLT_FREQUENT = 1,
+ } APPDOCLISTTYPE;
+
+ HRESULT SetAppID(
+ [in] LPCWSTR pszAppID);
+
+ HRESULT GetList(
+ [in] APPDOCLISTTYPE list_type,
+ [in] UINT item_count,
+ [in] REFIID riid,
+ [out, iid_is(riid)] void **ppv);
+}
+
[
uuid(6332debf-87b5-4670-90c0-5e57b408a49e),
object,
@@ -3825,6 +3848,14 @@ library ShellObjects
interface IApplicationDestinations;
}
+ [
+ uuid(86bec222-30f2-47e0-9f25-60d11cd75c28)
+ ]
+ coclass ApplicationDocumentLists
+ {
+ interface IApplicationDocumentLists;
+ }
+
[
uuid(00021401-0000-0000-c000-000000000046)
]
--
2.25.1