https://git.reactos.org/?p=reactos.git;a=commitdiff;h=cc2f0a8868ed4b1825604…
commit cc2f0a8868ed4b182560459bfca4738e148f56c8
Author: Mark Jansen <mark.jansen(a)reactos.org>
AuthorDate: Sun Dec 9 16:11:14 2018 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Wed Dec 12 19:29:09 2018 +0100
[SHELL32] Add IActiveDesktop stub
CORE-15424
---
dll/win32/shell32/CActiveDesktop.cpp | 156 ++++++++++++++++++++++++++++
dll/win32/shell32/CActiveDesktop.h | 65 ++++++++++++
dll/win32/shell32/CMakeLists.txt | 2 +
dll/win32/shell32/precomp.h | 2 +
dll/win32/shell32/res/rgs/activedesktop.rgs | 13 +++
dll/win32/shell32/rgs_res.rc | 1 +
dll/win32/shell32/shell32.cpp | 1 +
dll/win32/shell32/shresdef.h | 1 +
8 files changed, 241 insertions(+)
diff --git a/dll/win32/shell32/CActiveDesktop.cpp b/dll/win32/shell32/CActiveDesktop.cpp
new file mode 100644
index 0000000000..abc47e3e15
--- /dev/null
+++ b/dll/win32/shell32/CActiveDesktop.cpp
@@ -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(a)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
index 0000000000..d11f751b26
--- /dev/null
+++ b/dll/win32/shell32/CActiveDesktop.h
@@ -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(a)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_
diff --git a/dll/win32/shell32/CMakeLists.txt b/dll/win32/shell32/CMakeLists.txt
index c5d247abba..08933dda35 100644
--- a/dll/win32/shell32/CMakeLists.txt
+++ b/dll/win32/shell32/CMakeLists.txt
@@ -25,6 +25,8 @@ include_directories(
${REACTOS_SOURCE_DIR})
list(APPEND SOURCE
+ CActiveDesktop.cpp
+ CActiveDesktop.h
CIDLDataObj.cpp
CQueryAssociations.cpp
debughlp.cpp
diff --git a/dll/win32/shell32/precomp.h b/dll/win32/shell32/precomp.h
index 4e694f7b86..62aad907b1 100644
--- a/dll/win32/shell32/precomp.h
+++ b/dll/win32/shell32/precomp.h
@@ -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
index 0000000000..1f80872c5c
--- /dev/null
+++ b/dll/win32/shell32/res/rgs/activedesktop.rgs
@@ -0,0 +1,13 @@
+HKCR
+{
+ NoRemove CLSID
+ {
+ ForceRemove {75048700-EF1F-11D0-9888-006097DEACF9} = s 'ActiveDesktop'
+ {
+ InprocServer32 = s '%MODULE%'
+ {
+ val ThreadingModel = s 'Apartment'
+ }
+ }
+ }
+}
diff --git a/dll/win32/shell32/rgs_res.rc b/dll/win32/shell32/rgs_res.rc
index 67e072d530..c50480d3fd 100644
--- a/dll/win32/shell32/rgs_res.rc
+++ b/dll/win32/shell32/rgs_res.rc
@@ -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"
diff --git a/dll/win32/shell32/shell32.cpp b/dll/win32/shell32/shell32.cpp
index a1d11c27ff..d75dccd596 100644
--- a/dll/win32/shell32/shell32.cpp
+++ b/dll/win32/shell32/shell32.cpp
@@ -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)
diff --git a/dll/win32/shell32/shresdef.h b/dll/win32/shell32/shresdef.h
index 037d1fc0be..2fa3e090f1 100644
--- a/dll/win32/shell32/shresdef.h
+++ b/dll/win32/shell32/shresdef.h
@@ -804,3 +804,4 @@
#define IDR_REBARBANDSITE 154
#define IDR_USERNOTIFICATION 155
#define IDR_SHELL 156
+#define IDR_ACTIVEDESKTOP 157