mirror of
https://github.com/reactos/wine.git
synced 2025-01-26 22:24:37 +00:00
ieframe: Moved TaskbarList implementation to ieframe.
This commit is contained in:
parent
a40345cf84
commit
5ac7376e49
@ -5,6 +5,7 @@ IMPORTS = uuid urlmon shell32 ole32 advapi32
|
||||
C_SRCS = \
|
||||
ieframe_main.c \
|
||||
intshcut.c \
|
||||
taskbarlist.c \
|
||||
urlhist.c
|
||||
|
||||
@MAKE_DLL_RULES@
|
||||
|
@ -29,11 +29,13 @@
|
||||
#include "winuser.h"
|
||||
|
||||
#include "ole2.h"
|
||||
#include "shlobj.h"
|
||||
|
||||
#include "wine/unicode.h"
|
||||
|
||||
HRESULT WINAPI CUrlHistory_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;
|
||||
|
||||
extern LONG module_ref DECLSPEC_HIDDEN;
|
||||
|
||||
|
@ -86,6 +86,16 @@ 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.@)
|
||||
*/
|
||||
@ -120,6 +130,12 @@ 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;
|
||||
}
|
||||
|
@ -18,11 +18,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
#include "wine/debug.h"
|
||||
#include "ieframe.h"
|
||||
|
||||
#include "shdocvw.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
|
||||
|
||||
@ -79,8 +77,8 @@ static ULONG STDMETHODCALLTYPE taskbar_list_Release(ITaskbarList4 *iface)
|
||||
|
||||
if (!refcount)
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
SHDOCVW_UnlockModule();
|
||||
heap_free(This);
|
||||
unlock_module();
|
||||
}
|
||||
|
||||
return refcount;
|
||||
@ -289,10 +287,10 @@ static const struct ITaskbarList4Vtbl taskbar_list_vtbl =
|
||||
taskbar_list_SetTabProperties,
|
||||
};
|
||||
|
||||
HRESULT TaskbarList_Create(IUnknown *outer, REFIID riid, void **taskbar_list)
|
||||
HRESULT WINAPI TaskbarList_Create(IClassFactory *iface, IUnknown *outer, REFIID riid, void **taskbar_list)
|
||||
{
|
||||
struct taskbar_list *object;
|
||||
HRESULT hr;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("outer %p, riid %s, taskbar_list %p\n", outer, debugstr_guid(riid), taskbar_list);
|
||||
|
||||
@ -303,7 +301,7 @@ HRESULT TaskbarList_Create(IUnknown *outer, REFIID riid, void **taskbar_list)
|
||||
return CLASS_E_NOAGGREGATION;
|
||||
}
|
||||
|
||||
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
|
||||
object = heap_alloc_zero(sizeof(*object));
|
||||
if (!object)
|
||||
{
|
||||
ERR("Failed to allocate taskbar list object memory\n");
|
||||
@ -312,18 +310,12 @@ HRESULT TaskbarList_Create(IUnknown *outer, REFIID riid, void **taskbar_list)
|
||||
}
|
||||
|
||||
object->ITaskbarList4_iface.lpVtbl = &taskbar_list_vtbl;
|
||||
object->refcount = 0;
|
||||
object->refcount = 1;
|
||||
lock_module();
|
||||
|
||||
TRACE("Created ITaskbarList4 %p\n", object);
|
||||
|
||||
hr = ITaskbarList4_QueryInterface(&object->ITaskbarList4_iface, riid, taskbar_list);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, object);
|
||||
return hr;
|
||||
}
|
||||
|
||||
SHDOCVW_LockModule();
|
||||
|
||||
return S_OK;
|
||||
hres = ITaskbarList4_QueryInterface(&object->ITaskbarList4_iface, riid, taskbar_list);
|
||||
ITaskbarList4_Release(&object->ITaskbarList4_iface);
|
||||
return hres;
|
||||
}
|
@ -19,7 +19,6 @@ C_SRCS = \
|
||||
shdocvw_main.c \
|
||||
shellbrowser.c \
|
||||
shlinstobj.c \
|
||||
taskbarlist.c \
|
||||
view.c \
|
||||
webbrowser.c
|
||||
|
||||
|
@ -154,7 +154,6 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv)
|
||||
{
|
||||
static IClassFactoryImpl WB1ClassFactory = {{&WBCF_Vtbl}, WebBrowserV1_Create};
|
||||
static IClassFactoryImpl WB2ClassFactory = {{&WBCF_Vtbl}, WebBrowserV2_Create};
|
||||
static IClassFactoryImpl TBLClassFactory = {{&WBCF_Vtbl}, TaskbarList_Create};
|
||||
|
||||
TRACE("\n");
|
||||
|
||||
@ -165,12 +164,10 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv)
|
||||
return IClassFactory_QueryInterface(&WB1ClassFactory.IClassFactory_iface, riid, ppv);
|
||||
|
||||
if(IsEqualGUID(&CLSID_InternetShortcut, rclsid)
|
||||
|| IsEqualGUID(&CLSID_CUrlHistory, rclsid))
|
||||
|| IsEqualGUID(&CLSID_CUrlHistory, rclsid)
|
||||
|| IsEqualGUID(&CLSID_TaskbarList, rclsid))
|
||||
return get_ieframe_object(rclsid, riid, ppv);
|
||||
|
||||
if(IsEqualGUID(&CLSID_TaskbarList, rclsid))
|
||||
return IClassFactory_QueryInterface(&TBLClassFactory.IClassFactory_iface, riid, ppv);
|
||||
|
||||
/* As a last resort, figure if the CLSID belongs to a 'Shell Instance Object' */
|
||||
return SHDOCVW_GetShellInstanceObjectClassObject(rclsid, riid, ppv);
|
||||
}
|
||||
|
@ -258,8 +258,6 @@ void InternetExplorer_WebBrowser_Init(InternetExplorer*) DECLSPEC_HIDDEN;
|
||||
|
||||
void released_obj(void) DECLSPEC_HIDDEN;
|
||||
|
||||
HRESULT TaskbarList_Create(IUnknown*,REFIID,void**) DECLSPEC_HIDDEN;
|
||||
|
||||
/**********************************************************************
|
||||
* Dll lifetime tracking declaration for shdocvw.dll
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user