[SHELL32] Add IActiveDesktop stub 1106/head
authorMark Jansen <mark.jansen@reactos.org>
Sun, 9 Dec 2018 15:11:14 +0000 (16:11 +0100)
committerMark Jansen <mark.jansen@reactos.org>
Wed, 12 Dec 2018 18:29:09 +0000 (19:29 +0100)
CORE-15424

dll/win32/shell32/CActiveDesktop.cpp [new file with mode: 0644]
dll/win32/shell32/CActiveDesktop.h [new file with mode: 0644]
dll/win32/shell32/CMakeLists.txt
dll/win32/shell32/precomp.h
dll/win32/shell32/res/rgs/activedesktop.rgs [new file with mode: 0644]
dll/win32/shell32/rgs_res.rc
dll/win32/shell32/shell32.cpp
dll/win32/shell32/shresdef.h

diff --git a/dll/win32/shell32/CActiveDesktop.cpp b/dll/win32/shell32/CActiveDesktop.cpp
new file mode 100644 (file)
index 0000000..abc47e3
--- /dev/null
@@ -0,0 +1,156 @@
+/*
+ * PROJECT:     shell32
+ * LICENSE:     LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
+ * PURPOSE:     IActiveDesktop stub
+ * COPYRIGHT:   Copyright 2018 Mark Jansen (mark.jansen@reactos.org)
+ */
+
+#include "precomp.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(shell_ad);
+
+/***********************************************************************
+*   IActiveDesktop implementation
+*/
+
+CActiveDesktop::CActiveDesktop()
+{
+    UNIMPLEMENTED;
+}
+
+CActiveDesktop::~CActiveDesktop()
+{
+    UNIMPLEMENTED;
+}
+
+HRESULT WINAPI CActiveDesktop::ApplyChanges(DWORD dwFlags)
+{
+    UNIMPLEMENTED;
+    return E_NOTIMPL;
+}
+
+HRESULT WINAPI CActiveDesktop::GetWallpaper(PWSTR pwszWallpaper, UINT cchWallpaper, DWORD dwFlags)
+{
+    UNIMPLEMENTED;
+    return E_NOTIMPL;
+}
+
+HRESULT WINAPI CActiveDesktop::SetWallpaper(PCWSTR pwszWallpaper, DWORD dwReserved)
+{
+    UNIMPLEMENTED;
+    return E_NOTIMPL;
+}
+
+HRESULT WINAPI CActiveDesktop::GetWallpaperOptions(LPWALLPAPEROPT pwpo, DWORD dwReserved)
+{
+    UNIMPLEMENTED;
+    return E_NOTIMPL;
+}
+
+HRESULT WINAPI CActiveDesktop::SetWallpaperOptions(LPCWALLPAPEROPT pwpo, DWORD dwReserved)
+{
+    UNIMPLEMENTED;
+    return E_NOTIMPL;
+}
+
+HRESULT WINAPI CActiveDesktop::GetPattern(PWSTR pwszPattern, UINT cchPattern, DWORD dwReserved)
+{
+    UNIMPLEMENTED;
+    return E_NOTIMPL;
+}
+
+HRESULT WINAPI CActiveDesktop::SetPattern(PCWSTR pwszPattern, DWORD dwReserved)
+{
+    UNIMPLEMENTED;
+    return E_NOTIMPL;
+}
+
+HRESULT WINAPI CActiveDesktop::GetDesktopItemOptions(LPCOMPONENTSOPT pco, DWORD dwReserved)
+{
+    UNIMPLEMENTED;
+    return E_NOTIMPL;
+}
+
+HRESULT WINAPI CActiveDesktop::SetDesktopItemOptions(LPCCOMPONENTSOPT pco, DWORD dwReserved)
+{
+    UNIMPLEMENTED;
+    return E_NOTIMPL;
+}
+
+HRESULT WINAPI CActiveDesktop::AddDesktopItem(LPCCOMPONENT pcomp, DWORD dwReserved)
+{
+    UNIMPLEMENTED;
+    return E_NOTIMPL;
+}
+
+HRESULT WINAPI CActiveDesktop::AddDesktopItemWithUI(HWND hwnd, LPCOMPONENT pcomp, DWORD dwReserved)
+{
+    UNIMPLEMENTED;
+    return E_NOTIMPL;
+}
+
+HRESULT WINAPI CActiveDesktop::ModifyDesktopItem(LPCCOMPONENT pcomp, DWORD dwFlags)
+{
+    UNIMPLEMENTED;
+    return E_NOTIMPL;
+}
+
+HRESULT WINAPI CActiveDesktop::RemoveDesktopItem(LPCCOMPONENT pcomp, DWORD dwReserved)
+{
+    UNIMPLEMENTED;
+    return E_NOTIMPL;
+}
+
+HRESULT WINAPI CActiveDesktop::GetDesktopItemCount(int *pcItems, DWORD dwReserved)
+{
+    UNIMPLEMENTED;
+    return E_NOTIMPL;
+}
+
+HRESULT WINAPI CActiveDesktop::GetDesktopItem(int nComponent, LPCOMPONENT pcomp, DWORD dwReserved)
+{
+    UNIMPLEMENTED;
+    return E_NOTIMPL;
+}
+
+HRESULT WINAPI CActiveDesktop::GetDesktopItemByID(ULONG_PTR dwID, LPCOMPONENT pcomp, DWORD dwReserved)
+{
+    UNIMPLEMENTED;
+    return E_NOTIMPL;
+}
+
+HRESULT WINAPI CActiveDesktop::GenerateDesktopItemHtml(PCWSTR pwszFileName, LPCOMPONENT pcomp, DWORD dwReserved)
+{
+    UNIMPLEMENTED;
+    return E_NOTIMPL;
+}
+
+HRESULT WINAPI CActiveDesktop::AddUrl(HWND hwnd, PCWSTR pszSource, LPCOMPONENT pcomp, DWORD dwFlags)
+{
+    UNIMPLEMENTED;
+    return E_NOTIMPL;
+}
+
+HRESULT WINAPI CActiveDesktop::GetDesktopItemBySource(PCWSTR pwszSource, LPCOMPONENT pcomp, DWORD dwReserved)
+{
+    UNIMPLEMENTED;
+    return E_NOTIMPL;
+}
+
+
+/***********************************************************************
+*   IPropertyBag implementation
+*/
+
+HRESULT WINAPI CActiveDesktop::Read(LPCOLESTR pszPropName, VARIANT *pVar, IErrorLog *pErrorLog)
+{
+    UNIMPLEMENTED;
+    return E_NOTIMPL;
+}
+
+HRESULT WINAPI CActiveDesktop::Write(LPCOLESTR pszPropName, VARIANT *pVar)
+{
+    UNIMPLEMENTED;
+    return E_NOTIMPL;
+}
+
diff --git a/dll/win32/shell32/CActiveDesktop.h b/dll/win32/shell32/CActiveDesktop.h
new file mode 100644 (file)
index 0000000..d11f751
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * PROJECT:     shell32
+ * LICENSE:     LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
+ * PURPOSE:     IActiveDesktop header
+ * COPYRIGHT:   Copyright 2018 Mark Jansen (mark.jansen@reactos.org)
+ */
+
+#ifndef _CACTIVEDESKTOP_H_
+#define _CACTIVEDESKTOP_H_
+
+#undef AddDesktopItem
+
+class CActiveDesktop :
+    public CComCoClass<CActiveDesktop, &CLSID_ActiveDesktop>,
+    public CComObjectRootEx<CComMultiThreadModelNoCS>,
+    public IActiveDesktop,
+    //public IActiveDesktopP,
+    //public IADesktopP2,
+    public IPropertyBag
+{
+public:
+    CActiveDesktop();
+    virtual ~CActiveDesktop();
+
+    /*** IActiveDesktop methods ***/
+    virtual HRESULT WINAPI ApplyChanges(DWORD dwFlags);
+    virtual HRESULT WINAPI GetWallpaper(PWSTR pwszWallpaper, UINT cchWallpaper, DWORD dwFlags);
+    virtual HRESULT WINAPI SetWallpaper(PCWSTR pwszWallpaper, DWORD dwReserved);
+    virtual HRESULT WINAPI GetWallpaperOptions(LPWALLPAPEROPT pwpo, DWORD dwReserved);
+    virtual HRESULT WINAPI SetWallpaperOptions(LPCWALLPAPEROPT pwpo, DWORD dwReserved);
+    virtual HRESULT WINAPI GetPattern(PWSTR pwszPattern, UINT cchPattern, DWORD dwReserved);
+    virtual HRESULT WINAPI SetPattern(PCWSTR pwszPattern, DWORD dwReserved);
+    virtual HRESULT WINAPI GetDesktopItemOptions(LPCOMPONENTSOPT pco, DWORD dwReserved);
+    virtual HRESULT WINAPI SetDesktopItemOptions(LPCCOMPONENTSOPT pco, DWORD dwReserved);
+    virtual HRESULT WINAPI AddDesktopItem(LPCCOMPONENT pcomp, DWORD dwReserved);
+    virtual HRESULT WINAPI AddDesktopItemWithUI(HWND hwnd, LPCOMPONENT pcomp, DWORD dwReserved);
+    virtual HRESULT WINAPI ModifyDesktopItem(LPCCOMPONENT pcomp, DWORD dwFlags);
+    virtual HRESULT WINAPI RemoveDesktopItem(LPCCOMPONENT pcomp, DWORD dwReserved);
+    virtual HRESULT WINAPI GetDesktopItemCount(int *pcItems, DWORD dwReserved);
+    virtual HRESULT WINAPI GetDesktopItem(int nComponent, LPCOMPONENT pcomp, DWORD dwReserved);
+    virtual HRESULT WINAPI GetDesktopItemByID(ULONG_PTR dwID, LPCOMPONENT pcomp, DWORD dwReserved);
+    virtual HRESULT WINAPI GenerateDesktopItemHtml(PCWSTR pwszFileName, LPCOMPONENT pcomp, DWORD dwReserved);
+    virtual HRESULT WINAPI AddUrl(HWND hwnd, PCWSTR pszSource, LPCOMPONENT pcomp, DWORD dwFlags);
+    virtual HRESULT WINAPI GetDesktopItemBySource(PCWSTR pwszSource, LPCOMPONENT pcomp, DWORD dwReserved);
+
+    /*** IPropertyBag methods ***/
+    virtual HRESULT STDMETHODCALLTYPE Read(LPCOLESTR pszPropName, VARIANT *pVar, IErrorLog *pErrorLog);
+    virtual HRESULT STDMETHODCALLTYPE Write(LPCOLESTR pszPropName, VARIANT *pVar);
+
+
+DECLARE_REGISTRY_RESOURCEID(IDR_ACTIVEDESKTOP)
+DECLARE_NOT_AGGREGATABLE(CActiveDesktop)
+
+DECLARE_PROTECT_FINAL_CONSTRUCT()
+
+BEGIN_COM_MAP(CActiveDesktop)
+    COM_INTERFACE_ENTRY_IID(IID_IActiveDesktop, IActiveDesktop)
+    //COM_INTERFACE_ENTRY_IID(IID_IActiveDesktopP, IActiveDesktopP)
+    //COM_INTERFACE_ENTRY_IID(IID_IADesktopP2, IADesktopP2)
+    COM_INTERFACE_ENTRY_IID(IID_IPropertyBag, IPropertyBag)
+END_COM_MAP()
+};
+
+
+#endif // _CACTIVEDESKTOP_H_
index c5d247a..08933dd 100644 (file)
@@ -25,6 +25,8 @@ include_directories(
     ${REACTOS_SOURCE_DIR})
 
 list(APPEND SOURCE
+    CActiveDesktop.cpp
+    CActiveDesktop.h
     CIDLDataObj.cpp
     CQueryAssociations.cpp
     debughlp.cpp
index 4e694f7..62aad90 100644 (file)
@@ -20,6 +20,7 @@
 #include <userenv.h>
 
 #include <shlwapi.h>
+#include <wininet.h>
 #include <shlobj.h>
 #include <shobjidl.h>
 #include <ndk/rtlfuncs.h>
@@ -54,6 +55,7 @@
 #include "wine/shell32_main.h"
 #include "shresdef.h"
 #include "wine/cpanel.h"
+#include "CActiveDesktop.h"
 #include "CEnumIDListBase.h"
 #include "shfldr.h"
 #include "CShellItem.h"
diff --git a/dll/win32/shell32/res/rgs/activedesktop.rgs b/dll/win32/shell32/res/rgs/activedesktop.rgs
new file mode 100644 (file)
index 0000000..1f80872
--- /dev/null
@@ -0,0 +1,13 @@
+HKCR
+{
+       NoRemove CLSID
+       {
+               ForceRemove {75048700-EF1F-11D0-9888-006097DEACF9} = s 'ActiveDesktop'
+               {
+                       InprocServer32 = s '%MODULE%'
+                       {
+                               val ThreadingModel = s 'Apartment'
+                       }
+               }
+       }
+}
index 67e072d..c50480d 100644 (file)
@@ -28,3 +28,4 @@ IDR_MERGEDFOLDER REGISTRY "res/rgs/mergedfolder.rgs"
 IDR_REBARBANDSITE REGISTRY "res/rgs/rebarbandsite.rgs"
 IDR_USERNOTIFICATION REGISTRY "res/rgs/usernotification.rgs"
 IDR_SHELL REGISTRY "res/rgs/shell.rgs"
+IDR_ACTIVEDESKTOP REGISTRY "res/rgs/activedesktop.rgs"
index a1d11c2..d75dccd 100644 (file)
@@ -271,6 +271,7 @@ public:
 
 
 BEGIN_OBJECT_MAP(ObjectMap)
+    OBJECT_ENTRY(CLSID_ActiveDesktop, CActiveDesktop)
     OBJECT_ENTRY(CLSID_ShellFSFolder, CFSFolder)
     OBJECT_ENTRY(CLSID_MyComputer, CDrivesFolder)
     OBJECT_ENTRY(CLSID_ShellDesktop, CDesktopFolder)
index 037d1fc..2fa3e09 100644 (file)
 #define IDR_REBARBANDSITE       154
 #define IDR_USERNOTIFICATION    155
 #define IDR_SHELL               156
+#define IDR_ACTIVEDESKTOP       157