[BROWSEUI][PSDK] Stubplement ShellTaskScheduler (#3326)

Required by MS Picture and Fax Viewer (shimgvw.dll).
Now it starts properly without replacing any other system files.

CORE-17337
This commit is contained in:
Oleg Dubinskiy 2020-10-27 19:25:36 +02:00 committed by Stanislav Motylkov
parent 1f5e0f3fa7
commit d5132f5ce3
No known key found for this signature in database
GPG key ID: AFE513258CBA9E92
9 changed files with 97 additions and 0 deletions

View file

@ -18,6 +18,8 @@ list(APPEND SOURCE
browseui.cpp
browseuiord.cpp
CAutoComplete.cpp
CShellTaskScheduler.cpp
CShellTaskScheduler.h
CTaskbarList.cpp
CTaskbarList.h
commonbrowser.cpp

View file

@ -0,0 +1,41 @@
/*
* PROJECT: ReactOS browseui
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
* PURPOSE: IShellTaskScheduler implementation
* COPYRIGHT: Copyright 2020 Oleg Dubinskiy (oleg.dubinskij2013@yandex.ua)
*/
#include "precomp.h"
CShellTaskScheduler::CShellTaskScheduler()
{
}
CShellTaskScheduler::~CShellTaskScheduler()
{
}
// *** IShellTaskScheduler methods ***
STDMETHODIMP CShellTaskScheduler::AddTask(IRunnableTask *pTask, REFGUID rtoid, DWORD_PTR lParam, DWORD dwPriority)
{
TRACE("(%p, %u, %d, %d)\n", this, pTask, rtoid, lParam, dwPriority);
return E_NOTIMPL;
}
STDMETHODIMP CShellTaskScheduler::RemoveTasks(REFGUID rtoid, DWORD_PTR lParam, BOOL fWaitIfRunning)
{
TRACE("(%u, %d, %d)\n", this, rtoid, lParam, fWaitIfRunning);
return E_NOTIMPL;
}
UINT STDMETHODCALLTYPE CShellTaskScheduler::CountTasks(REFGUID rtoid)
{
TRACE("(%u)\n", this, rtoid);
return E_NOTIMPL;
}
STDMETHODIMP CShellTaskScheduler::Status(DWORD dwReleaseStatus, DWORD dwThreadTimeout)
{
TRACE("(%d, %d)\n", this, dwReleaseStatus, dwThreadTimeout);
return E_NOTIMPL;
}

View file

@ -0,0 +1,36 @@
/*
* PROJECT: ReactOS browseui
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
* PURPOSE: IShellTaskScheduler implementation
* COPYRIGHT: Copyright 2020 Oleg Dubinskiy (oleg.dubinskij2013@yandex.ua)
*/
#pragma once
class CShellTaskScheduler :
public CComCoClass<CShellTaskScheduler, &CLSID_ShellTaskScheduler>,
public CComObjectRootEx<CComMultiThreadModelNoCS>,
public IShellTaskScheduler
{
private:
public:
CShellTaskScheduler();
~CShellTaskScheduler();
// *** IShellTaskScheduler methods ***
STDMETHODIMP AddTask(IRunnableTask *pTask, REFGUID rtoid, DWORD_PTR lParam, DWORD dwPriority);
STDMETHODIMP RemoveTasks(REFGUID rtoid, DWORD_PTR lParam, BOOL fWaitIfRunning);
virtual UINT STDMETHODCALLTYPE CountTasks(REFGUID rtoid);
STDMETHODIMP Status(DWORD dwReleaseStatus, DWORD dwThreadTimeout);
public:
DECLARE_REGISTRY_RESOURCEID(IDR_SHELLTASKSCHEDULER)
DECLARE_NOT_AGGREGATABLE(CShellTaskScheduler)
DECLARE_PROTECT_FINAL_CONSTRUCT()
BEGIN_COM_MAP(CShellTaskScheduler)
COM_INTERFACE_ENTRY_IID(IID_IShellTaskScheduler, IShellTaskScheduler)
END_COM_MAP()
};

View file

@ -150,6 +150,7 @@ OBJECT_ENTRY(CLSID_CCommonBrowser, CCommonBrowser)
OBJECT_ENTRY(CLSID_GlobalFolderSettings, CGlobalFolderSettings)
OBJECT_ENTRY(CLSID_InternetToolbar, CInternetToolbar)
OBJECT_ENTRY(CLSID_CRegTreeOptions, CRegTreeOptions)
OBJECT_ENTRY(CLSID_ShellTaskScheduler, CShellTaskScheduler)
OBJECT_ENTRY(CLSID_TaskbarList, CTaskbarList)
OBJECT_ENTRY(CLSID_ExplorerBand, CExplorerBand)
OBJECT_ENTRY(CLSID_FileSearchBand, CSearchBar)

View file

@ -41,6 +41,7 @@ IDR_COMMONBROWSER REGISTRY "res/commonbrowser.rgs"
IDR_GLOBALFOLDERSETTINGS REGISTRY "res/globalfoldersettings.rgs"
IDR_INTERNETTOOLBAR REGISTRY "res/internettoolbar.rgs"
IDR_REGTREEOPTIONS REGISTRY "res/regtreeoptions.rgs"
IDR_SHELLTASKSCHEDULER REGISTRY "res/shelltaskscheduler.rgs"
IDR_EXPLORERBAND REGISTRY "res/explorerband.rgs"
IDR_PROGRESSDIALOG REGISTRY "res/progressdialog.rgs"
IDR_AUTOCOMPLETE REGISTRY "res/autocomplete.rgs"

View file

@ -54,6 +54,7 @@
#include "commonbrowser.h"
#include "globalfoldersettings.h"
#include "regtreeoptions.h"
#include "CShellTaskScheduler.h"
#include "CTaskbarList.h"
#include "explorerband.h"
#include "CProgressDialog.h"

View file

@ -0,0 +1,13 @@
HKCR
{
NoRemove CLSID
{
ForceRemove {603D3800-BD81-11d0-A3A5-00C04FD706EC} = s 'Background Task Scheduler'
{
InprocServer32 = s '%MODULE%'
{
val ThreadingModel = s 'Apartment'
}
}
}
}

View file

@ -108,6 +108,7 @@
#define IDR_FILESEARCHBAND 146
#define IDR_FINDFOLDER 147
#define IDR_USERASSIST 148
#define IDR_SHELLTASKSCHEDULER 149
#define IDS_SMALLICONS 12301
#define IDS_LARGEICONS 12302

View file

@ -105,6 +105,7 @@ DEFINE_GUID(CLSID_ACLMRU, 0x6756a641, 0xde71, 0x11d0, 0x83, 0x1b, 0x00,
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_GUID(CLSID_ShellTaskScheduler, 0x603d3800, 0xbd81, 0x11d0, 0xa3, 0xa5, 0x00, 0xc0, 0x4f, 0xd7, 0x06, 0xec);
#define SID_SInternetExplorer IID_IWebBrowserApp
#define SID_SWebBrowserApp IID_IWebBrowserApp