[BROWSEUI]
[reactos.git] / reactos / dll / win32 / browseui / browseui.cpp
1 /*
2 * ReactOS Explorer
3 *
4 * Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21 #include "precomp.h"
22
23 class CBrowseUIModule : public CComModule
24 {
25 public:
26 };
27
28
29 BEGIN_OBJECT_MAP(ObjectMap)
30 OBJECT_ENTRY(CLSID_AutoComplete, CAutoComplete)
31 OBJECT_ENTRY(CLSID_ACLMulti, CACLMulti)
32 OBJECT_ENTRY(CLSID_ACListISF, CACListISF)
33 OBJECT_ENTRY(CLSID_SH_AddressBand, CAddressBand)
34 OBJECT_ENTRY(CLSID_AddressEditBox, CAddressEditBox)
35 OBJECT_ENTRY(CLSID_BandProxy, CBandProxy)
36 OBJECT_ENTRY(CLSID_RebarBandSite, CBandSite)
37 OBJECT_ENTRY(CLSID_BandSiteMenu, CBandSiteMenu)
38 OBJECT_ENTRY(CLSID_BrandBand, CBrandBand)
39 OBJECT_ENTRY(CLSID_CCommonBrowser, CCommonBrowser)
40 OBJECT_ENTRY(CLSID_GlobalFolderSettings, CGlobalFolderSettings)
41 OBJECT_ENTRY(CLSID_InternetToolbar, CInternetToolbar)
42 OBJECT_ENTRY(CLSID_CRegTreeOptions, CRegTreeOptions)
43 OBJECT_ENTRY(CLSID_ExplorerBand, CExplorerBand)
44 OBJECT_ENTRY(CLSID_ProgressDialog, CProgressDialog)
45 END_OBJECT_MAP()
46
47 CBrowseUIModule gModule;
48 CAtlWinModule gWinModule;
49
50 void *operator new (size_t, void *buf)
51 {
52 return buf;
53 }
54
55 /*************************************************************************
56 * BROWSEUI DllMain
57 */
58 STDAPI_(BOOL) DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID fImpLoad)
59 {
60 TRACE("%p 0x%x %p\n", hInstance, dwReason, fImpLoad);
61
62 if (dwReason == DLL_PROCESS_ATTACH)
63 {
64 gModule.Init(ObjectMap, hInstance, NULL);
65 DisableThreadLibraryCalls (hInstance);
66 }
67 else if (dwReason == DLL_PROCESS_DETACH)
68 {
69 gModule.Term();
70 }
71 return TRUE;
72 }
73
74 /***********************************************************************
75 * DllCanUnloadNow (BROWSEUI.@)
76 */
77 STDAPI DllCanUnloadNow()
78 {
79 return gModule.DllCanUnloadNow();
80 }
81
82 /***********************************************************************
83 * DllGetClassObject (BROWSEUI.@)
84 */
85 STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
86 {
87 return gModule.DllGetClassObject(rclsid, riid, ppv);
88 }
89
90 /***********************************************************************
91 * DllRegisterServer (BROWSEUI.@)
92 */
93 STDAPI DllRegisterServer()
94 {
95 return gModule.DllRegisterServer(FALSE);
96 }
97
98 /***********************************************************************
99 * DllUnregisterServer (BROWSEUI.@)
100 */
101 STDAPI DllUnregisterServer()
102 {
103 return gModule.DllUnregisterServer(FALSE);
104 }
105
106 /***********************************************************************
107 * DllGetVersion (BROWSEUI.@)
108 */
109 STDAPI DllGetVersion(DLLVERSIONINFO *info)
110 {
111 if (info->cbSize != sizeof(DLLVERSIONINFO)) FIXME("support DLLVERSIONINFO2\n");
112
113 /* this is what IE6 on Windows 98 reports */
114 info->dwMajorVersion = 6;
115 info->dwMinorVersion = 0;
116 info->dwBuildNumber = 2600;
117 info->dwPlatformID = DLLVER_PLATFORM_WINDOWS;
118
119 return NOERROR;
120 }