ieframe: Moved string and menu resources to ieframe.
[wine/testsucceed.git] / dlls / ieframe / ieframe_main.c
blob1b8a3d7dd41cc59c38e77d59ef78fb2f963c9d6a
1 /*
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
19 #include "ieframe.h"
21 #include "shlguid.h"
22 #include "isguids.h"
24 #include "wine/debug.h"
26 WINE_DEFAULT_DEBUG_CHANNEL(ieframe);
28 LONG module_ref = 0;
30 static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
32 *ppv = NULL;
34 if(IsEqualGUID(&IID_IUnknown, riid)) {
35 TRACE("(%p)->(IID_IUnknown %p)\n", iface, ppv);
36 *ppv = iface;
37 }else if(IsEqualGUID(&IID_IClassFactory, riid)) {
38 TRACE("(%p)->(IID_IClassFactory %p)\n", iface, ppv);
39 *ppv = iface;
42 if(*ppv) {
43 IUnknown_AddRef((IUnknown*)*ppv);
44 return S_OK;
47 FIXME("(%p)->(%s %p)\n", iface, debugstr_guid(riid), ppv);
48 return E_NOINTERFACE;
51 static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
53 TRACE("(%p)\n", iface);
54 return 2;
57 static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
59 TRACE("(%p)\n", iface);
60 return 1;
63 static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL fLock)
65 TRACE("(%p)->(%x)\n", iface, fLock);
66 return S_OK;
69 static const IClassFactoryVtbl InternetShortcutFactoryVtbl = {
70 ClassFactory_QueryInterface,
71 ClassFactory_AddRef,
72 ClassFactory_Release,
73 InternetShortcut_Create,
74 ClassFactory_LockServer
77 static IClassFactory InternetShortcutFactory = { &InternetShortcutFactoryVtbl };
79 static const IClassFactoryVtbl CUrlHistoryFactoryVtbl = {
80 ClassFactory_QueryInterface,
81 ClassFactory_AddRef,
82 ClassFactory_Release,
83 CUrlHistory_Create,
84 ClassFactory_LockServer
87 static IClassFactory CUrlHistoryFactory = { &CUrlHistoryFactoryVtbl };
89 static const IClassFactoryVtbl TaskbarListFactoryVtbl = {
90 ClassFactory_QueryInterface,
91 ClassFactory_AddRef,
92 ClassFactory_Release,
93 TaskbarList_Create,
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);
106 switch(fdwReason)
108 case DLL_WINE_PREATTACH:
109 return FALSE; /* prefer native version */
110 case DLL_PROCESS_ATTACH:
111 DisableThreadLibraryCalls(hInstDLL);
112 break;
115 return TRUE;
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)
148 TRACE("()\n");
149 return module_ref ? S_FALSE : S_OK;
152 /***********************************************************************
153 * DllRegisterServer (ieframe.@)
155 HRESULT WINAPI DllRegisterServer(void)
157 FIXME("()\n");
158 return S_OK;
161 /***********************************************************************
162 * DllUnregisterServer (ieframe.@)
164 HRESULT WINAPI DllUnregisterServer(void)
166 FIXME("()\n");
167 return S_OK;