[QCKLNCH] Implement the quick launch shell extension including the CISFBand
[reactos.git] / dll / shellext / qcklnch / qcklnch.cpp
1 /*
2 * PROJECT: ReactOS shell extensions
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: dll/shellext/qcklnch/qcklnch.cpp
5 * PURPOSE: Quick Launch Toolbar (Taskbar Shell Extension)
6 * PROGRAMMERS: Shriraj Sawant a.k.a SR13 <sr.official@hotmail.com>
7 */
8
9 #include "precomp.h"
10
11 #include <atlwin.h>
12
13 WINE_DEFAULT_DEBUG_CHANNEL(qcklnch);
14
15 BEGIN_OBJECT_MAP(ObjectMap)
16 OBJECT_ENTRY(CLSID_QuickLaunchBand, CQuickLaunchBand)
17 END_OBJECT_MAP()
18
19 HINSTANCE g_hInstance;
20 CComModule g_Module;
21
22 STDAPI_(BOOL)
23 DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
24 {
25 if (fdwReason == DLL_PROCESS_ATTACH)
26 {
27 g_hInstance = hinstDLL;
28 DisableThreadLibraryCalls(g_hInstance);
29
30 g_Module.Init(ObjectMap, g_hInstance, NULL);
31 }
32 else if (fdwReason == DLL_PROCESS_DETACH)
33 {
34 g_hInstance = NULL;
35 g_Module.Term();
36 }
37 return TRUE;
38 }
39
40 STDAPI
41 DllRegisterServer(void)
42 {
43 HRESULT hr = g_Module.DllRegisterServer(FALSE);
44 if (FAILED(hr))
45 return hr;
46
47 return RegisterComCat();
48 }
49
50 STDAPI
51 DllUnregisterServer(void)
52 {
53 HRESULT hr = UnregisterComCat();
54 if (FAILED(hr))
55 return hr;
56
57 return g_Module.DllUnregisterServer(FALSE);
58 }
59
60 STDAPI
61 DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
62 {
63 return g_Module.DllGetClassObject(rclsid, riid, ppv);
64 }
65
66 STDAPI
67 DllCanUnloadNow(void)
68 {
69 return g_Module.DllCanUnloadNow();
70 }