4 * Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
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.
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.
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
23 #include <shlobj_undoc.h>
25 #include <shlguid_undoc.h>
31 #include <wine/debug.h>
34 #include "addressband.h"
35 #include "addresseditbox.h"
36 #include "bandproxy.h"
38 #include "bandsitemenu.h"
39 #include "brandband.h"
40 #include "internettoolbar.h"
42 WINE_DEFAULT_DEBUG_CHANNEL(browseui
);
44 class CBrowseUIModule
: public CComModule
50 BEGIN_OBJECT_MAP(ObjectMap
)
51 OBJECT_ENTRY(CLSID_ACLMulti
, CACLMulti
)
52 OBJECT_ENTRY(CLSID_SH_AddressBand
, CAddressBand
)
53 OBJECT_ENTRY(CLSID_AddressEditBox
, CAddressEditBox
)
54 OBJECT_ENTRY(CLSID_BandProxy
, CBandProxy
)
55 OBJECT_ENTRY(CLSID_RebarBandSite
, CBandSite
)
56 OBJECT_ENTRY(CLSID_BandSiteMenu
, CBandSiteMenu
)
57 OBJECT_ENTRY(CLSID_BrandBand
, CBrandBand
)
58 OBJECT_ENTRY(CLSID_InternetToolbar
, CInternetToolbar
)
61 CBrowseUIModule gModule
;
62 CAtlWinModule gWinModule
;
64 void *operator new (size_t, void *buf
)
69 /*************************************************************************
72 STDAPI_(BOOL
) DllMain(HINSTANCE hInstance
, DWORD dwReason
, LPVOID fImpLoad
)
74 TRACE("%p 0x%x %p\n", hInstance
, dwReason
, fImpLoad
);
76 /* HACK - the global constructors don't run, so I placement new them here */
77 new (&gModule
) CBrowseUIModule
;
78 new (&gWinModule
) CAtlWinModule
;
79 new (&_AtlBaseModule
) CAtlBaseModule
;
81 if (dwReason
== DLL_PROCESS_ATTACH
)
83 gModule
.Init(ObjectMap
, hInstance
, NULL
);
84 DisableThreadLibraryCalls (hInstance
);
86 else if (dwReason
== DLL_PROCESS_DETACH
)
93 /***********************************************************************
94 * DllCanUnloadNow (BROWSEUI.@)
96 STDAPI
DllCanUnloadNow()
98 return gModule
.DllCanUnloadNow();
101 /***********************************************************************
102 * DllGetClassObject (BROWSEUI.@)
104 STDAPI
DllGetClassObject(REFCLSID rclsid
, REFIID riid
, LPVOID
*ppv
)
106 return gModule
.DllGetClassObject(rclsid
, riid
, ppv
);
109 /***********************************************************************
110 * DllRegisterServer (BROWSEUI.@)
112 STDAPI
DllRegisterServer()
114 return gModule
.DllRegisterServer(FALSE
);
117 /***********************************************************************
118 * DllUnregisterServer (BROWSEUI.@)
120 STDAPI
DllUnregisterServer()
122 return gModule
.DllUnregisterServer(FALSE
);
125 /***********************************************************************
126 * DllGetVersion (BROWSEUI.@)
128 HRESULT WINAPI
DllGetVersion(DLLVERSIONINFO
*info
)
130 if (info
->cbSize
!= sizeof(DLLVERSIONINFO
)) FIXME("support DLLVERSIONINFO2\n");
132 /* this is what IE6 on Windows 98 reports */
133 info
->dwMajorVersion
= 6;
134 info
->dwMinorVersion
= 0;
135 info
->dwBuildNumber
= 2600;
136 info
->dwPlatformID
= DLLVER_PLATFORM_WINDOWS
;