ReactOS  0.4.15-dev-2106-g6de3300
browseui.cpp File Reference
#include "precomp.h"
Include dependency graph for browseui.cpp:

Go to the source code of this file.

Classes

class  CBrowseUIModule
 

Typedefs

typedef HRESULT(WINAPIPMENUBAND_CREATEINSTANCE) (REFIID riid, void **ppv)
 
typedef HRESULT(WINAPIPMERGEDFOLDER_CREATEINSTANCE) (REFIID riid, void **ppv)
 

Functions

HRESULT CAddressBand_CreateInstance (REFIID riid, void **ppv)
 
HRESULT CAddressEditBox_CreateInstance (REFIID riid, void **ppv)
 
HRESULT CBandProxy_CreateInstance (REFIID riid, void **ppv)
 
HRESULT CBrandBand_CreateInstance (REFIID riid, void **ppv)
 
HRESULT CSearchBar_CreateInstance (REFIID riid, LPVOID *ppv)
 
HRESULT CExplorerBand_CreateInstance (REFIID riid, LPVOID *ppv)
 
HRESULT CInternetToolbar_CreateInstance (REFIID riid, void **ppv)
 
HRESULT CMergedFolder_CreateInstance (REFIID riid, void **ppv)
 
HRESULT CMenuBand_CreateInstance (REFIID iid, LPVOID *ppv)
 
 STDAPI_ (BOOL) DllMain(HINSTANCE hInstance
 
 if (dwReason==DLL_PROCESS_ATTACH)
 
STDAPI DllCanUnloadNow ()
 
STDAPI DllGetClassObject (REFCLSID rclsid, REFIID riid, LPVOID *ppv)
 
STDAPI DllRegisterServer ()
 
STDAPI DllUnregisterServer ()
 
STDAPI DllGetVersion (DLLVERSIONINFO *info)
 

Variables

CBrowseUIModule gModule
 
CAtlWinModule gWinModule
 
DWORD dwReason
 
DWORD LPVOID fImpLoad
 
return TRUE
 

Typedef Documentation

◆ PMENUBAND_CREATEINSTANCE

typedef HRESULT(WINAPI * PMENUBAND_CREATEINSTANCE) (REFIID riid, void **ppv)

Definition at line 87 of file browseui.cpp.

◆ PMERGEDFOLDER_CREATEINSTANCE

typedef HRESULT(WINAPI * PMERGEDFOLDER_CREATEINSTANCE) (REFIID riid, void **ppv)

Definition at line 88 of file browseui.cpp.

Function Documentation

◆ CAddressBand_CreateInstance()

HRESULT CAddressBand_CreateInstance ( REFIID  riid,
void **  ppv 
)

Definition at line 24 of file browseui.cpp.

25 {
26 #if USE_CUSTOM_ADDRESSBAND
27  return ShellObjectCreator<CAddressBand>(riid, ppv);
28 #else
29  return CoCreateInstance(CLSID_SH_AddressBand, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARG(IUnknown, toolsBar));
30 #endif
31 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define IID_PPV_ARG(Itype, ppType)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
#define NULL
Definition: types.h:112

Referenced by CInternetToolbar::InitNew().

◆ CAddressEditBox_CreateInstance()

HRESULT CAddressEditBox_CreateInstance ( REFIID  riid,
void **  ppv 
)

Definition at line 33 of file browseui.cpp.

34 {
35 #if USE_CUSTOM_ADDRESSEDITBOX
36  return ShellObjectCreator<CAddressEditBox>(riid, ppv);
37 #else
38  return CoCreateInstance(CLSID_AddressEditBox, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARG(riid, &ppv));
39 #endif
40 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define IID_PPV_ARG(Itype, ppType)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
#define NULL
Definition: types.h:112

Referenced by CSearchBar::OnInitDialog(), and CAddressBand::SetSite().

◆ CBandProxy_CreateInstance()

HRESULT CBandProxy_CreateInstance ( REFIID  riid,
void **  ppv 
)

Definition at line 42 of file browseui.cpp.

43 {
44 #if USE_CUSTOM_BANDPROXY
45  return ShellObjectCreator<CBandProxy>(riid, ppv);
46 #else
47  return CoCreateInstance(CLSID_BandProxy, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARG(riid, &ppv));
48 #endif
49 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define IID_PPV_ARG(Itype, ppType)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
#define NULL
Definition: types.h:112

Referenced by CInternetToolbar::CreateAndInitBandProxy().

◆ CBrandBand_CreateInstance()

HRESULT CBrandBand_CreateInstance ( REFIID  riid,
void **  ppv 
)

Definition at line 51 of file browseui.cpp.

52 {
53 #if USE_CUSTOM_BRANDBAND
54  return ShellObjectCreator<CBrandBand>(riid, ppv);
55 #else
56  return CoCreateInstance(CLSID_BrandBand, NULL, CLSCTX_INPROC_SERVER, riid, ppv);
57 #endif
58 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
#define NULL
Definition: types.h:112

Referenced by CInternetToolbar::InitNew().

◆ CExplorerBand_CreateInstance()

HRESULT CExplorerBand_CreateInstance ( REFIID  riid,
LPVOID ppv 
)

Definition at line 69 of file browseui.cpp.

70 {
71 #if USE_CUSTOM_EXPLORERBAND
72  return ShellObjectCreator<CExplorerBand>(riid, ppv);
73 #else
74  return CoCreateInstance(CLSID_ExplorerBand, NULL, CLSCTX_INPROC_SERVER, riid, ppv);
75 #endif
76 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
#define NULL
Definition: types.h:112

Referenced by CShellBrowser::ShowBand().

◆ CInternetToolbar_CreateInstance()

HRESULT CInternetToolbar_CreateInstance ( REFIID  riid,
void **  ppv 
)

Definition at line 78 of file browseui.cpp.

79 {
80 #if USE_CUSTOM_INTERNETTOOLBAR
81  return ShellObjectCreator<CInternetToolbar>(riid, ppv);
82 #else
83  return CoCreateInstance(CLSID_InternetToolbar, NULL, CLSCTX_INPROC_SERVER, riid, ppv);
84 #endif
85 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
#define NULL
Definition: types.h:112

Referenced by CShellBrowser::Initialize().

◆ CMenuBand_CreateInstance()

HRESULT CMenuBand_CreateInstance ( REFIID  iid,
LPVOID ppv 
)

Definition at line 111 of file browseui.cpp.

112 {
113 #if USE_CUSTOM_MENUBAND
114  HMODULE hRShell = GetModuleHandleW(L"rshell.dll");
115 
116  if (!hRShell)
117  hRShell = LoadLibraryW(L"rshell.dll");
118 
119  if (hRShell)
120  {
121  PMENUBAND_CREATEINSTANCE func = (PMENUBAND_CREATEINSTANCE) GetProcAddress(hRShell, "CMenuBand_CreateInstance");
122  if (func)
123  {
124  return func(iid , ppv);
125  }
126  }
127 #endif
128  return CoCreateInstance(CLSID_MenuBand, NULL, CLSCTX_INPROC_SERVER, iid, ppv);
129 }
GLenum func
Definition: glext.h:6028
HRESULT(WINAPI * PMENUBAND_CREATEINSTANCE)(REFIID riid, void **ppv)
Definition: browseui.cpp:87
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define LoadLibraryW(x)
Definition: compat.h:606
static const WCHAR L[]
Definition: oid.c:1250
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
#define NULL
Definition: types.h:112
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:838
#define GetProcAddress(x, y)
Definition: compat.h:612

◆ CMergedFolder_CreateInstance()

HRESULT CMergedFolder_CreateInstance ( REFIID  riid,
void **  ppv 
)

Definition at line 90 of file browseui.cpp.

91 {
92 #if USE_CUSTOM_MERGEDFOLDER
93  HMODULE hRShell = GetModuleHandle(L"rshell.dll");
94  if (!hRShell)
95  hRShell = LoadLibrary(L"rshell.dll");
96 
97  if (hRShell)
98  {
99  PMERGEDFOLDER_CREATEINSTANCE pCMergedFolder_CreateInstance = (PMERGEDFOLDER_CREATEINSTANCE)
100  GetProcAddress(hRShell, "CMergedFolder_CreateInstance");
101 
102  if (pCMergedFolder_CreateInstance)
103  {
104  return pCMergedFolder_CreateInstance(riid, ppv);
105  }
106  }
107 #endif
108  return CoCreateInstance(CLSID_MergedFolder, NULL, CLSCTX_INPROC_SERVER, riid, ppv);
109 }
HRESULT(WINAPI * PMERGEDFOLDER_CREATEINSTANCE)(REFIID riid, void **ppv)
Definition: browseui.cpp:88
#define LoadLibrary
Definition: winbase.h:3718
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static const WCHAR L[]
Definition: oid.c:1250
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
#define GetModuleHandle
Definition: winbase.h:3683
#define NULL
Definition: types.h:112
#define GetProcAddress(x, y)
Definition: compat.h:612

◆ CSearchBar_CreateInstance()

HRESULT CSearchBar_CreateInstance ( REFIID  riid,
LPVOID ppv 
)

Definition at line 60 of file browseui.cpp.

61 {
62 #if USE_CUSTOM_SEARCHBAND
63  return ShellObjectCreator<CSearchBar>(riid, ppv);
64 #else
65  return CoCreateInstance(CLSID_FileSearchBand, NULL, CLSCTX_INPROC_SERVER, riid, ppv);
66 #endif
67 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
#define NULL
Definition: types.h:112

Referenced by CShellBrowser::ShowBand().

◆ DllCanUnloadNow()

STDAPI DllCanUnloadNow ( void  )

Definition at line 188 of file browseui.cpp.

189 {
190  return gModule.DllCanUnloadNow();
191 }
HRESULT DllCanUnloadNow()
Definition: atlbase.h:928
CBrowseUIModule gModule
Definition: browseui.cpp:163

◆ DllGetClassObject()

STDAPI DllGetClassObject ( REFCLSID  rclsid,
REFIID  riid,
LPVOID ppv 
)

Definition at line 196 of file browseui.cpp.

197 {
198  return gModule.DllGetClassObject(rclsid, riid, ppv);
199 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
CBrowseUIModule gModule
Definition: browseui.cpp:163
HRESULT DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
Definition: atlbase.h:935

◆ DllGetVersion()

STDAPI DllGetVersion ( DLLVERSIONINFO info)

Definition at line 220 of file browseui.cpp.

221 {
222  if (info->cbSize != sizeof(DLLVERSIONINFO)) FIXME("support DLLVERSIONINFO2\n");
223 
224  /* this is what IE6 on Windows 98 reports */
225  info->dwMajorVersion = 6;
226  info->dwMinorVersion = 0;
227  info->dwBuildNumber = 2600;
228  info->dwPlatformID = DLLVER_PLATFORM_WINDOWS;
229 
230  return NOERROR;
231 }
#define NOERROR
Definition: winerror.h:2354
#define FIXME(fmt,...)
Definition: debug.h:111
#define DLLVER_PLATFORM_WINDOWS
Definition: shlwapi.h:1961

Referenced by InstallerImpl_Version(), and loadShell32().

◆ DllRegisterServer()

STDAPI DllRegisterServer ( void  )

Definition at line 204 of file browseui.cpp.

205 {
207 }
HRESULT DllRegisterServer(BOOL bRegTypeLib=TRUE)
Definition: atlbase.h:940
CBrowseUIModule gModule
Definition: browseui.cpp:163
#define FALSE
Definition: types.h:117

◆ DllUnregisterServer()

STDAPI DllUnregisterServer ( void  )

Definition at line 212 of file browseui.cpp.

213 {
215 }
CBrowseUIModule gModule
Definition: browseui.cpp:163
#define FALSE
Definition: types.h:117
HRESULT DllUnregisterServer(BOOL bUnRegTypeLib=TRUE)
Definition: atlbase.h:945

◆ if()

Definition at line 173 of file browseui.cpp.

174  {
175  gModule.Init(ObjectMap, hInstance, NULL);
177  }
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
CBrowseUIModule gModule
Definition: browseui.cpp:163
HRESULT Init(_ATL_OBJMAP_ENTRY *p, HINSTANCE, const GUID *plibid)
Definition: atlbase.h:797
HINSTANCE hInstance
Definition: charmap.c:20
#define NULL
Definition: types.h:112

◆ STDAPI_()

STDAPI_ ( BOOL  )

Variable Documentation

◆ dwReason

DWORD dwReason

Definition at line 169 of file browseui.cpp.

◆ fImpLoad

DWORD LPVOID fImpLoad
Initial value:
{
TRACE("%p 0x%x %p\n", hInstance, dwReason, fImpLoad)
DWORD LPVOID fImpLoad
Definition: browseui.cpp:170
DWORD dwReason
Definition: browseui.cpp:169
HINSTANCE hInstance
Definition: charmap.c:20
#define TRACE(s)
Definition: solgame.cpp:4

Definition at line 170 of file browseui.cpp.

◆ gModule

◆ gWinModule

CAtlWinModule gWinModule

Definition at line 164 of file browseui.cpp.

◆ TRUE

return TRUE

Definition at line 182 of file browseui.cpp.