[BROWSEUI][SHDOCVW] Move CExplorerBand to shdocvw (#7163)

CExplorerBand should be
implemented in shdocvw.dll.
894ad4f17d/modules/rostests/apitests/com/shdocvw.c (L37)
JIRA issue: CORE-19698
- Move CExplorerBand code
  from browseui to shdocvw.
- Delete IDS_FOLDERSLABEL
  resource string from browseui.
- Add IDS_FOLDERSLABEL
  resource string to shdocvw.
- Adapt code to these changes.
- Add sdk/include/reactos/
 shdocvw_undoc.h.
- Implement IEILIsEqual function.
This commit is contained in:
Katayama Hirofumi MZ 2024-08-02 04:12:02 +09:00 committed by GitHub
parent 766d04d937
commit 960a305e5c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
73 changed files with 523 additions and 319 deletions

View file

@ -25,7 +25,6 @@ list(APPEND SOURCE
CTaskbarList.h
commonbrowser.cpp
desktopipc.cpp
explorerband.cpp
globalfoldersettings.cpp
internettoolbar.cpp
parsecmdline.cpp
@ -34,7 +33,6 @@ list(APPEND SOURCE
shellbrowser.cpp
toolsband.cpp
travellog.cpp
utility.cpp
CProgressDialog.cpp
CUserAssist.cpp
CUserAssist.h)

View file

@ -153,7 +153,7 @@ 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_ExplorerBand, CExplorerBand) // Moved to shdocvw.dll
OBJECT_ENTRY(CLSID_FileSearchBand, CSearchBar)
OBJECT_ENTRY(CLSID_ProgressDialog, CProgressDialog)
OBJECT_ENTRY(CLSID_ISFBand, CISFBand)

View file

@ -6,7 +6,7 @@
#define USE_CUSTOM_ADDRESSEDITBOX 1
#define USE_CUSTOM_BANDPROXY 1
#define USE_CUSTOM_BRANDBAND 1
#define USE_CUSTOM_EXPLORERBAND 1
#define USE_CUSTOM_EXPLORERBAND 0 // Moved to shdocvw.dll
#define USE_CUSTOM_SEARCHBAND 1
#define USE_CUSTOM_INTERNETTOOLBAR 1

View file

@ -43,7 +43,6 @@ 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"
IDR_ACLISTISF REGISTRY "res/shellautocomplete.rgs"

View file

@ -291,11 +291,6 @@ BEGIN
IDS_ADDRESSBANDLABEL "&Адрес"
END
STRINGTABLE
BEGIN
IDS_FOLDERSLABEL "Папки"
END
STRINGTABLE
BEGIN
IDS_ADDRESSMENUTEXT "&Адрес"

View file

@ -298,11 +298,6 @@ BEGIN
IDS_ADDRESSBANDLABEL "Adre&sse"
END
STRINGTABLE
BEGIN
IDS_FOLDERSLABEL "Ordner"
END
STRINGTABLE
BEGIN
IDS_ADDRESSMENUTEXT "&Address"

View file

@ -309,11 +309,6 @@ BEGIN
IDS_ADDRESSBANDLABEL "A&ddress"
END
STRINGTABLE
BEGIN
IDS_FOLDERSLABEL "Folders"
END
STRINGTABLE
BEGIN
IDS_ADDRESSMENUTEXT "&Address"

View file

@ -300,11 +300,6 @@ BEGIN
IDS_ADDRESSBANDLABEL "Dire&cción"
END
STRINGTABLE
BEGIN
IDS_FOLDERSLABEL "Carpetas"
END
STRINGTABLE
BEGIN
IDS_ADDRESSMENUTEXT "&Address"

View file

@ -298,11 +298,6 @@ BEGIN
IDS_ADDRESSBANDLABEL "Aa&dress"
END
STRINGTABLE
BEGIN
IDS_FOLDERSLABEL "Kaustad"
END
STRINGTABLE
BEGIN
IDS_ADDRESSMENUTEXT "&Address"

View file

@ -298,11 +298,6 @@ BEGIN
IDS_ADDRESSBANDLABEL "Dire&cción"
END
STRINGTABLE
BEGIN
IDS_FOLDERSLABEL "Carpetas"
END
STRINGTABLE
BEGIN
IDS_ADDRESSMENUTEXT "&Address"

View file

@ -309,11 +309,6 @@ BEGIN
IDS_ADDRESSBANDLABEL "A&dresse"
END
STRINGTABLE
BEGIN
IDS_FOLDERSLABEL "Dossiers"
END
STRINGTABLE
BEGIN
IDS_ADDRESSMENUTEXT "&Address"

View file

@ -293,11 +293,6 @@ BEGIN
IDS_ADDRESSBANDLABEL "&כתובת"
END
STRINGTABLE
BEGIN
IDS_FOLDERSLABEL "תיקיות"
END
STRINGTABLE
BEGIN
IDS_ADDRESSMENUTEXT "&Address"

View file

@ -291,11 +291,6 @@ BEGIN
IDS_ADDRESSBANDLABEL "&एड्रेस"
END
STRINGTABLE
BEGIN
IDS_FOLDERSLABEL "फ़ोल्डरों"
END
STRINGTABLE
BEGIN
IDS_ADDRESSMENUTEXT "&Address"

View file

@ -309,11 +309,6 @@ BEGIN
IDS_ADDRESSBANDLABEL "&Cím"
END
STRINGTABLE
BEGIN
IDS_FOLDERSLABEL "Mappák"
END
STRINGTABLE
BEGIN
IDS_ADDRESSMENUTEXT "&Cím"

View file

@ -310,11 +310,6 @@ BEGIN
IDS_ADDRESSBANDLABEL "A&lamat"
END
STRINGTABLE
BEGIN
IDS_FOLDERSLABEL "Folder"
END
STRINGTABLE
BEGIN
IDS_ADDRESSMENUTEXT "&Alamat"

View file

@ -291,11 +291,6 @@ BEGIN
IDS_ADDRESSBANDLABEL "Indirizzo"
END
STRINGTABLE
BEGIN
IDS_FOLDERSLABEL "Cartelle"
END
STRINGTABLE
BEGIN
IDS_ADDRESSMENUTEXT "&Indirizzo"

View file

@ -309,11 +309,6 @@ BEGIN
IDS_ADDRESSBANDLABEL "アドレス(&D)"
END
STRINGTABLE
BEGIN
IDS_FOLDERSLABEL "フォルダー"
END
STRINGTABLE
BEGIN
IDS_ADDRESSMENUTEXT "アドレス(&A)"

View file

@ -300,11 +300,6 @@ BEGIN
IDS_ADDRESSBANDLABEL "A&dres"
END
STRINGTABLE
BEGIN
IDS_FOLDERSLABEL "Foldery"
END
STRINGTABLE
BEGIN
IDS_ADDRESSMENUTEXT "&Adres"

View file

@ -293,11 +293,6 @@ BEGIN
IDS_ADDRESSBANDLABEL "E&ndereço"
END
STRINGTABLE
BEGIN
IDS_FOLDERSLABEL "Pastas"
END
STRINGTABLE
BEGIN
IDS_ADDRESSMENUTEXT "&Address"

View file

@ -293,11 +293,6 @@ BEGIN
IDS_ADDRESSBANDLABEL "E&ndereço"
END
STRINGTABLE
BEGIN
IDS_FOLDERSLABEL "Pastas"
END
STRINGTABLE
BEGIN
IDS_ADDRESSMENUTEXT "&Address"

View file

@ -299,11 +299,6 @@ BEGIN
IDS_ADDRESSBANDLABEL "A&dresă"
END
STRINGTABLE
BEGIN
IDS_FOLDERSLABEL "Foldere"
END
STRINGTABLE
BEGIN
IDS_ADDRESSMENUTEXT "&Adresă"

View file

@ -300,11 +300,6 @@ BEGIN
IDS_ADDRESSBANDLABEL "А&дрес"
END
STRINGTABLE
BEGIN
IDS_FOLDERSLABEL "Папки"
END
STRINGTABLE
BEGIN
IDS_ADDRESSMENUTEXT "&Адрес"

View file

@ -310,11 +310,6 @@ BEGIN
IDS_ADDRESSBANDLABEL "A&dresa"
END
STRINGTABLE
BEGIN
IDS_FOLDERSLABEL "Dosje"
END
STRINGTABLE
BEGIN
IDS_ADDRESSMENUTEXT "&Address"

View file

@ -293,11 +293,6 @@ BEGIN
IDS_ADDRESSBANDLABEL "A&dres"
END
STRINGTABLE
BEGIN
IDS_FOLDERSLABEL "Dizinler"
END
STRINGTABLE
BEGIN
IDS_ADDRESSMENUTEXT "&Address"

View file

@ -299,11 +299,6 @@ BEGIN
IDS_ADDRESSBANDLABEL "А&дреса"
END
STRINGTABLE
BEGIN
IDS_FOLDERSLABEL "Папки"
END
STRINGTABLE
BEGIN
IDS_ADDRESSMENUTEXT "&Address"

View file

@ -313,11 +313,6 @@ BEGIN
IDS_ADDRESSBANDLABEL "地址(&D)"
END
STRINGTABLE
BEGIN
IDS_FOLDERSLABEL "文件夹"
END
STRINGTABLE
BEGIN
IDS_ADDRESSMENUTEXT "地址(&A)"

View file

@ -315,11 +315,6 @@ BEGIN
IDS_ADDRESSBANDLABEL "網址(&D)"
END
STRINGTABLE
BEGIN
IDS_FOLDERSLABEL "資料夾"
END
STRINGTABLE
BEGIN
IDS_ADDRESSMENUTEXT "&Address"

View file

@ -58,7 +58,6 @@
#include "regtreeoptions.h"
#include "CShellTaskScheduler.h"
#include "CTaskbarList.h"
#include "explorerband.h"
#include "CProgressDialog.h"
#include "CUserAssist.h"
#include "browseui.h"

View file

@ -125,7 +125,6 @@
#define IDS_SEARCHLABEL 12897
#define IDS_STANDARD_TOOLBAR 12624
#define IDS_ADDRESSBANDLABEL 12902
#define IDS_FOLDERSLABEL 12919
#define IDS_ADDRESSMENUTEXT 13137
#define IDS_HISTORYTEXT 13169
#define IDS_UP 58434

View file

@ -1,8 +0,0 @@
#pragma once
void *operator new(size_t size);
void operator delete(void *p);
HRESULT SHELL_GetIDListFromObject(IUnknown *punk, PIDLIST_ABSOLUTE *ppidl);
BOOL SHELL_IsEqualAbsoluteID(PCIDLIST_ABSOLUTE a, PCIDLIST_ABSOLUTE b);
BOOL SHELL_IsVerb(IContextMenu *pcm, UINT_PTR idCmd, LPCWSTR Verb);

View file

@ -6,16 +6,12 @@
* Copyright 2020-2024 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
*/
#include "precomp.h"
#include "objects.h"
#include <commoncontrols.h>
#include <undocshell.h>
#include "utility.h"
#if 1
#undef UNIMPLEMENTED
#define UNIMPLEMENTED DbgPrint("%s is UNIMPLEMENTED!\n", __FUNCTION__)
#endif
#include <wine/debug.h>
WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
/*
* TODO:

View file

@ -5,47 +5,11 @@
* COPYRIGHT: Copyright 2024 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
*/
#include <windows.h>
#include <shlobj.h>
#include <shlwapi.h>
#include <atlbase.h>
#include <atlcom.h>
#include <atlwin.h>
#include <undocshell.h>
#include <shlobj_undoc.h>
#include <shlguid_undoc.h>
#include <shlwapi_undoc.h>
#include <shdeprecated.h>
#include <olectlid.h>
#include <exdispid.h>
#include <shellutils.h>
#include <ui/rosctrls.h>
#include "shdocvw.h"
#include "CFavBand.h"
#include "objects.h"
#include <wine/debug.h>
WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
void *operator new(size_t size)
{
return ::LocalAlloc(LPTR, size);
}
void operator delete(void *ptr)
{
::LocalFree(ptr);
}
void operator delete(void *ptr, size_t size)
{
::LocalFree(ptr);
}
#if 1
#undef UNIMPLEMENTED
#define UNIMPLEMENTED ERR("%s is UNIMPLEMENTED!\n", __FUNCTION__)
#endif
CFavBand::CFavBand()
: m_fVisible(FALSE)
, m_bFocused(FALSE)
@ -53,7 +17,7 @@ CFavBand::CFavBand()
, m_hToolbarImageList(NULL)
, m_hTreeViewImageList(NULL)
{
::InterlockedIncrement(&SHDOCVW_refCount);
SHDOCVW_LockModule();
SHGetSpecialFolderLocation(NULL, CSIDL_FAVORITES, &m_pidlFav);
}
@ -69,7 +33,7 @@ CFavBand::~CFavBand()
ImageList_Destroy(m_hTreeViewImageList);
m_hTreeViewImageList = NULL;
}
::InterlockedDecrement(&SHDOCVW_refCount);
SHDOCVW_UnlockModule();
}
VOID CFavBand::OnFinalMessage(HWND)
@ -615,44 +579,3 @@ STDMETHODIMP CFavBand::Invoke(
}
return E_INVALIDARG;
}
BEGIN_OBJECT_MAP(ObjectMap)
OBJECT_ENTRY(CLSID_SH_FavBand, CFavBand)
END_OBJECT_MAP()
class CFavBandModule : public CComModule
{
public:
};
static CFavBandModule gModule;
EXTERN_C VOID
CFavBand_Init(HINSTANCE hInstance)
{
gModule.Init(ObjectMap, hInstance, NULL);
}
EXTERN_C HRESULT
CFavBand_DllCanUnloadNow(VOID)
{
return gModule.DllCanUnloadNow();
}
EXTERN_C HRESULT
CFavBand_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
return gModule.DllGetClassObject(rclsid, riid, ppv);
}
EXTERN_C HRESULT
CFavBand_DllRegisterServer(VOID)
{
return gModule.DllRegisterServer(FALSE);
}
EXTERN_C HRESULT
CFavBand_DllUnregisterServer(VOID)
{
return gModule.DllUnregisterServer(FALSE);
}

View file

@ -7,12 +7,6 @@
#pragma once
EXTERN_C VOID CFavBand_Init(HINSTANCE hInstance);
EXTERN_C HRESULT CFavBand_DllCanUnloadNow(VOID);
EXTERN_C HRESULT CFavBand_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv);
EXTERN_C HRESULT CFavBand_DllRegisterServer(VOID);
EXTERN_C HRESULT CFavBand_DllUnregisterServer(VOID);
#define FAVBANDCLASSNAME L"ReactOS Favorites Band"
#ifdef __cplusplus

View file

@ -10,12 +10,11 @@ list(APPEND SOURCE
precomp.h
${CMAKE_CURRENT_BINARY_DIR}/shdocvw_stubs.c)
add_typelib(shdocvw_v1.idl)
add_typelib(res/shdocvw_v1.idl)
set_source_files_properties(shdocvw.rc PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/shdocvw_v1.tlb)
add_library(shdocvw MODULE
${SOURCE}
mrulist.cpp
shdocvw.rc
$<TARGET_OBJECTS:shdocvw_sublib>
${CMAKE_CURRENT_BINARY_DIR}/shdocvw.def)
@ -32,7 +31,12 @@ add_dependencies(shdocvw stdole2)
add_pch(shdocvw precomp.h SOURCE)
add_cd_file(TARGET shdocvw DESTINATION reactos/system32 FOR all)
add_library(shdocvw_sublib OBJECT CFavBand.cpp)
add_library(shdocvw_sublib OBJECT
CExplorerBand.cpp
CFavBand.cpp
mrulist.cpp
objects.cpp
utility.cpp)
target_link_libraries(shdocvw_sublib PRIVATE atl_classes)
target_compile_definitions(shdocvw_sublib PRIVATE $<TARGET_PROPERTY:shdocvw,COMPILE_DEFINITIONS>)
target_compile_options(shdocvw_sublib PRIVATE $<TARGET_PROPERTY:shdocvw,COMPILE_OPTIONS>)

View file

@ -0,0 +1,9 @@
LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_ADD "Add..."
IDS_ORGANIZE "Organize..."
IDS_FOLDERSLABEL "Папки"
END

View file

@ -0,0 +1,9 @@
LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
IDS_ADD "Add..."
IDS_ORGANIZE "Organize..."
IDS_FOLDERSLABEL "Ordner"
END

View file

@ -3,6 +3,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
STRINGTABLE
BEGIN
IDS_ADD "Add"
IDS_ORGANIZE "Organize"
IDS_ADD "Add..."
IDS_ORGANIZE "Organize..."
IDS_FOLDERSLABEL "Folders"
END

View file

@ -0,0 +1,9 @@
LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
IDS_ADD "Add..."
IDS_ORGANIZE "Organize..."
IDS_FOLDERSLABEL "Carpetas"
END

View file

@ -0,0 +1,9 @@
LANGUAGE LANG_ESTONIAN, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_ADD "Add..."
IDS_ORGANIZE "Organize..."
IDS_FOLDERSLABEL "Kaustad"
END

View file

@ -0,0 +1,9 @@
LANGUAGE LANG_BASQUE, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
IDS_ADD "Add..."
IDS_ORGANIZE "Organize..."
IDS_FOLDERSLABEL "Carpetas"
END

View file

@ -0,0 +1,9 @@
LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
IDS_ADD "Add..."
IDS_ORGANIZE "Organize..."
IDS_FOLDERSLABEL "Dossiers"
END

View file

@ -0,0 +1,9 @@
LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_ADD "Add..."
IDS_ORGANIZE "Organize..."
IDS_FOLDERSLABEL "תיקיות"
END

View file

@ -0,0 +1,9 @@
LANGUAGE LANG_HINDI, SUBLANG_HINDI_INDIA
STRINGTABLE
BEGIN
IDS_ADD "Add..."
IDS_ORGANIZE "Organize..."
IDS_FOLDERSLABEL "फ़ोल्डरों"
END

View file

@ -0,0 +1,9 @@
LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_ADD "Add..."
IDS_ORGANIZE "Organize..."
IDS_FOLDERSLABEL "Mappák"
END

View file

@ -0,0 +1,9 @@
LANGUAGE LANG_INDONESIAN, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_ADD "Add..."
IDS_ORGANIZE "Organize..."
IDS_FOLDERSLABEL "Folder"
END

View file

@ -0,0 +1,9 @@
LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
IDS_ADD "Add..."
IDS_ORGANIZE "Organize..."
IDS_FOLDERSLABEL "Cartelle"
END

View file

@ -0,0 +1,9 @@
LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_ADD "追加..."
IDS_ORGANIZE "整理..."
IDS_FOLDERSLABEL "フォルダー"
END

View file

@ -0,0 +1,9 @@
LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_ADD "Add..."
IDS_ORGANIZE "Organize..."
IDS_FOLDERSLABEL "Foldery"
END

View file

@ -0,0 +1,9 @@
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN
STRINGTABLE
BEGIN
IDS_ADD "Add..."
IDS_ORGANIZE "Organize..."
IDS_FOLDERSLABEL "Pastas"
END

View file

@ -0,0 +1,9 @@
LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
IDS_ADD "Add..."
IDS_ORGANIZE "Organize..."
IDS_FOLDERSLABEL "Pastas"
END

View file

@ -0,0 +1,9 @@
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
IDS_ADD "Add..."
IDS_ORGANIZE "Organize..."
IDS_FOLDERSLABEL "Foldere"
END

View file

@ -0,0 +1,9 @@
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_ADD "Add..."
IDS_ORGANIZE "Organize..."
IDS_FOLDERSLABEL "Папки"
END

View file

@ -0,0 +1,9 @@
LANGUAGE LANG_ALBANIAN, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
IDS_ADD "Add..."
IDS_ORGANIZE "Organize..."
IDS_FOLDERSLABEL "Dosje"
END

View file

@ -0,0 +1,9 @@
LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_ADD "Add..."
IDS_ORGANIZE "Organize..."
IDS_FOLDERSLABEL "Dizinler"
END

View file

@ -0,0 +1,9 @@
LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_ADD "Add..."
IDS_ORGANIZE "Organize..."
IDS_FOLDERSLABEL "Папки"
END

View file

@ -0,0 +1,9 @@
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
STRINGTABLE
BEGIN
IDS_ADD "Add..."
IDS_ORGANIZE "Organize..."
IDS_FOLDERSLABEL "文件夹"
END

View file

@ -0,0 +1,9 @@
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL
STRINGTABLE
BEGIN
IDS_ADD "Add..."
IDS_ORGANIZE "Organize..."
IDS_FOLDERSLABEL "資料夾"
END

View file

@ -7,21 +7,11 @@
#define COBJMACROS
#include <windef.h>
#include <winbase.h>
#include <winreg.h>
#include <objbase.h>
#include <oleauto.h>
#include <shlobj.h>
#include <shlobj_undoc.h>
#include <shlguid_undoc.h>
#include <shlwapi.h>
#include <shlwapi_undoc.h>
#include "objects.h"
#include <tchar.h>
#include <strsafe.h>
#include "shdocvw.h"
#include <wine/debug.h>
WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
class CSafeMutex;
@ -32,22 +22,6 @@ class CMruBase;
class CMruPidlList;
class CMruClassFactory;
extern "C" void __cxa_pure_virtual(void)
{
ERR("__cxa_pure_virtual\n");
::DebugBreak();
}
BOOL IEILIsEqual(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2, BOOL bUnknown)
{
UINT cb1 = ILGetSize(pidl1), cb2 = ILGetSize(pidl2);
if (cb1 == cb2 && memcmp(pidl1, pidl2, cb1) == 0)
return TRUE;
FIXME("%p, %p\n", pidl1, pidl2);
return FALSE;
}
// The flags for SLOTITEMDATA.dwFlags
#define SLOT_LOADED 0x1
#define SLOT_SET 0x2
@ -155,7 +129,7 @@ public:
CMruBase::CMruBase()
{
::InterlockedIncrement(&SHDOCVW_refCount);
SHDOCVW_LockModule();
}
CMruBase::~CMruBase()
@ -176,7 +150,7 @@ CMruBase::~CMruBase()
m_pSlots = (SLOTITEMDATA*)::LocalFree(m_pSlots);
}
::InterlockedDecrement(&SHDOCVW_refCount);
SHDOCVW_UnlockModule();
}
STDMETHODIMP CMruBase::QueryInterface(REFIID riid, void **ppvObj)
@ -1321,11 +1295,11 @@ protected:
public:
CMruClassFactory()
{
::InterlockedIncrement(&SHDOCVW_refCount);
SHDOCVW_LockModule();
}
virtual ~CMruClassFactory()
{
::InterlockedDecrement(&SHDOCVW_refCount);
SHDOCVW_UnlockModule();
}
// IUnknown methods
@ -1389,9 +1363,9 @@ STDMETHODIMP CMruClassFactory::CreateInstance(IUnknown *pUnkOuter, REFIID riid,
STDMETHODIMP CMruClassFactory::LockServer(BOOL fLock)
{
if (fLock)
::InterlockedIncrement(&SHDOCVW_refCount);
SHDOCVW_LockModule();
else
::InterlockedDecrement(&SHDOCVW_refCount);
SHDOCVW_UnlockModule();
return S_OK;
}

View file

@ -0,0 +1,99 @@
/*
* PROJECT: ReactOS Explorer
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
* PURPOSE: shdocvw.dll objects
* COPYRIGHT: Copyright 2024 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
*/
#include "objects.h"
#include <wine/debug.h>
WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
void *operator new(size_t size)
{
return ::LocalAlloc(LMEM_FIXED, size);
}
void operator delete(void *ptr)
{
::LocalFree(ptr);
}
void operator delete(void *ptr, size_t size)
{
::LocalFree(ptr);
}
EXTERN_C void __cxa_pure_virtual(void)
{
ERR("__cxa_pure_virtual\n");
::DebugBreak();
}
BEGIN_OBJECT_MAP(ObjectMap)
OBJECT_ENTRY(CLSID_SH_FavBand, CFavBand)
OBJECT_ENTRY(CLSID_ExplorerBand, CExplorerBand)
END_OBJECT_MAP()
class SHDOCVW_Module : public CComModule
{
public:
};
static SHDOCVW_Module gModule;
EXTERN_C VOID
SHDOCVW_Init(HINSTANCE hInstance)
{
gModule.Init(ObjectMap, hInstance, NULL);
}
EXTERN_C HRESULT
SHDOCVW_DllCanUnloadNow(VOID)
{
return gModule.DllCanUnloadNow();
}
EXTERN_C HRESULT CMruLongList_CreateInstance(DWORD_PTR dwUnused1, void **ppv, DWORD_PTR dwUnused3);
EXTERN_C HRESULT CMruPidlList_CreateInstance(DWORD_PTR dwUnused1, void **ppv, DWORD_PTR dwUnused3);
EXTERN_C HRESULT CMruClassFactory_CreateInstance(REFIID riid, void **ppv);
EXTERN_C HRESULT
SHDOCVW_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
HRESULT hr = gModule.DllGetClassObject(rclsid, riid, ppv);
if (SUCCEEDED(hr))
return hr;
if (IsEqualGUID(riid, IID_IClassFactory) || IsEqualGUID(riid, IID_IUnknown))
{
if (IsEqualGUID(rclsid, CLSID_MruLongList) ||
IsEqualGUID(rclsid, CLSID_MruPidlList))
{
return CMruClassFactory_CreateInstance(riid, ppv);
}
}
else if (IsEqualGUID(riid, IID_IMruDataList))
{
return CMruLongList_CreateInstance(0, ppv, 0);
}
else if (IsEqualGUID(riid, IID_IMruPidlList))
{
return CMruPidlList_CreateInstance(0, ppv, 0);
}
return CLASS_E_CLASSNOTAVAILABLE;
}
EXTERN_C HRESULT
SHDOCVW_DllRegisterServer(VOID)
{
return gModule.DllRegisterServer(FALSE);
}
EXTERN_C HRESULT
SHDOCVW_DllUnregisterServer(VOID)
{
return gModule.DllUnregisterServer(FALSE);
}

View file

@ -0,0 +1,42 @@
/*
* PROJECT: ReactOS Explorer
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
* PURPOSE: shdocvw.dll objects
* COPYRIGHT: Copyright 2024 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
*/
#pragma once
#include <windows.h>
#include <shlobj.h>
#include <shlwapi.h>
#include <olectlid.h>
#include <exdispid.h>
#include "shdocvw.h"
#ifdef __cplusplus
#include <atlbase.h>
#include <atlcom.h>
#include <atlwin.h>
#include <undocshell.h>
#include <shlobj_undoc.h>
#include <shlguid_undoc.h>
#include <shlwapi_undoc.h>
#include <shdocvw_undoc.h>
#include <shdeprecated.h>
#include <shellutils.h>
#include <ui/rosctrls.h>
#include "CExplorerBand.h"
#include "CFavBand.h"
#include "utility.h"
void *operator new(size_t size);
void operator delete(void *ptr);
void operator delete(void *ptr, size_t size);
EXTERN_C void __cxa_pure_virtual(void);
#endif /* def C++ */
EXTERN_C VOID SHDOCVW_Init(HINSTANCE hInstance);
EXTERN_C HRESULT SHDOCVW_DllCanUnloadNow(VOID);
EXTERN_C HRESULT SHDOCVW_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv);
EXTERN_C HRESULT SHDOCVW_DllRegisterServer(VOID);
EXTERN_C HRESULT SHDOCVW_DllUnregisterServer(VOID);

View file

@ -1,5 +1,6 @@
#define IDR_SHDOCVW 1
#define IDR_FAVBAND 2
#define IDR_EXPLORERBAND 3
#define IDR_TYPELIB 1
#define IDW_TOOLBAR 2
@ -8,5 +9,6 @@
#define ID_ADD 100
#define ID_ORGANIZE 101
#define IDS_ADD 1000
#define IDS_ORGANIZE 1001
#define IDS_ADD 1000
#define IDS_ORGANIZE 1001
#define IDS_FOLDERSLABEL 1002

View file

@ -61,15 +61,8 @@ static inline void SHDOCVW_UnlockModule(void) { InterlockedDecrement( &SHDOCVW_r
#ifdef __REACTOS__
#include "resource.h"
EXTERN_C HRESULT CMruLongList_CreateInstance(DWORD_PTR dwUnused1, void **ppv, DWORD_PTR dwUnused3);
EXTERN_C HRESULT CMruPidlList_CreateInstance(DWORD_PTR dwUnused1, void **ppv, DWORD_PTR dwUnused3);
EXTERN_C HRESULT CMruClassFactory_CreateInstance(REFIID riid, void **ppv);
#include "objects.h"
#define ARRAY_SIZE(array) _countof(array)
#ifdef __cplusplus
void *operator new(size_t size);
void operator delete(void *ptr);
void operator delete(void *ptr, size_t size);
#endif
EXTERN_C HINSTANCE instance;
#endif // def __REACTOS__

View file

@ -19,10 +19,9 @@
#include "windef.h"
#include "resource.h"
IDR_SHDOCVW WINE_REGISTRY "shdocvw_v1.rgs"
IDR_FAVBAND REGISTRY "favband.rgs"
IDR_SHDOCVW WINE_REGISTRY "res/shdocvw_v1.rgs"
IDR_FAVBAND REGISTRY "res/favband.rgs"
IDR_EXPLORERBAND REGISTRY "res/explorerband.rgs"
IDR_TYPELIB TYPELIB "shdocvw_v1.tlb"
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
@ -40,6 +39,72 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
/* UTF-8 */
#pragma code_page(65001)
#ifdef LANGUAGE_BG_BG
#include "lang/bg-BG.rc"
#endif
#ifdef LANGUAGE_DE_DE
#include "lang/de-DE.rc"
#endif
#ifdef LANGUAGE_EN_US
#include "lang/en-US.rc"
#endif
#ifdef LANGUAGE_ES_ES
#include "lang/es-ES.rc"
#endif
#ifdef LANGUAGE_ET_EE
#include "lang/et-EE.rc"
#endif
#ifdef LANGUAGE_EU_ES
#include "lang/eu-ES.rc"
#endif
#ifdef LANGUAGE_FR_FR
#include "lang/fr-FR.rc"
#endif
#ifdef LANGUAGE_HE_IL
#include "lang/he-IL.rc"
#endif
#ifdef LANGUAGE_HI_IN
#include "lang/hi-IN.rc"
#endif
#ifdef LANGUAGE_HU_HU
#include "lang/hu-HU.rc"
#endif
#ifdef LANGUAGE_ID_ID
#include "lang/id-ID.rc"
#endif
#ifdef LANGUAGE_IT_IT
#include "lang/it-IT.rc"
#endif
#ifdef LANGUAGE_JA_JP
#include "lang/ja-JP.rc"
#endif
#ifdef LANGUAGE_PL_PL
#include "lang/pl-PL.rc"
#endif
#ifdef LANGUAGE_PT_BR
#include "lang/pt-BR.rc"
#endif
#ifdef LANGUAGE_PT_PT
#include "lang/pt-PT.rc"
#endif
#ifdef LANGUAGE_RO_RO
#include "lang/ro-RO.rc"
#endif
#ifdef LANGUAGE_RU_RU
#include "lang/ru-RU.rc"
#endif
#ifdef LANGUAGE_SQ_AL
#include "lang/sq-AL.rc"
#endif
#ifdef LANGUAGE_TR_TR
#include "lang/tr-TR.rc"
#endif
#ifdef LANGUAGE_UK_UA
#include "lang/uk-UA.rc"
#endif
#ifdef LANGUAGE_ZH_CN
#include "lang/zh-CN.rc"
#endif
#ifdef LANGUAGE_PL_PL
#include "lang/zh-TW.rc"
#endif

View file

@ -111,7 +111,7 @@
216 stub -noname GetDefaultInternetSearchUrlW
217 stub -noname GetDefaultInternetSearchUrlA
218 stdcall -noname IEParseDisplayNameWithBCW(long wstr ptr ptr)
219 stub -noname IEILIsEqual
219 stdcall -noname IEILIsEqual(ptr ptr long)
221 stub -noname IECreateFromPathCPWithBCA
222 stub -noname IECreateFromPathCPWithBCW
223 stub -noname ResetWebSettings # FIXME: Inspect

View file

@ -32,7 +32,7 @@
#include "winnls.h"
#include <shlguid_undoc.h>
#include <rpcproxy.h> /* for __wine_register_resources / __wine_unregister_resources */
#include "CFavBand.h"
#include "objects.h"
#endif
#include "shlwapi.h"
#include "wininet.h"
@ -95,26 +95,10 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv)
#ifdef __REACTOS__
{
HRESULT hr = CFavBand_DllGetClassObject(rclsid, riid, ppv);
if (hr != CLASS_E_CLASSNOTAVAILABLE)
HRESULT hr = SHDOCVW_DllGetClassObject(rclsid, riid, ppv);
if (SUCCEEDED(hr))
return hr;
}
if (IsEqualGUID(riid, &IID_IClassFactory) || IsEqualGUID(riid, &IID_IUnknown))
{
if (IsEqualGUID(rclsid, &CLSID_MruLongList) ||
IsEqualGUID(rclsid, &CLSID_MruPidlList))
{
return CMruClassFactory_CreateInstance(riid, ppv);
}
}
else if (IsEqualGUID(riid, &IID_IMruDataList))
{
return CMruLongList_CreateInstance(0, ppv, 0);
}
else if (IsEqualGUID(riid, &IID_IMruPidlList))
{
return CMruPidlList_CreateInstance(0, ppv, 0);
}
#endif
/* As a last resort, figure if the CLSID belongs to a 'Shell Instance Object' */
@ -128,7 +112,7 @@ HRESULT WINAPI DllRegisterServer(void)
{
TRACE("\n");
#ifdef __REACTOS__
CFavBand_DllRegisterServer();
SHDOCVW_DllRegisterServer();
return __wine_register_resources(instance);
#else
return S_OK;
@ -142,7 +126,7 @@ HRESULT WINAPI DllUnregisterServer(void)
{
TRACE("\n");
#ifdef __REACTOS__
CFavBand_DllUnregisterServer();
SHDOCVW_DllUnregisterServer();
return __wine_unregister_resources(instance);
#else
return S_OK;
@ -189,7 +173,7 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD fdwReason, LPVOID fImpLoad)
case DLL_PROCESS_ATTACH:
#ifdef __REACTOS__
instance = hinst;
CFavBand_Init(hinst);
SHDOCVW_Init(hinst);
#endif
DisableThreadLibraryCalls(hinst);
break;
@ -208,7 +192,7 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD fdwReason, LPVOID fImpLoad)
HRESULT WINAPI DllCanUnloadNow(void)
{
#ifdef __REACTOS__
if (CFavBand_DllCanUnloadNow() != S_OK)
if (SHDOCVW_DllCanUnloadNow() != S_OK)
return S_FALSE;
#endif
return SHDOCVW_refCount ? S_FALSE : S_OK;

View file

@ -1,24 +1,21 @@
#include "precomp.h"
/*
* PROJECT: ReactOS Explorer
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
* PURPOSE: Utility for shdocvw.dll
* COPYRIGHT: Copyright 2024 Whindmar Saksit <whindsaks@proton.me>
*/
#include "objects.h"
#include <wine/debug.h>
WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
#ifndef SHCIDS_CANONICALONLY
#define SHCIDS_CANONICALONLY 0x10000000L
#endif
void *operator new(size_t size)
{
return LocalAlloc(LMEM_ZEROINIT, size);
}
void operator delete(void *p)
{
LocalFree(p);
}
void operator delete(void *p, UINT_PTR)
{
LocalFree(p);
}
HRESULT SHELL_GetIDListFromObject(IUnknown *punk, PIDLIST_ABSOLUTE *ppidl)
EXTERN_C HRESULT
SHELL_GetIDListFromObject(IUnknown *punk, PIDLIST_ABSOLUTE *ppidl)
{
#if DLL_EXPORT_VERSION >= _WIN32_WINNT_VISTA && 0 // FIXME: SHELL32 not ready yet
return SHGetIDListFromObject(punk, ppidl);
@ -51,12 +48,14 @@ static HRESULT SHELL_CompareAbsoluteIDs(LPARAM lParam, PCIDLIST_ABSOLUTE a, PCID
return hr;
}
BOOL SHELL_IsEqualAbsoluteID(PCIDLIST_ABSOLUTE a, PCIDLIST_ABSOLUTE b)
EXTERN_C BOOL
SHELL_IsEqualAbsoluteID(PCIDLIST_ABSOLUTE a, PCIDLIST_ABSOLUTE b)
{
return !SHELL_CompareAbsoluteIDs(SHCIDS_CANONICALONLY, a, b);
}
BOOL SHELL_IsVerb(IContextMenu *pcm, UINT_PTR idCmd, LPCWSTR Verb)
EXTERN_C BOOL
SHELL_IsVerb(IContextMenu *pcm, UINT_PTR idCmd, LPCWSTR Verb)
{
HRESULT hr;
WCHAR wide[MAX_PATH];
@ -71,3 +70,26 @@ BOOL SHELL_IsVerb(IContextMenu *pcm, UINT_PTR idCmd, LPCWSTR Verb)
}
return FALSE;
}
EXTERN_C BOOL
_ILIsDesktop(LPCITEMIDLIST pidl)
{
return (pidl == NULL || pidl->mkid.cb == 0);
}
/*************************************************************************
* IEILIsEqual [SHDOCVW.219]
*/
EXTERN_C BOOL WINAPI
IEILIsEqual(
_In_ LPCITEMIDLIST pidl1,
_In_ LPCITEMIDLIST pidl2,
_In_ BOOL bUnknown)
{
UINT cb1 = ILGetSize(pidl1), cb2 = ILGetSize(pidl2);
if (cb1 == cb2 && memcmp(pidl1, pidl2, cb1) == 0)
return TRUE;
FIXME("%p, %p\n", pidl1, pidl2);
return FALSE;
}

View file

@ -0,0 +1,13 @@
/*
* PROJECT: ReactOS Explorer
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
* PURPOSE: Utility for shdocvw.dll
* COPYRIGHT: Copyright 2024 Whindmar Saksit <whindsaks@proton.me>
*/
#pragma once
EXTERN_C HRESULT SHELL_GetIDListFromObject(IUnknown *punk, PIDLIST_ABSOLUTE *ppidl);
EXTERN_C BOOL SHELL_IsEqualAbsoluteID(PCIDLIST_ABSOLUTE a, PCIDLIST_ABSOLUTE b);
EXTERN_C BOOL SHELL_IsVerb(IContextMenu *pcm, UINT_PTR idCmd, LPCWSTR Verb);
EXTERN_C BOOL _ILIsDesktop(LPCITEMIDLIST pidl);

View file

@ -0,0 +1,22 @@
/*
* PROJECT: ReactOS Headers
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
* PURPOSE: shdocvw.dll undocumented APIs
* COPYRIGHT: Copyright 2024 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
*/
#pragma once
#ifdef __cplusplus
extern "C" {
#endif /* defined(__cplusplus) */
BOOL WINAPI
IEILIsEqual(
_In_ LPCITEMIDLIST pidl1,
_In_ LPCITEMIDLIST pidl2,
_In_ BOOL bUnknown);
#ifdef __cplusplus
} /* extern "C" */
#endif /* defined(__cplusplus) */