Commit deeb14e0 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

explorerframe: Moved TaskbarList implementation to explorerframe.

parent 1040e415
......@@ -4,7 +4,8 @@ IMPORTS = uuid ole32 shell32 user32
C_SRCS = \
explorerframe_main.c \
nstc.c
nstc.c \
taskbarlist.c
IDL_R_SRCS = explorerframe.idl
......
......@@ -24,3 +24,10 @@
uuid(ae054212-3535-4430-83ed-d501aa6680e6)
]
coclass NamespaceTreeControl { interface INameSpaceTreeControl2; }
[
helpstring("Task Bar Communication"),
threading(apartment),
uuid(56fdf344-fd6d-11d0-958a-006097c9a090)
]
coclass TaskbarList { interface ITaskbarList; }
......@@ -199,12 +199,16 @@ static const IClassFactoryVtbl EFCF_Vtbl =
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv)
{
static IClassFactoryImpl NSTCClassFactory = {{&EFCF_Vtbl}, NamespaceTreeControl_Constructor};
static IClassFactoryImpl TaskbarListFactory = {{&EFCF_Vtbl}, TaskbarList_Constructor};
TRACE("%s, %s, %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
if(IsEqualGUID(&CLSID_NamespaceTreeControl, rclsid))
return IClassFactory_QueryInterface(&NSTCClassFactory.IClassFactory_iface, riid, ppv);
if(IsEqualGUID(&CLSID_TaskbarList, rclsid))
return IClassFactory_QueryInterface(&TaskbarListFactory.IClassFactory_iface, riid, ppv);
return CLASS_E_CLASSNOTAVAILABLE;
}
......
......@@ -21,6 +21,8 @@
#ifndef __WINE_EXPLORERFRAME_H
#define __WINE_EXPLORERFRAME_H
#define COBJMACROS
#include "shlobj.h"
/* Not declared in commctrl.h ("for internal use (msdn)") */
......@@ -33,5 +35,16 @@ static inline void EFRAME_LockModule(void) { InterlockedIncrement( &EFRAME_refCo
static inline void EFRAME_UnlockModule(void) { InterlockedDecrement( &EFRAME_refCount ); }
HRESULT NamespaceTreeControl_Constructor(IUnknown *pUnkOuter, REFIID riid, void **ppv) DECLSPEC_HIDDEN;
HRESULT TaskbarList_Constructor(IUnknown*,REFIID,void**) DECLSPEC_HIDDEN;
static inline void *heap_alloc(size_t len)
{
return HeapAlloc(GetProcessHeap(), 0, len);
}
static inline BOOL heap_free(void *mem)
{
return HeapFree(GetProcessHeap(), 0, mem);
}
#endif /* __WINE_EXPLORERFRAME_H */
......@@ -18,7 +18,7 @@
*
*/
#include "ieframe.h"
#include "explorerframe_main.h"
#include "wine/debug.h"
......@@ -78,7 +78,7 @@ static ULONG STDMETHODCALLTYPE taskbar_list_Release(ITaskbarList4 *iface)
if (!refcount)
{
heap_free(This);
unlock_module();
EFRAME_UnlockModule();
}
return refcount;
......@@ -289,7 +289,7 @@ static const struct ITaskbarList4Vtbl taskbar_list_vtbl =
taskbar_list_SetTabProperties,
};
HRESULT WINAPI TaskbarList_Create(IClassFactory *iface, IUnknown *outer, REFIID riid, void **taskbar_list)
HRESULT TaskbarList_Constructor(IUnknown *outer, REFIID riid, void **taskbar_list)
{
struct taskbar_list *object;
HRESULT hres;
......@@ -303,7 +303,7 @@ HRESULT WINAPI TaskbarList_Create(IClassFactory *iface, IUnknown *outer, REFIID
return CLASS_E_NOAGGREGATION;
}
object = heap_alloc_zero(sizeof(*object));
object = heap_alloc(sizeof(*object));
if (!object)
{
ERR("Failed to allocate taskbar list object memory\n");
......@@ -313,7 +313,7 @@ HRESULT WINAPI TaskbarList_Create(IClassFactory *iface, IUnknown *outer, REFIID
object->ITaskbarList4_iface.lpVtbl = &taskbar_list_vtbl;
object->refcount = 1;
lock_module();
EFRAME_LockModule();
TRACE("Created ITaskbarList4 %p\n", object);
......
......@@ -18,7 +18,6 @@ C_SRCS = \
persist.c \
shellbrowser.c \
shelluihelper.c \
taskbarlist.c \
urlhist.c \
view.c \
webbrowser.c
......
......@@ -305,7 +305,6 @@ HRESULT register_class_object(BOOL) DECLSPEC_HIDDEN;
HRESULT WINAPI CUrlHistory_Create(IClassFactory*,IUnknown*,REFIID,void**) DECLSPEC_HIDDEN;
HRESULT WINAPI InternetExplorer_Create(IClassFactory*,IUnknown*,REFIID,void**) DECLSPEC_HIDDEN;
HRESULT WINAPI InternetShortcut_Create(IClassFactory*,IUnknown*,REFIID,void**) DECLSPEC_HIDDEN;
HRESULT WINAPI TaskbarList_Create(IClassFactory*,IUnknown*,REFIID,void**) DECLSPEC_HIDDEN;
HRESULT WINAPI WebBrowser_Create(IClassFactory*,IUnknown*,REFIID,void**) DECLSPEC_HIDDEN;
HRESULT WINAPI WebBrowserV1_Create(IClassFactory*,IUnknown*,REFIID,void**) DECLSPEC_HIDDEN;
......
......@@ -201,16 +201,6 @@ static const IClassFactoryVtbl CUrlHistoryFactoryVtbl = {
static IClassFactory CUrlHistoryFactory = { &CUrlHistoryFactoryVtbl };
static const IClassFactoryVtbl TaskbarListFactoryVtbl = {
ClassFactory_QueryInterface,
ClassFactory_AddRef,
ClassFactory_Release,
TaskbarList_Create,
ClassFactory_LockServer
};
static IClassFactory TaskbarListFactory = { &TaskbarListFactoryVtbl };
/******************************************************************
* DllMain (ieframe.@)
*/
......@@ -250,7 +240,6 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
return IClassFactory_QueryInterface(&WebBrowserV1Factory, riid, ppv);
}
if(IsEqualGUID(rclsid, &CLSID_InternetShortcut)) {
TRACE("(CLSID_InternetShortcut %s %p)\n", debugstr_guid(riid), ppv);
return IClassFactory_QueryInterface(&InternetShortcutFactory, riid, ppv);
......@@ -261,12 +250,6 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
return IClassFactory_QueryInterface(&CUrlHistoryFactory, riid, ppv);
}
if(IsEqualGUID(&CLSID_TaskbarList, rclsid)) {
TRACE("(CLSID_TaskbarList %s %p)\n", debugstr_guid(riid), ppv);
return IClassFactory_QueryInterface(&TaskbarListFactory, riid, ppv);
}
FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
return CLASS_E_CLASSNOTAVAILABLE;
}
......
......@@ -30,12 +30,6 @@
] coclass CUrlHistory { interface IUrlHistoryStg2; }
[
helpstring("Task Bar Communication"),
threading(apartment),
uuid(56fdf344-fd6d-11d0-958a-006097c9a090)
] coclass TaskbarList { interface ITaskbarList; }
[
helpstring("Internet Shortcut"),
threading(apartment),
progid("InternetShortcut"),
......
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