Synchronize with trunk revision 59636 (just before Alex's CreateProcess revamp).
[reactos.git] / dll / win32 / browseui / browseui.cpp
index cea6176..5c3aeeb 100644 (file)
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include <windows.h>
-#include <shlobj.h>
-#include <shlobj_undoc.h>
-#include <shlguid.h>
-#include <shlguid_undoc.h>
-#include <shlwapi.h>
-#include <tchar.h>
-#include <atlbase.h>
-#include <atlcom.h>
-#include <atlwin.h>
-#include <wine/debug.h>
-#include "resource.h"
-#include "aclmulti.h"
-#include "addressband.h"
-#include "addresseditbox.h"
-#include "bandproxy.h"
-#include "bandsite.h"
-#include "bandsitemenu.h"
-#include "brandband.h"
-#include "internettoolbar.h"
+#include "precomp.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(browseui);
 
@@ -55,15 +36,18 @@ OBJECT_ENTRY(CLSID_BandProxy, CBandProxy)
 OBJECT_ENTRY(CLSID_RebarBandSite, CBandSite)
 OBJECT_ENTRY(CLSID_BandSiteMenu, CBandSiteMenu)
 OBJECT_ENTRY(CLSID_BrandBand, CBrandBand)
+OBJECT_ENTRY(CLSID_CCommonBrowser, CCommonBrowser)
+OBJECT_ENTRY(CLSID_GlobalFolderSettings, CGlobalFolderSettings)
 OBJECT_ENTRY(CLSID_InternetToolbar, CInternetToolbar)
+OBJECT_ENTRY(CLSID_CRegTreeOptions, CRegTreeOptions)
 END_OBJECT_MAP()
 
-CBrowseUIModule                                                                gModule;
-CAtlWinModule                                                          gWinModule;
+CBrowseUIModule                             gModule;
+CAtlWinModule                               gWinModule;
 
 void *operator new (size_t, void *buf)
 {
-       return buf;
+    return buf;
 }
 
 /*************************************************************************
@@ -72,23 +56,23 @@ void *operator new (size_t, void *buf)
 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;
+
+    if (dwReason == DLL_PROCESS_ATTACH)
+    {
+        /* 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;
+
+        gModule.Init(ObjectMap, hInstance, NULL);
+        DisableThreadLibraryCalls (hInstance);
+    }
+    else if (dwReason == DLL_PROCESS_DETACH)
+    {
+        gModule.Term();
+    }
+    return TRUE;
 }
 
 /***********************************************************************
@@ -96,7 +80,7 @@ STDAPI_(BOOL) DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID fImpLoad)
  */
 STDAPI DllCanUnloadNow()
 {
-       return gModule.DllCanUnloadNow();
+    return gModule.DllCanUnloadNow();
 }
 
 /***********************************************************************
@@ -104,7 +88,7 @@ STDAPI DllCanUnloadNow()
  */
 STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
 {
-       return gModule.DllGetClassObject(rclsid, riid, ppv);
+    return gModule.DllGetClassObject(rclsid, riid, ppv);
 }
 
 /***********************************************************************
@@ -112,7 +96,7 @@ STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
  */
 STDAPI DllRegisterServer()
 {
-       return gModule.DllRegisterServer(FALSE);
+    return gModule.DllRegisterServer(FALSE);
 }
 
 /***********************************************************************
@@ -120,13 +104,13 @@ STDAPI DllRegisterServer()
  */
 STDAPI DllUnregisterServer()
 {
-       return gModule.DllUnregisterServer(FALSE);
+    return gModule.DllUnregisterServer(FALSE);
 }
 
 /***********************************************************************
  *              DllGetVersion (BROWSEUI.@)
  */
-HRESULT WINAPI DllGetVersion(DLLVERSIONINFO *info)
+STDAPI DllGetVersion(DLLVERSIONINFO *info)
 {
     if (info->cbSize != sizeof(DLLVERSIONINFO)) FIXME("support DLLVERSIONINFO2\n");