ReactOS  0.4.13-dev-544-gede3fdd
rshell.cpp File Reference
#include "precomp.h"
Include dependency graph for rshell.cpp:

Go to the source code of this file.

Typedefs

typedef HRESULT(WINAPIPSTARTMENU_CREATEINSTANCE) (REFIID riid, void **ppv)
 
typedef HANDLE(WINAPIPSHCREATEDESKTOP) (IShellDesktopTray *ShellDesk)
 
typedef BOOL(WINAPIPSHDESKTOPMESSAGELOOP) (HANDLE hDesktop)
 
typedef DWORD(WINAPIPWINLIST_INIT) (void)
 
typedef void(WINAPIPSHELLDDEINIT) (BOOL bInit)
 
typedef HRESULT(WINAPICBANDSITEMENU_CREATEINSTANCE) (REFIID riid, void **ppv)
 
typedef HRESULT(WINAPICBANDSITE_CREATEINSTANCE) (LPUNKNOWN pUnkOuter, REFIID riid, void **ppv)
 

Functions

VOID InitRSHELL (VOID)
 
HRESULT WINAPI _CStartMenu_CreateInstance (REFIID riid, void **ppv)
 
HANDLE WINAPI _SHCreateDesktop (IShellDesktopTray *ShellDesk)
 
BOOL WINAPI _SHDesktopMessageLoop (HANDLE hDesktop)
 
DWORD WINAPI _WinList_Init (void)
 
void WINAPI _ShellDDEInit (BOOL bInit)
 
HRESULT WINAPI _CBandSiteMenu_CreateInstance (REFIID riid, void **ppv)
 
HRESULT WINAPI _CBandSite_CreateInstance (LPUNKNOWN pUnkOuter, REFIID riid, void **ppv)
 

Variables

static HINSTANCE ghRShell = NULL
 

Typedef Documentation

◆ CBANDSITE_CREATEINSTANCE

typedef HRESULT(WINAPI * CBANDSITE_CREATEINSTANCE) (LPUNKNOWN pUnkOuter, REFIID riid, void **ppv)

Definition at line 185 of file rshell.cpp.

◆ CBANDSITEMENU_CREATEINSTANCE

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

Definition at line 166 of file rshell.cpp.

◆ PSHCREATEDESKTOP

typedef HANDLE(WINAPI * PSHCREATEDESKTOP) (IShellDesktopTray *ShellDesk)

Definition at line 50 of file rshell.cpp.

◆ PSHDESKTOPMESSAGELOOP

typedef BOOL(WINAPI * PSHDESKTOPMESSAGELOOP) (HANDLE hDesktop)

Definition at line 79 of file rshell.cpp.

◆ PSHELLDDEINIT

typedef void(WINAPI * PSHELLDDEINIT) (BOOL bInit)

Definition at line 137 of file rshell.cpp.

◆ PSTARTMENU_CREATEINSTANCE

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

Definition at line 25 of file rshell.cpp.

◆ PWINLIST_INIT

typedef DWORD(WINAPI* PWINLIST_INIT) (void)

Definition at line 108 of file rshell.cpp.

Function Documentation

◆ _CBandSite_CreateInstance()

HRESULT WINAPI _CBandSite_CreateInstance ( LPUNKNOWN  pUnkOuter,
REFIID  riid,
void **  ppv 
)

Definition at line 186 of file rshell.cpp.

187 {
188  if (ghRShell)
189  {
191  if (func)
192  {
193  return func(pUnkOuter, riid, ppv);
194  }
195  }
196 
197  return CoCreateInstance(CLSID_RebarBandSite,
198  pUnkOuter,
199  CLSCTX_INPROC_SERVER,
200  riid,
201  ppv);
202 }
GLenum func
Definition: glext.h:6028
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static HINSTANCE ghRShell
Definition: rshell.cpp:23
HRESULT(WINAPI * CBANDSITE_CREATEINSTANCE)(LPUNKNOWN pUnkOuter, REFIID riid, void **ppv)
Definition: rshell.cpp:185
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3234
#define GetProcAddress(x, y)
Definition: compat.h:410

Referenced by CTrayBandSite::_Init().

◆ _CBandSiteMenu_CreateInstance()

HRESULT WINAPI _CBandSiteMenu_CreateInstance ( REFIID  riid,
void **  ppv 
)

Definition at line 167 of file rshell.cpp.

168 {
169  if (ghRShell)
170  {
172  if (func)
173  {
174  return func(riid, ppv);
175  }
176  }
177 
178  return CoCreateInstance(CLSID_BandSiteMenu,
179  NULL,
180  CLSCTX_INPROC_SERVER,
181  riid,
182  ppv);
183 }
GLenum func
Definition: glext.h:6028
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static HINSTANCE ghRShell
Definition: rshell.cpp:23
HRESULT(WINAPI * CBANDSITEMENU_CREATEINSTANCE)(REFIID riid, void **ppv)
Definition: rshell.cpp:166
smooth NULL
Definition: ftsmooth.c:416
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3234
#define GetProcAddress(x, y)
Definition: compat.h:410

Referenced by CTrayBandSite::AddContextMenus().

◆ _CStartMenu_CreateInstance()

HRESULT WINAPI _CStartMenu_CreateInstance ( REFIID  riid,
void **  ppv 
)

Definition at line 32 of file rshell.cpp.

33 {
34  if (ghRShell)
35  {
37  if (func)
38  {
39  return func(riid, ppv);
40  }
41  }
42 
44  NULL,
45  CLSCTX_INPROC_SERVER,
46  riid,
47  ppv);
48 }
GLenum func
Definition: glext.h:6028
HRESULT(WINAPI * PSTARTMENU_CREATEINSTANCE)(REFIID riid, void **ppv)
Definition: rshell.cpp:25
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static HINSTANCE ghRShell
Definition: rshell.cpp:23
smooth NULL
Definition: ftsmooth.c:416
const GUID CLSID_StartMenu
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3234
#define GetProcAddress(x, y)
Definition: compat.h:410

Referenced by CreateStartMenu().

◆ _SHCreateDesktop()

HANDLE WINAPI _SHCreateDesktop ( IShellDesktopTray *  ShellDesk)

Definition at line 52 of file rshell.cpp.

53 {
54  HINSTANCE hFallback;
55 
56  if (ghRShell)
57  {
59  if (func)
60  {
61  return func(ShellDesk);
62  }
63  }
64 
65  hFallback = GetModuleHandleW(L"shell32.dll");
66 
67  if (hFallback)
68  {
70  if (func)
71  {
72  return func(ShellDesk);
73  }
74  }
75 
76  return 0;
77 }
GLenum func
Definition: glext.h:6028
static HINSTANCE ghRShell
Definition: rshell.cpp:23
const char * LPCSTR
Definition: xmlstorage.h:183
HANDLE(WINAPI * PSHCREATEDESKTOP)(IShellDesktopTray *ShellDesk)
Definition: rshell.cpp:50
static const WCHAR L[]
Definition: oid.c:1250
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:845
#define GetProcAddress(x, y)
Definition: compat.h:410

Referenced by CDesktopThread::DesktopThreadProc().

◆ _SHDesktopMessageLoop()

BOOL WINAPI _SHDesktopMessageLoop ( HANDLE  hDesktop)

Definition at line 81 of file rshell.cpp.

82 {
83  HINSTANCE hFallback;
84 
85  if (ghRShell)
86  {
88  if (func)
89  {
90  return func(hDesktop);
91  }
92  }
93 
94  hFallback = GetModuleHandleW(L"shell32.dll");
95 
96  if (hFallback)
97  {
99  if (func)
100  {
101  return func(hDesktop);
102  }
103  }
104 
105  return FALSE;
106 }
GLenum func
Definition: glext.h:6028
BOOL(WINAPI * PSHDESKTOPMESSAGELOOP)(HANDLE hDesktop)
Definition: rshell.cpp:79
static HINSTANCE ghRShell
Definition: rshell.cpp:23
const char * LPCSTR
Definition: xmlstorage.h:183
static const WCHAR L[]
Definition: oid.c:1250
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:845
#define GetProcAddress(x, y)
Definition: compat.h:410

Referenced by CDesktopThread::DesktopThreadProc().

◆ _ShellDDEInit()

void WINAPI _ShellDDEInit ( BOOL  bInit)

Definition at line 139 of file rshell.cpp.

140 {
141  HINSTANCE hFallback;
142 
143  if (ghRShell)
144  {
146  if (func)
147  {
148  func(bInit);
149  return;
150  }
151  }
152 
153  hFallback = GetModuleHandleW(L"shell32.dll");
154 
155  if (hFallback)
156  {
157  PSHELLDDEINIT func = (PSHELLDDEINIT) GetProcAddress(hFallback, (LPCSTR) 188);
158  if (func)
159  {
160  func(bInit);
161  return;
162  }
163  }
164 }
GLenum func
Definition: glext.h:6028
static HINSTANCE ghRShell
Definition: rshell.cpp:23
const char * LPCSTR
Definition: xmlstorage.h:183
void(WINAPI * PSHELLDDEINIT)(BOOL bInit)
Definition: rshell.cpp:137
static const WCHAR L[]
Definition: oid.c:1250
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:845
#define GetProcAddress(x, y)
Definition: compat.h:410

Referenced by StartWithDesktop().

◆ _WinList_Init()

DWORD WINAPI _WinList_Init ( void  )

Definition at line 110 of file rshell.cpp.

111 {
112  HINSTANCE hFallback;
113 
114  if (ghRShell)
115  {
117  if (func)
118  {
119  return func();
120  }
121  }
122 
123  hFallback = LoadLibraryW(L"shdocvw.dll");
124 
125  if (hFallback)
126  {
127  PWINLIST_INIT func = (PWINLIST_INIT) GetProcAddress(hFallback, (LPCSTR) 110);
128  if (func)
129  {
130  return func();
131  }
132  }
133 
134  return 0;
135 }
GLenum func
Definition: glext.h:6028
static HINSTANCE ghRShell
Definition: rshell.cpp:23
#define LoadLibraryW(x)
Definition: compat.h:404
const char * LPCSTR
Definition: xmlstorage.h:183
DWORD(WINAPI * PWINLIST_INIT)(void)
Definition: rshell.cpp:108
static const WCHAR L[]
Definition: oid.c:1250
#define GetProcAddress(x, y)
Definition: compat.h:410

Referenced by StartWithDesktop().

◆ InitRSHELL()

VOID InitRSHELL ( VOID  )

Definition at line 27 of file rshell.cpp.

28 {
29  ghRShell = LoadLibraryW(L"rshell.dll");
30 }
static HINSTANCE ghRShell
Definition: rshell.cpp:23
#define LoadLibraryW(x)
Definition: compat.h:404
static const WCHAR L[]
Definition: oid.c:1250

Referenced by _tWinMain().

Variable Documentation

◆ ghRShell