2 * Copyright 2011 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
24 #include "wine/debug.h"
26 WINE_DEFAULT_DEBUG_CHANNEL(ieframe
);
30 static HRESULT WINAPI
ClassFactory_QueryInterface(IClassFactory
*iface
, REFIID riid
, void **ppv
)
34 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
35 TRACE("(%p)->(IID_IUnknown %p)\n", iface
, ppv
);
37 }else if(IsEqualGUID(&IID_IClassFactory
, riid
)) {
38 TRACE("(%p)->(IID_IClassFactory %p)\n", iface
, ppv
);
43 IUnknown_AddRef((IUnknown
*)*ppv
);
47 FIXME("(%p)->(%s %p)\n", iface
, debugstr_guid(riid
), ppv
);
51 static ULONG WINAPI
ClassFactory_AddRef(IClassFactory
*iface
)
53 TRACE("(%p)\n", iface
);
57 static ULONG WINAPI
ClassFactory_Release(IClassFactory
*iface
)
59 TRACE("(%p)\n", iface
);
63 static HRESULT WINAPI
ClassFactory_LockServer(IClassFactory
*iface
, BOOL fLock
)
65 TRACE("(%p)->(%x)\n", iface
, fLock
);
69 static const IClassFactoryVtbl InternetShortcutFactoryVtbl
= {
70 ClassFactory_QueryInterface
,
73 InternetShortcut_Create
,
74 ClassFactory_LockServer
77 static IClassFactory InternetShortcutFactory
= { &InternetShortcutFactoryVtbl
};
79 static const IClassFactoryVtbl CUrlHistoryFactoryVtbl
= {
80 ClassFactory_QueryInterface
,
84 ClassFactory_LockServer
87 static IClassFactory CUrlHistoryFactory
= { &CUrlHistoryFactoryVtbl
};
89 static const IClassFactoryVtbl TaskbarListFactoryVtbl
= {
90 ClassFactory_QueryInterface
,
94 ClassFactory_LockServer
97 static IClassFactory TaskbarListFactory
= { &TaskbarListFactoryVtbl
};
99 /******************************************************************
100 * DllMain (ieframe.@)
102 BOOL WINAPI
DllMain(HINSTANCE hInstDLL
, DWORD fdwReason
, LPVOID lpv
)
104 TRACE("(%p %d %p)\n", hInstDLL
, fdwReason
, lpv
);
108 case DLL_WINE_PREATTACH
:
109 return FALSE
; /* prefer native version */
110 case DLL_PROCESS_ATTACH
:
111 DisableThreadLibraryCalls(hInstDLL
);
118 /***********************************************************************
119 * DllGetClassObject (ieframe.@)
121 HRESULT WINAPI
DllGetClassObject(REFCLSID rclsid
, REFIID riid
, LPVOID
*ppv
)
123 if(IsEqualGUID(rclsid
, &CLSID_InternetShortcut
)) {
124 TRACE("(CLSID_InternetShortcut %s %p)\n", debugstr_guid(riid
), ppv
);
125 return IClassFactory_QueryInterface(&InternetShortcutFactory
, riid
, ppv
);
128 if(IsEqualGUID(&CLSID_CUrlHistory
, rclsid
)) {
129 TRACE("(CLSID_CUrlHistory %s %p)\n", debugstr_guid(riid
), ppv
);
130 return IClassFactory_QueryInterface(&CUrlHistoryFactory
, riid
, ppv
);
133 if(IsEqualGUID(&CLSID_TaskbarList
, rclsid
)) {
134 TRACE("(CLSID_TaskbarList %s %p)\n", debugstr_guid(riid
), ppv
);
135 return IClassFactory_QueryInterface(&TaskbarListFactory
, riid
, ppv
);
139 FIXME("%s %s %p\n", debugstr_guid(rclsid
), debugstr_guid(riid
), ppv
);
140 return CLASS_E_CLASSNOTAVAILABLE
;
143 /***********************************************************************
144 * DllCanUnloadNow (ieframe.@)
146 HRESULT WINAPI
DllCanUnloadNow(void)
149 return module_ref
? S_FALSE
: S_OK
;
152 /***********************************************************************
153 * DllRegisterServer (ieframe.@)
155 HRESULT WINAPI
DllRegisterServer(void)
161 /***********************************************************************
162 * DllUnregisterServer (ieframe.@)
164 HRESULT WINAPI
DllUnregisterServer(void)