2008-08-26 15:50:23 +00:00
|
|
|
#ifndef _PRECOMP_H__
|
|
|
|
#define _PRECOMP_H__
|
|
|
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <assert.h>
|
|
|
|
|
|
|
|
#define COBJMACROS
|
|
|
|
#define WIN32_NO_STATUS
|
2013-01-24 23:00:42 +00:00
|
|
|
#define _INC_WINDOWS
|
|
|
|
#define COM_NO_WINDOWS_H
|
2008-08-26 15:50:23 +00:00
|
|
|
#define NTOS_MODE_USER
|
|
|
|
|
2013-01-24 23:00:42 +00:00
|
|
|
#include <windef.h>
|
|
|
|
#include <winbase.h>
|
|
|
|
#include <winreg.h>
|
|
|
|
#include <winuser.h>
|
2013-05-04 20:43:16 +00:00
|
|
|
#include <wincon.h>
|
2013-01-24 23:00:42 +00:00
|
|
|
#include <commdlg.h>
|
|
|
|
#include <ddeml.h>
|
2018-07-08 14:32:42 +00:00
|
|
|
#include <userenv.h>
|
2018-02-04 17:02:41 +00:00
|
|
|
|
2008-08-26 15:50:23 +00:00
|
|
|
#include <shlwapi.h>
|
2018-12-09 15:11:14 +00:00
|
|
|
#include <wininet.h>
|
2008-08-26 15:50:23 +00:00
|
|
|
#include <shlobj.h>
|
2015-11-30 11:17:26 +00:00
|
|
|
#include <shobjidl.h>
|
2011-08-19 17:45:34 +00:00
|
|
|
#include <ndk/rtlfuncs.h>
|
2008-08-26 15:50:23 +00:00
|
|
|
#include <fmifs/fmifs.h>
|
2011-05-15 15:55:49 +00:00
|
|
|
#include <tchar.h>
|
2011-11-28 21:54:45 +00:00
|
|
|
#include <strsafe.h>
|
2011-05-15 15:55:49 +00:00
|
|
|
#include <atlbase.h>
|
|
|
|
#include <atlcom.h>
|
2015-08-19 11:17:08 +00:00
|
|
|
#include <atlwin.h>
|
2016-08-10 18:56:48 +00:00
|
|
|
#include <atlstr.h>
|
2018-05-30 15:22:31 +00:00
|
|
|
#include <atlsimpcoll.h>
|
2021-12-17 04:01:03 +00:00
|
|
|
#include <atlcoll.h>
|
2014-09-29 20:14:21 +00:00
|
|
|
#include <powrprof.h>
|
[SHELL32]
Time to (re)act!
Step 2/2: continue Giannis' UNC hack in Shell32:
- Implement the ILCreateFromNetworkPlaceW() helper, which is just Giannis' code to allow creating a hacky PIDL for enumeration.
- Implement the CNetFolderEnum class, which allows enumerating network places. So far, it's pretty basic (no tree structure) but, it does its job. It would be to improve
- Implement the CNetFolder::EnumObjects() function.
This commit, in itself, more or less obsoletes hackssign application. Indeed, now, you just need to go to your network places, to be able to browse your network shares (like VMware or VBox shares) provided you installed the VMware/VBox additions in your VM.
However, hackssign will remains in rosapps for now: we don't have any other way to assign a drive letter to a network place so far, and VMware doesn't provide such feature.
Furthermore, this is a big hack. And until we have a correct implementation, we can keep another hack along ;-).
Feel free to decently enjoy your network shares in ReactOS :-).
CORE-10032
ROSAPPS-303
svn path=/trunk/; revision=70671
2016-02-01 22:07:55 +00:00
|
|
|
#include <winnetwk.h>
|
2016-04-08 08:30:09 +00:00
|
|
|
#include <objsafe.h>
|
2024-06-04 16:37:19 +00:00
|
|
|
#include <regstr.h>
|
2014-11-27 20:27:19 +00:00
|
|
|
|
|
|
|
#include <comctl32_undoc.h>
|
|
|
|
#include <shlguid_undoc.h>
|
|
|
|
#include <shlobj_undoc.h>
|
2024-05-24 22:54:53 +00:00
|
|
|
|
|
|
|
#define SHLWAPI_ISHELLFOLDER_HELPERS
|
2014-11-27 20:27:19 +00:00
|
|
|
#include <shlwapi_undoc.h>
|
2018-02-04 17:02:41 +00:00
|
|
|
|
|
|
|
#include <shellapi.h>
|
|
|
|
#undef ShellExecute
|
2014-10-20 21:09:55 +00:00
|
|
|
#include <undocshell.h>
|
2018-02-04 17:02:41 +00:00
|
|
|
|
[SHELL32][SHLWAPI] Forward shell32.ShellMessageBoxW directly to shlwapi.ShellMessageBoxWrapW. (#3179)
This makes ShellMessageBoxW use the correct implementation where the
text buffer size is dynamic, instead of having a too small hardcoded
size.
Fixes CORE-17271.
See also PR #3172 by Kyle Katarn, supplemented with some ideas from
Mark Jansen.
However we cannot straightforwardly implement ShellMessageBoxA around
ShellMessageBoxW, by converting some parameters from ANSI to UNICODE,
because there may be some variadic ANSI strings, associated with '%s'
printf-like formatters inside the format string, that would also need
to be converted; however there is no way for us to find these and perform
the conversion ourselves.
Therefore, we re-implement ShellMessageBoxA by doing a copy-paste ANSI
adaptation of the shlwapi.ShellMessageBoxWrapW function.
Note that, on Vista+ onwards, shlwapi implements both ShellMessageBoxA/W,
and shell32 directly forwards these exports to shlwapi, thus avoiding
these workarounds.
[PSDK] Explicily use WINAPIV for the variadic ShellMessageBoxA/W functions.
[INCLUDE/REACTOS] Add ShellMessageBoxWrapW in shlwapi_undoc.h .
2020-09-13 16:21:29 +00:00
|
|
|
/*
|
|
|
|
* For versions < Vista+, redefine ShellMessageBoxW to ShellMessageBoxWrapW
|
|
|
|
* (this is needed to avoid a linker error). On Vista+ onwards, shell32.ShellMessageBoxW
|
|
|
|
* redirects to shlwapi.ShellMessageBoxW so the #define should not be needed.
|
|
|
|
*
|
|
|
|
* However our shell32 is built with _WIN32_WINNT set to 0x600 (Vista+),
|
|
|
|
* yet its exports (especially regarding ShellMessageBoxA/W) are Win2003
|
|
|
|
* compatible. So the #define is still needed, and the check be disabled.
|
|
|
|
*/
|
|
|
|
// #if (_WIN32_WINNT < 0x0600)
|
|
|
|
#define ShellMessageBoxW ShellMessageBoxWrapW
|
|
|
|
// #endif
|
|
|
|
|
2014-11-27 20:27:19 +00:00
|
|
|
#include <browseui_undoc.h>
|
|
|
|
|
|
|
|
#include <shellutils.h>
|
2011-05-15 15:55:49 +00:00
|
|
|
|
2016-05-03 14:36:04 +00:00
|
|
|
#include "shellrecyclebin/recyclebin.h"
|
2014-11-03 19:50:36 +00:00
|
|
|
#include "wine/pidl.h"
|
2008-08-26 15:50:23 +00:00
|
|
|
#include "debughlp.h"
|
2014-11-03 12:17:30 +00:00
|
|
|
#include "wine/shell32_main.h"
|
2008-08-26 15:50:23 +00:00
|
|
|
#include "shresdef.h"
|
2015-08-28 10:36:35 +00:00
|
|
|
#include "wine/cpanel.h"
|
2018-12-09 15:11:14 +00:00
|
|
|
#include "CActiveDesktop.h"
|
2014-11-04 13:28:57 +00:00
|
|
|
#include "CEnumIDListBase.h"
|
2008-08-26 15:50:23 +00:00
|
|
|
#include "shfldr.h"
|
2014-11-04 13:28:57 +00:00
|
|
|
#include "CShellItem.h"
|
|
|
|
#include "CShellLink.h"
|
2016-04-08 08:30:09 +00:00
|
|
|
#include "CFolderItemVerbs.h"
|
|
|
|
#include "CFolderItems.h"
|
|
|
|
#include "CFolder.h"
|
2016-05-31 17:40:44 +00:00
|
|
|
#include "CShellDispatch.h"
|
2014-11-04 13:28:57 +00:00
|
|
|
#include "CDropTargetHelper.h"
|
2016-04-23 23:05:07 +00:00
|
|
|
#include "CFolderOptions.h"
|
2014-11-04 13:28:57 +00:00
|
|
|
#include "folders/CFSFolder.h"
|
|
|
|
#include "folders/CDrivesFolder.h"
|
|
|
|
#include "folders/CDesktopFolder.h"
|
|
|
|
#include "folders/CControlPanelFolder.h"
|
|
|
|
#include "folders/CMyDocsFolder.h"
|
|
|
|
#include "folders/CNetFolder.h"
|
|
|
|
#include "folders/CFontsFolder.h"
|
|
|
|
#include "folders/CPrinterFolder.h"
|
|
|
|
#include "folders/CAdminToolsFolder.h"
|
|
|
|
#include "folders/CRecycleBin.h"
|
2014-03-15 13:59:22 +00:00
|
|
|
#include "droptargets/CexeDropHandler.h"
|
2016-08-12 11:35:24 +00:00
|
|
|
#include "droptargets/CFSDropTarget.h"
|
2014-11-04 13:28:57 +00:00
|
|
|
#include "COpenWithMenu.h"
|
|
|
|
#include "CNewMenu.h"
|
2019-11-08 23:08:40 +00:00
|
|
|
#include "CSendToMenu.h"
|
2023-11-04 12:56:15 +00:00
|
|
|
#include "CCopyMoveToMenu.h"
|
2024-04-09 05:28:26 +00:00
|
|
|
#include "CCopyAsPathMenu.h"
|
2015-08-19 16:26:16 +00:00
|
|
|
#include "dialogs/filedefext.h"
|
|
|
|
#include "dialogs/drvdefext.h"
|
2015-03-28 23:27:10 +00:00
|
|
|
#include "CQueryAssociations.h"
|
2015-08-19 11:17:08 +00:00
|
|
|
#include "shellmenu/CMenuBand.h"
|
|
|
|
#include "shellmenu/CMenuDeskBar.h"
|
|
|
|
#include "shellmenu/CMenuSite.h"
|
|
|
|
#include "shellmenu/CMergedFolder.h"
|
|
|
|
#include "shellmenu/shellmenu.h"
|
2018-02-07 01:20:26 +00:00
|
|
|
#include "CUserNotification.h"
|
2018-06-06 12:04:50 +00:00
|
|
|
#include "dialogs/folder_options.h"
|
2020-04-13 01:36:24 +00:00
|
|
|
#include "shelldesktop/CChangeNotifyServer.h"
|
2011-08-19 17:45:34 +00:00
|
|
|
|
2013-01-24 23:00:42 +00:00
|
|
|
#include <wine/debug.h>
|
2014-01-25 17:24:24 +00:00
|
|
|
#include <wine/unicode.h>
|
2008-08-26 15:50:23 +00:00
|
|
|
|
|
|
|
extern const GUID CLSID_AdminFolderShortcut;
|
|
|
|
extern const GUID CLSID_FontsFolderShortcut;
|
|
|
|
extern const GUID CLSID_StartMenu;
|
2009-09-22 18:30:39 +00:00
|
|
|
extern const GUID CLSID_MenuBandSite;
|
2008-08-26 15:50:23 +00:00
|
|
|
extern const GUID CLSID_OpenWith;
|
|
|
|
extern const GUID CLSID_UnixFolder;
|
|
|
|
extern const GUID CLSID_UnixDosFolder;
|
|
|
|
extern const GUID SHELL32_AdvtShortcutProduct;
|
|
|
|
extern const GUID SHELL32_AdvtShortcutComponent;
|
|
|
|
|
2017-12-25 12:22:03 +00:00
|
|
|
#define MAX_PROPERTY_SHEET_PAGE 32
|
|
|
|
|
|
|
|
extern inline
|
|
|
|
BOOL
|
|
|
|
CALLBACK
|
|
|
|
AddPropSheetPageCallback(HPROPSHEETPAGE hPage, LPARAM lParam)
|
|
|
|
{
|
|
|
|
PROPSHEETHEADERW *pHeader = (PROPSHEETHEADERW *)lParam;
|
|
|
|
|
|
|
|
if (pHeader->nPages < MAX_PROPERTY_SHEET_PAGE)
|
|
|
|
{
|
|
|
|
pHeader->phpage[pHeader->nPages++] = hPage;
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2024-05-09 17:52:05 +00:00
|
|
|
HRESULT
|
|
|
|
SHELL32_ShowPropertiesDialog(IDataObject *pdtobj);
|
|
|
|
HRESULT
|
|
|
|
SHELL32_DefaultContextMenuCallBack(IShellFolder *psf, IDataObject *pdo, UINT msg);
|
2024-05-30 15:53:44 +00:00
|
|
|
UINT
|
|
|
|
MapVerbToDfmCmd(_In_ LPCSTR verba);
|
|
|
|
UINT
|
|
|
|
GetDfmCmd(_In_ IContextMenu *pCM, _In_ LPCSTR verba);
|
2024-05-09 17:52:05 +00:00
|
|
|
#define SHELL_ExecuteControlPanelCPL(hwnd, cpl) SHRunControlPanel((cpl), (hwnd))
|
2018-07-08 15:01:12 +00:00
|
|
|
|
2019-11-20 01:00:26 +00:00
|
|
|
// CStubWindow32 --- The owner window of file property sheets.
|
|
|
|
// This window hides taskbar button of property sheet.
|
|
|
|
class CStubWindow32 : public CWindowImpl<CStubWindow32>
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
DECLARE_WND_CLASS_EX(_T("StubWindow32"), 0, COLOR_WINDOWTEXT)
|
|
|
|
|
|
|
|
BEGIN_MSG_MAP(CStubWindow32)
|
|
|
|
END_MSG_MAP()
|
|
|
|
};
|
|
|
|
|
[SHELL32][SDK] Fix ParseDisplayName Part 1 (#6721)
JIRA issue: CORE-19495
- Implement SHParseDisplayName and
CDesktopFolder::ParseDisplayName.
- Add CStubFolderBase, CShellUrlStub, CFileUrlStub,
CIDListUrlStub, and CHttpUrlStub helper classes.
- Add SHGetSpecialFolderID and
Shell_ParseSpecialFolder helper functions.
- Add BindCtx_ContainsObject,
BindCtx_GetUIWindow,
BindCtx_RegisterObjectParam, SHBindToObject,
SHBindToObjectEx, SHCoInitializeAnyApartment,
SHGetAttributes, SHGetNameAndFlagsW,
SHIsFileSysBindCtx, SHSkipJunctionBinding,
Shell_DisplayNameOf, and Shell_FailForceReturn
helper functions.
- Modify CSIDL data.
2024-04-10 00:32:13 +00:00
|
|
|
HRESULT
|
|
|
|
Shell_TranslateIDListAlias(
|
|
|
|
_In_ LPCITEMIDLIST pidl,
|
|
|
|
_In_ HANDLE hToken,
|
|
|
|
_Out_ LPITEMIDLIST *ppidlAlias,
|
|
|
|
_In_ DWORD dwFlags);
|
|
|
|
|
|
|
|
BOOL BindCtx_ContainsObject(_In_ IBindCtx *pBindCtx, _In_ LPCWSTR pszName);
|
2024-04-13 12:07:12 +00:00
|
|
|
DWORD BindCtx_GetMode(_In_ IBindCtx *pbc, _In_ DWORD dwDefault);
|
[SHELL32][SDK] Fix ParseDisplayName Part 1 (#6721)
JIRA issue: CORE-19495
- Implement SHParseDisplayName and
CDesktopFolder::ParseDisplayName.
- Add CStubFolderBase, CShellUrlStub, CFileUrlStub,
CIDListUrlStub, and CHttpUrlStub helper classes.
- Add SHGetSpecialFolderID and
Shell_ParseSpecialFolder helper functions.
- Add BindCtx_ContainsObject,
BindCtx_GetUIWindow,
BindCtx_RegisterObjectParam, SHBindToObject,
SHBindToObjectEx, SHCoInitializeAnyApartment,
SHGetAttributes, SHGetNameAndFlagsW,
SHIsFileSysBindCtx, SHSkipJunctionBinding,
Shell_DisplayNameOf, and Shell_FailForceReturn
helper functions.
- Modify CSIDL data.
2024-04-10 00:32:13 +00:00
|
|
|
BOOL SHSkipJunctionBinding(_In_ IBindCtx *pbc, _In_ CLSID *pclsid);
|
2024-04-13 12:07:12 +00:00
|
|
|
HRESULT SHIsFileSysBindCtx(_In_ IBindCtx *pBindCtx, _Out_opt_ WIN32_FIND_DATAW *pFindData);
|
[SHELL32][SDK] Fix ParseDisplayName Part 1 (#6721)
JIRA issue: CORE-19495
- Implement SHParseDisplayName and
CDesktopFolder::ParseDisplayName.
- Add CStubFolderBase, CShellUrlStub, CFileUrlStub,
CIDListUrlStub, and CHttpUrlStub helper classes.
- Add SHGetSpecialFolderID and
Shell_ParseSpecialFolder helper functions.
- Add BindCtx_ContainsObject,
BindCtx_GetUIWindow,
BindCtx_RegisterObjectParam, SHBindToObject,
SHBindToObjectEx, SHCoInitializeAnyApartment,
SHGetAttributes, SHGetNameAndFlagsW,
SHIsFileSysBindCtx, SHSkipJunctionBinding,
Shell_DisplayNameOf, and Shell_FailForceReturn
helper functions.
- Modify CSIDL data.
2024-04-10 00:32:13 +00:00
|
|
|
BOOL Shell_FailForceReturn(_In_ HRESULT hr);
|
|
|
|
|
|
|
|
EXTERN_C INT
|
|
|
|
Shell_ParseSpecialFolder(_In_ LPCWSTR pszStart, _Out_ LPWSTR *ppch, _Out_ INT *pcch);
|
|
|
|
|
|
|
|
HRESULT
|
|
|
|
Shell_DisplayNameOf(
|
|
|
|
_In_ IShellFolder *psf,
|
|
|
|
_In_ LPCITEMIDLIST pidl,
|
|
|
|
_In_ DWORD dwFlags,
|
|
|
|
_Out_ LPWSTR pszBuf,
|
|
|
|
_In_ UINT cchBuf);
|
|
|
|
|
2024-05-21 19:09:18 +00:00
|
|
|
EXTERN_C
|
[SHELL32][SDK] Fix ParseDisplayName Part 1 (#6721)
JIRA issue: CORE-19495
- Implement SHParseDisplayName and
CDesktopFolder::ParseDisplayName.
- Add CStubFolderBase, CShellUrlStub, CFileUrlStub,
CIDListUrlStub, and CHttpUrlStub helper classes.
- Add SHGetSpecialFolderID and
Shell_ParseSpecialFolder helper functions.
- Add BindCtx_ContainsObject,
BindCtx_GetUIWindow,
BindCtx_RegisterObjectParam, SHBindToObject,
SHBindToObjectEx, SHCoInitializeAnyApartment,
SHGetAttributes, SHGetNameAndFlagsW,
SHIsFileSysBindCtx, SHSkipJunctionBinding,
Shell_DisplayNameOf, and Shell_FailForceReturn
helper functions.
- Modify CSIDL data.
2024-04-10 00:32:13 +00:00
|
|
|
HRESULT SHBindToObject(
|
|
|
|
_In_opt_ IShellFolder *psf,
|
|
|
|
_In_ LPCITEMIDLIST pidl,
|
|
|
|
_In_ REFIID riid,
|
|
|
|
_Out_ void **ppvObj);
|
|
|
|
|
|
|
|
HRESULT
|
|
|
|
SHBindToObjectEx(
|
|
|
|
_In_opt_ IShellFolder *pShellFolder,
|
|
|
|
_In_ LPCITEMIDLIST pidl,
|
|
|
|
_In_opt_ IBindCtx *pBindCtx,
|
|
|
|
_In_ REFIID riid,
|
|
|
|
_Out_ void **ppvObj);
|
|
|
|
|
|
|
|
DWORD
|
|
|
|
SHGetAttributes(_In_ IShellFolder *psf, _In_ LPCITEMIDLIST pidl, _In_ DWORD dwAttributes);
|
|
|
|
HRESULT SHCoInitializeAnyApartment(VOID);
|
|
|
|
|
|
|
|
HRESULT
|
|
|
|
SHGetNameAndFlagsW(
|
|
|
|
_In_ LPCITEMIDLIST pidl,
|
|
|
|
_In_ DWORD dwFlags,
|
|
|
|
_Out_opt_ LPWSTR pszText,
|
|
|
|
_In_ UINT cchBuf,
|
|
|
|
_Inout_opt_ DWORD *pdwAttributes);
|
|
|
|
|
|
|
|
EXTERN_C HWND BindCtx_GetUIWindow(_In_ IBindCtx *pBindCtx);
|
|
|
|
|
|
|
|
EXTERN_C HRESULT
|
|
|
|
BindCtx_RegisterObjectParam(
|
|
|
|
_In_ IBindCtx *pBindCtx,
|
|
|
|
_In_ LPOLESTR pszKey,
|
|
|
|
_In_opt_ IUnknown *punk,
|
|
|
|
_Out_ LPBC *ppbc);
|
|
|
|
|
2024-04-13 12:07:12 +00:00
|
|
|
BOOL PathIsDotOrDotDotW(_In_ LPCWSTR pszPath);
|
|
|
|
BOOL PathIsValidElement(_In_ LPCWSTR pszPath);
|
|
|
|
BOOL PathIsDosDevice(_In_ LPCWSTR pszName);
|
|
|
|
HRESULT SHILAppend(_Inout_ LPITEMIDLIST pidl, _Inout_ LPITEMIDLIST *ppidl);
|
|
|
|
|
2024-06-04 13:38:49 +00:00
|
|
|
EXTERN_C HRESULT
|
|
|
|
IUnknown_InitializeCommand(
|
|
|
|
_In_ IUnknown *pUnk,
|
|
|
|
_In_ PCWSTR pszCommandName,
|
|
|
|
_In_opt_ IPropertyBag *pPB);
|
|
|
|
EXTERN_C HRESULT
|
|
|
|
InvokeIExecuteCommand(
|
|
|
|
_In_ IExecuteCommand *pEC,
|
|
|
|
_In_ PCWSTR pszCommandName,
|
|
|
|
_In_opt_ IPropertyBag *pPB,
|
|
|
|
_In_opt_ IShellItemArray *pSIA,
|
|
|
|
_In_opt_ LPCMINVOKECOMMANDINFOEX pICI,
|
|
|
|
_In_opt_ IUnknown *pSite);
|
|
|
|
EXTERN_C HRESULT
|
|
|
|
InvokeIExecuteCommandWithDataObject(
|
|
|
|
_In_ IExecuteCommand *pEC,
|
|
|
|
_In_ PCWSTR pszCommandName,
|
|
|
|
_In_opt_ IPropertyBag *pPB,
|
|
|
|
_In_ IDataObject *pDO,
|
|
|
|
_In_opt_ LPCMINVOKECOMMANDINFOEX pICI,
|
|
|
|
_In_opt_ IUnknown *pSite);
|
|
|
|
|
2014-01-25 17:24:24 +00:00
|
|
|
#endif /* _PRECOMP_H__ */
|