shell32: Add IApplicationDocumentLists stub.

Lets Cablabel S3 Lite 1.4.0.2 start, otherwise it shows a msgbox with the error and freezes.

Signed-off-by: André Zwing <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
André Zwing 2021-08-22 16:14:57 +02:00 committed by Alexandre Julliard
parent d4f83ba77f
commit 9323d33fa4
5 changed files with 151 additions and 0 deletions

View File

@ -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),

View File

@ -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;

View File

@ -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},

View File

@ -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,
APPDOCLISTTYPE 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;

View File

@ -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)
]