reactos/dll/win32/browseui/browseui.cpp
Amine Khaldi 178300c8a6 * Sync to trunk HEAD (r53318).
* Fix PCH use in shell32.

svn path=/branches/shell32_new-bringup/; revision=53319
2011-08-19 17:45:34 +00:00

122 lines
3.4 KiB
C++

/*
* ReactOS Explorer
*
* Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "precomp.h"
WINE_DEFAULT_DEBUG_CHANNEL(browseui);
class CBrowseUIModule : public CComModule
{
public:
};
BEGIN_OBJECT_MAP(ObjectMap)
OBJECT_ENTRY(CLSID_ACLMulti, CACLMulti)
OBJECT_ENTRY(CLSID_SH_AddressBand, CAddressBand)
OBJECT_ENTRY(CLSID_AddressEditBox, CAddressEditBox)
OBJECT_ENTRY(CLSID_BandProxy, CBandProxy)
OBJECT_ENTRY(CLSID_RebarBandSite, CBandSite)
OBJECT_ENTRY(CLSID_BandSiteMenu, CBandSiteMenu)
OBJECT_ENTRY(CLSID_BrandBand, CBrandBand)
OBJECT_ENTRY(CLSID_InternetToolbar, CInternetToolbar)
END_OBJECT_MAP()
CBrowseUIModule gModule;
CAtlWinModule gWinModule;
void *operator new (size_t, void *buf)
{
return buf;
}
/*************************************************************************
* BROWSEUI DllMain
*/
STDAPI_(BOOL) DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID fImpLoad)
{
TRACE("%p 0x%x %p\n", hInstance, dwReason, fImpLoad);
/* HACK - the global constructors don't run, so I placement new them here */
new (&gModule) CBrowseUIModule;
new (&gWinModule) CAtlWinModule;
new (&_AtlBaseModule) CAtlBaseModule;
new (&_AtlComModule) CAtlComModule;
if (dwReason == DLL_PROCESS_ATTACH)
{
gModule.Init(ObjectMap, hInstance, NULL);
DisableThreadLibraryCalls (hInstance);
}
else if (dwReason == DLL_PROCESS_DETACH)
{
gModule.Term();
}
return TRUE;
}
/***********************************************************************
* DllCanUnloadNow (BROWSEUI.@)
*/
STDAPI DllCanUnloadNow()
{
return gModule.DllCanUnloadNow();
}
/***********************************************************************
* DllGetClassObject (BROWSEUI.@)
*/
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
return gModule.DllGetClassObject(rclsid, riid, ppv);
}
/***********************************************************************
* DllRegisterServer (BROWSEUI.@)
*/
STDAPI DllRegisterServer()
{
return gModule.DllRegisterServer(FALSE);
}
/***********************************************************************
* DllUnregisterServer (BROWSEUI.@)
*/
STDAPI DllUnregisterServer()
{
return gModule.DllUnregisterServer(FALSE);
}
/***********************************************************************
* DllGetVersion (BROWSEUI.@)
*/
HRESULT WINAPI DllGetVersion(DLLVERSIONINFO *info)
{
if (info->cbSize != sizeof(DLLVERSIONINFO)) FIXME("support DLLVERSIONINFO2\n");
/* this is what IE6 on Windows 98 reports */
info->dwMajorVersion = 6;
info->dwMinorVersion = 0;
info->dwBuildNumber = 2600;
info->dwPlatformID = DLLVER_PLATFORM_WINDOWS;
return NOERROR;
}