Author: gedmurphy
Date: Thu May 1 06:01:10 2008
New Revision: 33209
URL:
http://svn.reactos.org/svn/reactos?rev=33209&view=rev
Log:
- Add IMenuBand COM interface
- Add IInitializeObject and IBanneredBar COM interfaces. Manually add the members, which
is a bit of a hack. We need to fix DECLARE_INTERFACE_IID_ to pre-register interfaces
- explorer_new no longer has redefinition errors when attempting to build with msvc9
Modified:
trunk/reactos/base/shell/explorer-new/todo.h
trunk/reactos/include/psdk/objbase.h
trunk/reactos/include/psdk/shlobj.h
trunk/reactos/include/psdk/shobjidl.idl
trunk/reactos/include/psdk/shtypes.idl
Modified: trunk/reactos/base/shell/explorer-new/todo.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/to…
==============================================================================
--- trunk/reactos/base/shell/explorer-new/todo.h [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer-new/todo.h [iso-8859-1] Thu May 1 06:01:10 2008
@@ -80,7 +80,7 @@
#define IShellService_SetOwner(T,a) (T)->lpVtbl->SetOwner(T,a)
#endif
-#if 0
+#if _MSC_VER
HRESULT WINAPI SHGetViewStatePropertyBag(LPCITEMIDLIST,LPCWSTR,DWORD,REFIID,PVOID*);/*
FIXME: Parameter should be PCIDLIST_ABSOLUTE */
#else
typedef HRESULT (WINAPI
*PSHGetViewStatePropertyBag)(LPCITEMIDLIST,LPCWSTR,DWORD,REFIID,PVOID*);
@@ -116,77 +116,4 @@
#define PIDLIST_ABSOLUTE LPITEMIDLIST
PIDLIST_ABSOLUTE WINAPI SHCloneSpecialIDList(HWND hwnd, int csidl, BOOL fCreate);
-enum
-{
- BMICON_LARGE = 0,
- BMICON_SMALL
-};
-#define INTERFACE IBanneredBar
-DECLARE_INTERFACE_(IBanneredBar,IUnknown)
-{
- /*** IUnknown methods ***/
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- /*** IBanneredBar methods ***/
- STDMETHOD_(HRESULT,SetIconSize)(THIS_ DWORD) PURE;
- STDMETHOD_(HRESULT,GetIconSize)(THIS_ DWORD*) PURE;
- STDMETHOD_(HRESULT,SetBitmap)(THIS_ HBITMAP) PURE;
- STDMETHOD_(HRESULT,GetBitmap)(THIS_ HBITMAP*) PURE;
-};
-#undef INTERFACE
-
-#ifdef COBJMACROS
-#define IBanneredBar_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IBanneredBar_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IBanneredBar_Release(T) (T)->lpVtbl->Release(T)
-#define IBanneredBar_SetIconSize(T,a) (T)->lpVtbl->SetIconSize(T,a)
-#define IBanneredBar_GetIconSize(T,a) (T)->lpVtbl->GetIconSize(T,a)
-#define IBanneredBar_SetBitmap(T,a) (T)->lpVtbl->SetBitmap(T,a)
-#define IBanneredBar_GetBitmap(T,a) (T)->lpVtbl->GetBitmap(T,a)
-#endif
-
-
-
-
-#define INTERFACE IMenuBand
-DECLARE_INTERFACE_(IMenuBand,IUnknown)
-{
- /*** IUnknown methods ***/
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- /*** IMenuBand methods ***/
- STDMETHOD_(HRESULT,IsMenuMessage)(THIS_ MSG*) PURE;
- STDMETHOD_(HRESULT,TranslateMenuMessage)(THIS_ MSG*,LRESULT*) PURE;
-};
-#undef INTERFACE
-
-#ifdef COBJMACROS
-#define IMenuBand_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IMenuBand_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IMenuBand_Release(T) (T)->lpVtbl->Release(T)
-#define IMenuBand_IsMenuMessage(T,a) (T)->lpVtbl->IsMenuMessage(T,a)
-#define IMenuBand_TranslateMenuMessage(T,a,b)
(T)->lpVtbl->TranslateMenuMessage(T,a,b)
-#endif
-
-#define INTERFACE IInitializeObject
-DECLARE_INTERFACE_(IInitializeObject,IUnknown)
-{
- /*** IUnknown methods ***/
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- /*** IInitializeObject methods ***/
- STDMETHOD_(HRESULT,Initialize)(THIS) PURE;
-};
-#undef INTERFACE
-
-#ifdef COBJMACROS
-#define IInitializeObject_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IInitializeObject_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IInitializeObject_Release(T) (T)->lpVtbl->Release(T)
-#define IInitializeObject_Initialize(T) (T)->lpVtbl->Initialize(T)
-#endif
-
#endif /* __TODO_H */
Modified: trunk/reactos/include/psdk/objbase.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/objbase.h?rev…
==============================================================================
--- trunk/reactos/include/psdk/objbase.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/objbase.h [iso-8859-1] Thu May 1 06:01:10 2008
@@ -227,6 +227,8 @@
#define interface struct
#define DECLARE_INTERFACE(iface) interface iface
#define DECLARE_INTERFACE_(iface,ibase) interface iface : public ibase
+#define DECLARE_INTERFACE_IID(iface, iid) interface DECLSPEC_UUID(iid)
DECLSPEC_NOVTABLE iface
+#define DECLARE_INTERFACE_IID_(iface, baseiface, iid) interface DECLSPEC_UUID(iid)
DECLSPEC_NOVTABLE iface : public baseiface
#define BEGIN_INTERFACE
#define END_INTERFACE
Modified: trunk/reactos/include/psdk/shlobj.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/shlobj.h?rev=…
==============================================================================
--- trunk/reactos/include/psdk/shlobj.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/shlobj.h [iso-8859-1] Thu May 1 06:01:10 2008
@@ -1516,6 +1516,60 @@
const OPENASINFO *poainfo
);
+/*****************************************************************************
+ * IInitializeObject interface
+ */
+#undef INTERFACE
+#define INTERFACE IInitializeObject
+
+DECLARE_INTERFACE_(IInitializeObject, IUnknown)//,
"4622AD16-FF23-11d0-8D34-00A0C90F2719")
+{
+ STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
+ STDMETHOD_(ULONG,AddRef) (THIS) PURE;
+ STDMETHOD_(ULONG,Release) (THIS) PURE;
+
+ STDMETHOD(Initialize)(THIS) PURE;
+};
+#undef INTERFACE
+#if !defined(__cplusplus) || defined(CINTERFACE)
+#define IInitializeObject_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
+#define IInitializeObject_AddRef(T) (T)->lpVtbl->AddRef(T)
+#define IInitializeObject_Release(T) (T)->lpVtbl->Release(T)
+#define IInitializeObject_Initialize(T) (T)->lpVtbl->Initialize(T)
+#endif
+
+
+/*****************************************************************************
+ * IBanneredBar interface
+ */
+enum
+{
+ BMICON_LARGE = 0,
+ BMICON_SMALL
+};
+#define INTERFACE IBanneredBar
+DECLARE_INTERFACE_(IBanneredBar, IUnknown)//,
"596A9A94-013E-11d1-8D34-00A0C90F2719")
+{
+ STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
+ STDMETHOD_(ULONG,AddRef) (THIS) PURE;
+ STDMETHOD_(ULONG,Release) (THIS) PURE;
+
+ STDMETHOD(SetIconSize)(THIS_ DWORD iIcon) PURE;
+ STDMETHOD(GetIconSize)(THIS_ DWORD* piIcon) PURE;
+ STDMETHOD(SetBitmap)(THIS_ HBITMAP hBitmap) PURE;
+ STDMETHOD(GetBitmap)(THIS_ HBITMAP* phBitmap) PURE;
+
+};
+#undef INTERFACE
+#if !defined(__cplusplus) || defined(CINTERFACE)
+#define IBanneredBar_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
+#define IBanneredBar_AddRef(T) (T)->lpVtbl->AddRef(T)
+#define IBanneredBar_Release(T) (T)->lpVtbl->Release(T)
+#define IBanneredBar_SetIconSize(T,a) (T)->lpVtbl->SetIconSize(T,a)
+#define IBanneredBar_GetIconSize(T,a) (T)->lpVtbl->GetIconSize(T,a)
+#define IBanneredBar_SetBitmap(T,a) (T)->lpVtbl->SetBitmap(T,a)
+#define IBanneredBar_GetBitmap(T,a) (T)->lpVtbl->GetBitmap(T,a)
+#endif
#ifdef __cplusplus
} /* extern "C" */
Modified: trunk/reactos/include/psdk/shobjidl.idl
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/shobjidl.idl?…
==============================================================================
--- trunk/reactos/include/psdk/shobjidl.idl [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/shobjidl.idl [iso-8859-1] Thu May 1 06:01:10 2008
@@ -1742,6 +1742,26 @@
cpp_quote("#endif /* _WIN32_IE_IE40 */")
-
-
-
+/*****************************************************************************
+ * IMenuBand interface
+ */
+[
+ uuid(568804CD-CBD7-11d0-9816-00C04FD91972),
+ object,
+ pointer_default(unique),
+ local
+]
+interface IMenuBand : IUnknown
+{
+ enum tagMENUBANDHANDLERCID {
+ MBHANDCID_PIDLSELECT = 0,
+ };
+
+ HRESULT IsMenuMessage([in] MSG* pmsg);
+
+ HRESULT TranslateMenuMessage(
+ [in, out] MSG* pmsg,
+ [out] LRESULT* plRet);
+}
+
+
Modified: trunk/reactos/include/psdk/shtypes.idl
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/shtypes.idl?r…
==============================================================================
--- trunk/reactos/include/psdk/shtypes.idl [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/shtypes.idl [iso-8859-1] Thu May 1 06:01:10 2008
@@ -69,7 +69,7 @@
typedef PCUIDLIST_RELATIVE const *PCUIDLIST_RELATIVE_ARRAY;
typedef PCIDLIST_ABSOLUTE const *PCIDLIST_ABSOLUTE_ARRAY;
typedef PCUIDLIST_ABSOLUTE const *PCUIDLIST_ABSOLUTE_ARRAY;
-cpp_quote("#else // !(defined(STRICT_TYPED_ITEMIDS) &&
defined(__cplusplus))")
+cpp_quote("#else /* !(defined(STRICT_TYPED_ITEMIDS) && defined(__cplusplus))
*/")
cpp_quote("#define PIDLIST_ABSOLUTE LPITEMIDLIST")
cpp_quote("#define PCIDLIST_ABSOLUTE LPCITEMIDLIST")
cpp_quote("#define PCUIDLIST_ABSOLUTE LPCITEMIDLIST")
@@ -85,7 +85,7 @@
cpp_quote("#define PCUIDLIST_RELATIVE_ARRAY LPCITEMIDLIST *")
cpp_quote("#define PCIDLIST_ABSOLUTE_ARRAY LPCITEMIDLIST *")
cpp_quote("#define PCUIDLIST_ABSOLUTE_ARRAY LPCITEMIDLIST *")
-cpp_quote("#endif // defined(STRICT_TYPED_ITEMIDS) &&
defined(__cplusplus)")
+cpp_quote("#endif /* defined(STRICT_TYPED_ITEMIDS) && defined(__cplusplus)
*/")
#ifndef MAX_PATH