https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1f5e0f3fa7967d759ad88…
commit 1f5e0f3fa7967d759ad885487a59cb21a847704e
Author: Oleg Dubinskiy <oleg.dubinskij2013(a)yandex.ua>
AuthorDate: Wed Oct 21 17:46:09 2020 +0300
Commit: Stanislav Motylkov <x86corez(a)gmail.com>
CommitDate: Sun Dec 20 17:32:11 2020 +0300
[BROWSEUI][PSDK] Stubplement UserAssist
Initial implementation of `CUserAssist` class, which contains `IUserAssist`
interface.
See
https://www.geoffchappell.com/studies/windows/ie/browseui/classes/userassis….
Required by MS shell32.dll.
CORE-17345 CORE-17393
---
dll/win32/browseui/CMakeLists.txt | 4 +++-
dll/win32/browseui/CUserAssist.cpp | 42 +++++++++++++++++++++++++++++++++++
dll/win32/browseui/CUserAssist.h | 38 +++++++++++++++++++++++++++++++
dll/win32/browseui/browseui.cpp | 1 +
dll/win32/browseui/browseui.rc | 1 +
dll/win32/browseui/precomp.h | 1 +
dll/win32/browseui/res/userassist.rgs | 13 +++++++++++
dll/win32/browseui/resource.h | 1 +
sdk/include/psdk/shlguid.h | 2 ++
sdk/include/psdk/shobjidl.idl | 36 ++++++++++++++++++++++++++++++
10 files changed, 138 insertions(+), 1 deletion(-)
diff --git a/dll/win32/browseui/CMakeLists.txt b/dll/win32/browseui/CMakeLists.txt
index 8cb68cf9efa..eb7070d05ae 100644
--- a/dll/win32/browseui/CMakeLists.txt
+++ b/dll/win32/browseui/CMakeLists.txt
@@ -31,7 +31,9 @@ list(APPEND SOURCE
toolsband.cpp
travellog.cpp
utility.cpp
- CProgressDialog.cpp)
+ CProgressDialog.cpp
+ CUserAssist.cpp
+ CUserAssist.h)
list(APPEND PCH_SKIP_SOURCE
dllinstall.c)
diff --git a/dll/win32/browseui/CUserAssist.cpp b/dll/win32/browseui/CUserAssist.cpp
new file mode 100644
index 00000000000..54e6db7077d
--- /dev/null
+++ b/dll/win32/browseui/CUserAssist.cpp
@@ -0,0 +1,42 @@
+/*
+ * PROJECT: ReactOS browseui
+ * LICENSE: LGPL-2.1-or-later (
https://spdx.org/licenses/LGPL-2.1-or-later)
+ * PURPOSE: IUserAssist implementation
+ * COPYRIGHT: Copyright 2020 Oleg Dubinskiy (oleg.dubinskij2013(a)yandex.ua)
+ */
+// See
http://www.geoffchappell.com/studies/windows/ie/browseui/interfaces/iuseras…
+
+#include "precomp.h"
+
+CUserAssist::CUserAssist()
+{
+}
+
+CUserAssist::~CUserAssist()
+{
+}
+
+// *** IUserAssist methods ***
+STDMETHODIMP CUserAssist::FireEvent(GUID const *guid, INT param1, ULONG param2, WPARAM
wparam, LPARAM lparam)
+{
+ TRACE("(%u, %d, %d, %p, %p)\n", this, guid, param1, param2, wparam,
lparam);
+ return E_NOTIMPL;
+}
+
+STDMETHODIMP CUserAssist::QueryEvent(GUID const *guid, INT param, WPARAM wparam, LPARAM
lparam, PVOID ptr)
+{
+ TRACE("(%u, %d, %p, %p, %p)\n", this, guid, param, wparam, lparam, ptr);
+ return E_NOTIMPL;
+}
+
+STDMETHODIMP CUserAssist::SetEvent(GUID const *guid, INT param, WPARAM wparam, LPARAM
lparam, PVOID ptr)
+{
+ TRACE("(%u, %d, %p, %p, %p)\n", this, guid, param, wparam, lparam, ptr);
+ return E_NOTIMPL;
+}
+
+STDMETHODIMP CUserAssist::Enable(BOOL bEnable)
+{
+ TRACE("(%d)\n", this, bEnable);
+ return E_NOTIMPL;
+}
diff --git a/dll/win32/browseui/CUserAssist.h b/dll/win32/browseui/CUserAssist.h
new file mode 100644
index 00000000000..88bdf6985ae
--- /dev/null
+++ b/dll/win32/browseui/CUserAssist.h
@@ -0,0 +1,38 @@
+/*
+ * PROJECT: ReactOS browseui
+ * LICENSE: LGPL-2.1-or-later (
https://spdx.org/licenses/LGPL-2.1-or-later)
+ * PURPOSE: IUserAssist implementation
+ * COPYRIGHT: Copyright 2020 Oleg Dubinskiy (oleg.dubinskij2013(a)yandex.ua)
+ */
+// See
https://www.geoffchappell.com/studies/windows/ie/browseui/classes/userassis…
+
+#pragma once
+
+class CUserAssist :
+ public CComCoClass<CUserAssist, &CLSID_UserAssist>,
+ public CComObjectRootEx<CComMultiThreadModelNoCS>,
+ public IUserAssist
+{
+private:
+public:
+ CUserAssist();
+ ~CUserAssist();
+
+ // *** IUserAssist methods ***
+ STDMETHODIMP FireEvent(GUID const *guid, INT param1, ULONG param2, WPARAM wparam,
LPARAM lparam);
+ // FIXME: PVOID should point to undocumented UEMINFO structure.
+ STDMETHODIMP QueryEvent(GUID const *guid, INT param, WPARAM wparam, LPARAM lparam,
PVOID ptr);
+ STDMETHODIMP SetEvent(GUID const *guid, INT param, WPARAM wparam, LPARAM lparam,
PVOID ptr);
+ STDMETHODIMP Enable(BOOL bEnable);
+
+public:
+
+ DECLARE_REGISTRY_RESOURCEID(IDR_USERASSIST)
+ DECLARE_NOT_AGGREGATABLE(CUserAssist)
+
+ DECLARE_PROTECT_FINAL_CONSTRUCT()
+
+ BEGIN_COM_MAP(CUserAssist)
+ COM_INTERFACE_ENTRY_IID(IID_IUserAssist, IUserAssist)
+ END_COM_MAP()
+};
diff --git a/dll/win32/browseui/browseui.cpp b/dll/win32/browseui/browseui.cpp
index 8ae993dfa65..7051e248456 100644
--- a/dll/win32/browseui/browseui.cpp
+++ b/dll/win32/browseui/browseui.cpp
@@ -156,6 +156,7 @@ OBJECT_ENTRY(CLSID_FileSearchBand, CSearchBar)
OBJECT_ENTRY(CLSID_ProgressDialog, CProgressDialog)
OBJECT_ENTRY(CLSID_ISFBand, CISFBand)
OBJECT_ENTRY(CLSID_FindFolder, CFindFolder)
+OBJECT_ENTRY(CLSID_UserAssist, CUserAssist)
END_OBJECT_MAP()
CBrowseUIModule gModule;
diff --git a/dll/win32/browseui/browseui.rc b/dll/win32/browseui/browseui.rc
index 0d43f1c17af..4ff07550482 100644
--- a/dll/win32/browseui/browseui.rc
+++ b/dll/win32/browseui/browseui.rc
@@ -50,6 +50,7 @@ IDR_ACLCUSTOMMRU REGISTRY "res/custommru.rgs"
IDR_TASKBARLIST REGISTRY "res/taskbarlist.rgs"
IDR_FILESEARCHBAND REGISTRY "res/filesearchband.rgs"
IDR_FINDFOLDER REGISTRY "res/findfolder.rgs"
+IDR_USERASSIST REGISTRY "res/userassist.rgs"
#include <reactos/manifest_dll.rc>
diff --git a/dll/win32/browseui/precomp.h b/dll/win32/browseui/precomp.h
index f119847b6fa..27ce5443f45 100644
--- a/dll/win32/browseui/precomp.h
+++ b/dll/win32/browseui/precomp.h
@@ -57,6 +57,7 @@
#include "CTaskbarList.h"
#include "explorerband.h"
#include "CProgressDialog.h"
+#include "CUserAssist.h"
#include "browseui.h"
#include <stdio.h>
diff --git a/dll/win32/browseui/res/userassist.rgs
b/dll/win32/browseui/res/userassist.rgs
new file mode 100644
index 00000000000..eaede088787
--- /dev/null
+++ b/dll/win32/browseui/res/userassist.rgs
@@ -0,0 +1,13 @@
+HKCR
+{
+ NoRemove CLSID
+ {
+ ForceRemove {DD313E04-FEFF-11D1-8ECD-0000F87A470C} = s 'User assistance'
+ {
+ InprocServer32 = s '%MODULE%'
+ {
+ val ThreadingModel = s 'Both'
+ }
+ }
+ }
+}
diff --git a/dll/win32/browseui/resource.h b/dll/win32/browseui/resource.h
index 84269b677db..ecb6b0a603b 100644
--- a/dll/win32/browseui/resource.h
+++ b/dll/win32/browseui/resource.h
@@ -107,6 +107,7 @@
#define IDR_TASKBARLIST 145
#define IDR_FILESEARCHBAND 146
#define IDR_FINDFOLDER 147
+#define IDR_USERASSIST 148
#define IDS_SMALLICONS 12301
#define IDS_LARGEICONS 12302
diff --git a/sdk/include/psdk/shlguid.h b/sdk/include/psdk/shlguid.h
index 25937b08019..92720114bf3 100644
--- a/sdk/include/psdk/shlguid.h
+++ b/sdk/include/psdk/shlguid.h
@@ -104,6 +104,8 @@ DEFINE_GUID(CLSID_ACListISF, 0x03c036f1, 0xa186, 0x11d0, 0x82,
0x4a, 0x00,
DEFINE_GUID(CLSID_ACLMRU, 0x6756a641, 0xde71, 0x11d0, 0x83, 0x1b, 0x00, 0xaa,
0x00, 0x5b, 0x43, 0x83);
DEFINE_GUID(CLSID_ACLCustomMRU, 0x6935db93, 0x21e8, 0x4ccc, 0xbe, 0xb9, 0x9f, 0xe3,
0xc7, 0x7a, 0x29, 0x7a);
+DEFINE_GUID(CLSID_UserAssist, 0xdd313e04, 0xfeff, 0x11d1, 0x8e, 0xcd, 0x00, 0x00,
0xf8, 0x7a, 0x47, 0x0c);
+
#define SID_SInternetExplorer IID_IWebBrowserApp
#define SID_SWebBrowserApp IID_IWebBrowserApp
#define SID_SWebBrowserEventsService IID_IWebBrowserEventsService
diff --git a/sdk/include/psdk/shobjidl.idl b/sdk/include/psdk/shobjidl.idl
index 4d5d278dca0..cbb9892655c 100644
--- a/sdk/include/psdk/shobjidl.idl
+++ b/sdk/include/psdk/shobjidl.idl
@@ -4768,4 +4768,40 @@ interface IItemNameLimits : IUnknown
[out] int *piMaxNameLen);
};
+/*****************************************************************************
+ * IUserAssist interface
+ */
+[
+ uuid(dd313e05-feff-11d1-8ecd-0000f87a470c),
+ object,
+ local,
+ pointer_default(unique)
+]
+interface IUserAssist : IUnknown
+{
+ HRESULT FireEvent(
+ GUID const *guid,
+ INT param1,
+ ULONG param2,
+ WPARAM wparam,
+ LPARAM lparam);
+
+ HRESULT QueryEvent(
+ GUID const *guid,
+ INT param,
+ WPARAM wparam,
+ LPARAM lparam,
+ PVOID ptr);
+
+ HRESULT SetEvent(
+ GUID const *guid,
+ INT param,
+ WPARAM wparam,
+ LPARAM lparam,
+ PVOID ptr);
+
+ HRESULT Enable(
+ BOOL bEnable);
+};
+
#endif // __REACTOS__