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
;
80 new (&_AtlComModule
) CAtlComModule
;
82 if (dwReason
== DLL_PROCESS_ATTACH
)
84 gModule
.Init(ObjectMap
, hInstance
, NULL
);
85 DisableThreadLibraryCalls (hInstance
);
87 else if (dwReason
== DLL_PROCESS_DETACH
)
94 /***********************************************************************
95 * DllCanUnloadNow (BROWSEUI.@)
97 STDAPI
DllCanUnloadNow()
99 return gModule
.DllCanUnloadNow();
102 /***********************************************************************
103 * DllGetClassObject (BROWSEUI.@)
105 STDAPI
DllGetClassObject(REFCLSID rclsid
, REFIID riid
, LPVOID
*ppv
)
107 return gModule
.DllGetClassObject(rclsid
, riid
, ppv
);
110 /***********************************************************************
111 * DllRegisterServer (BROWSEUI.@)
113 STDAPI
DllRegisterServer()
115 return gModule
.DllRegisterServer(FALSE
);
118 /***********************************************************************
119 * DllUnregisterServer (BROWSEUI.@)
121 STDAPI
DllUnregisterServer()
123 return gModule
.DllUnregisterServer(FALSE
);
126 /***********************************************************************
127 * DllGetVersion (BROWSEUI.@)
129 HRESULT WINAPI
DllGetVersion(DLLVERSIONINFO
*info
)
131 if (info
->cbSize
!= sizeof(DLLVERSIONINFO
)) FIXME("support DLLVERSIONINFO2\n");
133 /* this is what IE6 on Windows 98 reports */
134 info
->dwMajorVersion
= 6;
135 info
->dwMinorVersion
= 0;
136 info
->dwBuildNumber
= 2600;
137 info
->dwPlatformID
= DLLVER_PLATFORM_WINDOWS
;