https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8a52080dccb5b24b18d0d…
commit 8a52080dccb5b24b18d0d0063e2847911bde5b5a
Author: Giannis Adamopoulos <gadamopoulos(a)reactos.org>
AuthorDate: Fri Oct 20 16:02:13 2017 +0300
[BROWSEUI] Rename CISFBand_CreateInstance and add a CISFBand_CreateInstance macro that
makes easy to switch between the system implementation or the local one.
---
base/shell/rshell/CQuickLaunchBand.cpp | 4 ++--
dll/win32/browseui/shellbars/CISFBand.cpp | 2 +-
dll/win32/browseui/shellbars/CISFBand.h | 4 +---
dll/win32/browseui/shellbars/shellbars.h | 8 ++++++++
4 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/base/shell/rshell/CQuickLaunchBand.cpp
b/base/shell/rshell/CQuickLaunchBand.cpp
index 6f3c6dee51..c4a25224d5 100644
--- a/base/shell/rshell/CQuickLaunchBand.cpp
+++ b/base/shell/rshell/CQuickLaunchBand.cpp
@@ -34,7 +34,7 @@
#include "CQuickLaunchBand.h"
extern "C"
-HRESULT WINAPI CISFBand_CreateInstance(REFIID riid, void** ppv);
+HRESULT WINAPI RSHELL_CISFBand_CreateInstance(REFIID riid, void** ppv);
// {260CB95D-4544-44F6-A079-575BAA60B72F}
const GUID CLSID_QuickLaunchBand = { 0x260cb95d, 0x4544, 0x44f6, { 0xa0, 0x79, 0x57,
0x5b, 0xaa, 0x60, 0xb7, 0x2f } };
@@ -114,7 +114,7 @@ const GUID CLSID_QuickLaunchBand = { 0x260cb95d, 0x4544, 0x44f6, {
0xa0, 0x79, 0
*--*/
HRESULT CQuickLaunchBand::FinalConstruct()
{
- HRESULT hr = CISFBand_CreateInstance(IID_PPV_ARG(IUnknown, &m_punkISFB));
+ HRESULT hr = RSHELL_CISFBand_CreateInstance(IID_PPV_ARG(IUnknown,
&m_punkISFB));
if (FAILED_UNEXPECTEDLY(hr))
return hr;
diff --git a/dll/win32/browseui/shellbars/CISFBand.cpp
b/dll/win32/browseui/shellbars/CISFBand.cpp
index 85f44313ec..1ca4ee2cc3 100644
--- a/dll/win32/browseui/shellbars/CISFBand.cpp
+++ b/dll/win32/browseui/shellbars/CISFBand.cpp
@@ -578,7 +578,7 @@ HRESULT CISFBand::CreateSimpleToolbar(HWND hWndParent)
/*****************************************************************************/
// C Constructor
extern "C"
- HRESULT WINAPI CISFBand_CreateInstance(REFIID riid, void** ppv)
+ HRESULT WINAPI RSHELL_CISFBand_CreateInstance(REFIID riid, void** ppv)
{
return ShellObjectCreator<CISFBand>(riid, ppv);
}
diff --git a/dll/win32/browseui/shellbars/CISFBand.h
b/dll/win32/browseui/shellbars/CISFBand.h
index c8de82f50e..49b31e7f6d 100644
--- a/dll/win32/browseui/shellbars/CISFBand.h
+++ b/dll/win32/browseui/shellbars/CISFBand.h
@@ -191,6 +191,4 @@ public:
END_COM_MAP()
};
-// C Constructor
-extern "C"
-HRESULT WINAPI CISFBand_CreateInstance(REFIID riid, void** ppv);
\ No newline at end of file
+extern "C" HRESULT WINAPI RSHELL_CISFBand_CreateInstance(REFIID riid, void**
ppv);
diff --git a/dll/win32/browseui/shellbars/shellbars.h
b/dll/win32/browseui/shellbars/shellbars.h
index 731ecfdde5..ae1e6ed218 100644
--- a/dll/win32/browseui/shellbars/shellbars.h
+++ b/dll/win32/browseui/shellbars/shellbars.h
@@ -37,4 +37,12 @@ WINE_DEFAULT_DEBUG_CHANNEL(browseui);
#define GET_X_LPARAM(lp) ((int)(short)LOWORD(lp))
#define GET_Y_LPARAM(lp) ((int)(short)HIWORD(lp))
+#define USE_SYSTEM_ISFBAND 0
+
+#if USE_SYSTEM_ISFBAND
+#define CISFBand_CreateInstance(riid, ppv) (CoCreateInstance(CLSID_ISFBand, NULL,
CLSCTX_INPROC_SERVER,riid, ppv))
+#else
+#define CISFBand_CreateInstance RSHELL_CISFBand_CreateInstance
+#endif
+
#endif /* _BROWSEUI_PCH_ */