Commit 2d4d571f authored by Detlef Riekenberg's avatar Detlef Riekenberg Committed by Alexandre Julliard

shell32: Add a stub for IApplicationAssociationRegistration.

parent 48155b5d
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "objbase.h" #include "objbase.h"
#include "shlguid.h" #include "shlguid.h"
#include "shlwapi.h" #include "shlwapi.h"
#include "shobjidl.h"
#include "shell32_main.h" #include "shell32_main.h"
#include "ver.h" #include "ver.h"
#include "wine/unicode.h" #include "wine/unicode.h"
...@@ -65,6 +66,13 @@ typedef struct ...@@ -65,6 +66,13 @@ typedef struct
HKEY hkeyProgID; HKEY hkeyProgID;
} IQueryAssociationsImpl; } IQueryAssociationsImpl;
typedef struct
{
IApplicationAssociationRegistration IApplicationAssociationRegistration_iface;
LONG ref;
} IApplicationAssociationRegistrationImpl;
static inline IQueryAssociationsImpl *impl_from_IQueryAssociations(IQueryAssociations *iface) static inline IQueryAssociationsImpl *impl_from_IQueryAssociations(IQueryAssociations *iface)
{ {
return CONTAINING_RECORD(iface, IQueryAssociationsImpl, IQueryAssociations_iface); return CONTAINING_RECORD(iface, IQueryAssociationsImpl, IQueryAssociations_iface);
...@@ -711,6 +719,114 @@ static const IQueryAssociationsVtbl IQueryAssociations_vtbl = ...@@ -711,6 +719,114 @@ static const IQueryAssociationsVtbl IQueryAssociations_vtbl =
}; };
/************************************************************************** /**************************************************************************
* IApplicationAssociationRegistration implementation
*/
static inline IApplicationAssociationRegistrationImpl *impl_from_IApplicationAssociationRegistration(IApplicationAssociationRegistration *iface)
{
return CONTAINING_RECORD(iface, IApplicationAssociationRegistrationImpl, IApplicationAssociationRegistration_iface);
}
static HRESULT WINAPI ApplicationAssociationRegistration_QueryInterface(
IApplicationAssociationRegistration* iface, REFIID riid, LPVOID *ppv)
{
IApplicationAssociationRegistrationImpl *This = impl_from_IApplicationAssociationRegistration(iface);
TRACE("(%p, %s, %p)\n",This, debugstr_guid(riid), ppv);
if (ppv == NULL)
return E_POINTER;
if (IsEqualGUID(&IID_IUnknown, riid) ||
IsEqualGUID(&IID_IApplicationAssociationRegistration, riid)) {
*ppv = &This->IApplicationAssociationRegistration_iface;
IUnknown_AddRef((IUnknown*)*ppv);
TRACE("returning IApplicationAssociationRegistration: %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 ApplicationAssociationRegistration_AddRef(IApplicationAssociationRegistration *iface)
{
IApplicationAssociationRegistrationImpl *This = impl_from_IApplicationAssociationRegistration(iface);
ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p) ref=%d\n", This, ref);
return ref;
}
static ULONG WINAPI ApplicationAssociationRegistration_Release(IApplicationAssociationRegistration *iface)
{
IApplicationAssociationRegistrationImpl *This = impl_from_IApplicationAssociationRegistration(iface);
ULONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p) ref=%d\n", This, ref);
if (!ref) {
SHFree(This);
}
return ref;
}
static HRESULT WINAPI ApplicationAssociationRegistration_QueryCurrentDefault(IApplicationAssociationRegistration* This, LPCWSTR query,
ASSOCIATIONTYPE type, ASSOCIATIONLEVEL level, LPWSTR *association)
{
FIXME("(%p)->(%s, %d, %d, %p)\n", This, debugstr_w(query), type, level, association);
return E_NOTIMPL;
}
static HRESULT WINAPI ApplicationAssociationRegistration_QueryAppIsDefault(IApplicationAssociationRegistration* This, LPCWSTR query,
ASSOCIATIONTYPE type, ASSOCIATIONLEVEL level, LPCWSTR appname, BOOL *is_default)
{
FIXME("(%p)->(%s, %d, %d, %s, %p)\n", This, debugstr_w(query), type, level, debugstr_w(appname), is_default);
return E_NOTIMPL;
}
static HRESULT WINAPI ApplicationAssociationRegistration_QueryAppIsDefaultAll(IApplicationAssociationRegistration* This, ASSOCIATIONLEVEL level,
LPCWSTR appname, BOOL *is_default)
{
FIXME("(%p)->(%d, %s, %p)\n", This, level, debugstr_w(appname), is_default);
return E_NOTIMPL;
}
static HRESULT WINAPI ApplicationAssociationRegistration_SetAppAsDefault(IApplicationAssociationRegistration* This, LPCWSTR appname,
LPCWSTR set, ASSOCIATIONTYPE set_type)
{
FIXME("(%p)->(%s, %s, %d)\n", This, debugstr_w(appname), debugstr_w(set), set_type);
return E_NOTIMPL;
}
static HRESULT WINAPI ApplicationAssociationRegistration_SetAppAsDefaultAll(IApplicationAssociationRegistration* This, LPCWSTR appname)
{
FIXME("(%p)->(%s)\n", This, debugstr_w(appname));
return E_NOTIMPL;
}
static HRESULT WINAPI ApplicationAssociationRegistration_ClearUserAssociations(IApplicationAssociationRegistration* This)
{
FIXME("(%p)\n", This);
return E_NOTIMPL;
}
static const IApplicationAssociationRegistrationVtbl IApplicationAssociationRegistration_vtbl =
{
ApplicationAssociationRegistration_QueryInterface,
ApplicationAssociationRegistration_AddRef,
ApplicationAssociationRegistration_Release,
ApplicationAssociationRegistration_QueryCurrentDefault,
ApplicationAssociationRegistration_QueryAppIsDefault,
ApplicationAssociationRegistration_QueryAppIsDefaultAll,
ApplicationAssociationRegistration_SetAppAsDefault,
ApplicationAssociationRegistration_SetAppAsDefaultAll,
ApplicationAssociationRegistration_ClearUserAssociations
};
/**************************************************************************
* IQueryAssociations_Constructor [internal] * IQueryAssociations_Constructor [internal]
* *
* Construct a new IQueryAssociations object. * Construct a new IQueryAssociations object.
...@@ -731,3 +847,30 @@ HRESULT WINAPI QueryAssociations_Constructor(IUnknown *pUnkOuter, REFIID riid, L ...@@ -731,3 +847,30 @@ HRESULT WINAPI QueryAssociations_Constructor(IUnknown *pUnkOuter, REFIID riid, L
TRACE("returning %p\n", *ppOutput); TRACE("returning %p\n", *ppOutput);
return ret; return ret;
} }
/**************************************************************************
* ApplicationAssociationRegistration_Constructor [internal]
*
* Construct a IApplicationAssociationRegistration object.
*/
HRESULT WINAPI ApplicationAssociationRegistration_Constructor(IUnknown *outer, REFIID riid, LPVOID *ppv)
{
IApplicationAssociationRegistrationImpl *This;
HRESULT hr;
if (outer)
return CLASS_E_NOAGGREGATION;
if (!(This = SHAlloc(sizeof(*This))))
return E_OUTOFMEMORY;
This->IApplicationAssociationRegistration_iface.lpVtbl = &IApplicationAssociationRegistration_vtbl;
This->ref = 0;
hr = IUnknown_QueryInterface(&This->IApplicationAssociationRegistration_iface, riid, ppv);
if (FAILED(hr))
SHFree(This);
TRACE("returning 0x%x with %p\n", hr, *ppv);
return hr;
}
...@@ -61,6 +61,12 @@ coclass KnownFolderManager { interface IKnownFolderManager; } ...@@ -61,6 +61,12 @@ coclass KnownFolderManager { interface IKnownFolderManager; }
] coclass QueryAssociations { interface IQueryAssociations; } ] coclass QueryAssociations { interface IQueryAssociations; }
[ [
helpstring("Manage Application associations"),
threading(apartment),
uuid(591209c7-767b-42b2-9fba-44ee4615f2c7)
] coclass ApplicationAssociationRegistration { interface IApplicationAssociationRegistration; }
[
helpstring("Shell Drag and Drop Helper"), helpstring("Shell Drag and Drop Helper"),
threading(apartment), threading(apartment),
uuid(4657278a-411b-11d2-839a-00c04fd918d0) uuid(4657278a-411b-11d2-839a-00c04fd918d0)
......
...@@ -107,6 +107,8 @@ HRESULT WINAPI CPanel_ExtractIconA(LPITEMIDLIST pidl, LPCSTR pszFile, UINT nIcon ...@@ -107,6 +107,8 @@ HRESULT WINAPI CPanel_ExtractIconA(LPITEMIDLIST pidl, LPCSTR pszFile, UINT nIcon
HRESULT WINAPI CPanel_ExtractIconW(LPITEMIDLIST pidl, LPCWSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize) DECLSPEC_HIDDEN; HRESULT WINAPI CPanel_ExtractIconW(LPITEMIDLIST pidl, LPCWSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize) DECLSPEC_HIDDEN;
HRESULT WINAPI IAutoComplete_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) DECLSPEC_HIDDEN; HRESULT WINAPI IAutoComplete_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) DECLSPEC_HIDDEN;
HRESULT WINAPI ApplicationAssociationRegistration_Constructor(IUnknown *outer, REFIID riid, LPVOID *ppv) DECLSPEC_HIDDEN;
LPEXTRACTICONA IExtractIconA_Constructor(LPCITEMIDLIST) DECLSPEC_HIDDEN; LPEXTRACTICONA IExtractIconA_Constructor(LPCITEMIDLIST) DECLSPEC_HIDDEN;
LPEXTRACTICONW IExtractIconW_Constructor(LPCITEMIDLIST) DECLSPEC_HIDDEN; LPEXTRACTICONW IExtractIconW_Constructor(LPCITEMIDLIST) DECLSPEC_HIDDEN;
......
...@@ -63,6 +63,7 @@ static const struct { ...@@ -63,6 +63,7 @@ static const struct {
LPFNCREATEINSTANCE lpfnCI; LPFNCREATEINSTANCE lpfnCI;
} InterfaceTable[] = { } InterfaceTable[] = {
{&CLSID_ApplicationAssociationRegistration, ApplicationAssociationRegistration_Constructor},
{&CLSID_AutoComplete, IAutoComplete_Constructor}, {&CLSID_AutoComplete, IAutoComplete_Constructor},
{&CLSID_ControlPanel, IControlPanel_Constructor}, {&CLSID_ControlPanel, IControlPanel_Constructor},
{&CLSID_DragDropHelper, IDropTargetHelper_Constructor}, {&CLSID_DragDropHelper, IDropTargetHelper_Constructor},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment