ReactOS 0.4.15-dev-8222-g9164419
precomp.h
Go to the documentation of this file.
1#ifndef _PRECOMP_H__
2#define _PRECOMP_H__
3
4#include <stdarg.h>
5#include <assert.h>
6
7#define COBJMACROS
8#define WIN32_NO_STATUS
9#define _INC_WINDOWS
10#define COM_NO_WINDOWS_H
11#define NTOS_MODE_USER
12
13#include <windef.h>
14#include <winbase.h>
15#include <winreg.h>
16#include <winuser.h>
17#include <wincon.h>
18#include <commdlg.h>
19#include <ddeml.h>
20#include <userenv.h>
21
22#include <shlwapi.h>
23#include <wininet.h>
24#include <shlobj.h>
25#include <shobjidl.h>
26#include <ndk/rtlfuncs.h>
27#include <fmifs/fmifs.h>
28#include <tchar.h>
29#include <strsafe.h>
30#include <atlbase.h>
31#include <atlcom.h>
32#include <atlwin.h>
33#include <atlstr.h>
34#include <atlsimpcoll.h>
35#include <atlcoll.h>
36#include <powrprof.h>
37#include <winnetwk.h>
38#include <objsafe.h>
39#include <regstr.h>
40
41#include <comctl32_undoc.h>
42#include <shlguid_undoc.h>
43#include <shlobj_undoc.h>
44
45#define SHLWAPI_ISHELLFOLDER_HELPERS
46#include <shlwapi_undoc.h>
47
48#include <shellapi.h>
49#undef ShellExecute
50#include <undocshell.h>
51
52/*
53 * For versions < Vista+, redefine ShellMessageBoxW to ShellMessageBoxWrapW
54 * (this is needed to avoid a linker error). On Vista+ onwards, shell32.ShellMessageBoxW
55 * redirects to shlwapi.ShellMessageBoxW so the #define should not be needed.
56 *
57 * However our shell32 is built with _WIN32_WINNT set to 0x600 (Vista+),
58 * yet its exports (especially regarding ShellMessageBoxA/W) are Win2003
59 * compatible. So the #define is still needed, and the check be disabled.
60 */
61// #if (_WIN32_WINNT < 0x0600)
62#define ShellMessageBoxW ShellMessageBoxWrapW
63// #endif
64
65#include <browseui_undoc.h>
66
67#include <shellutils.h>
68
70#include "wine/pidl.h"
71#include "debughlp.h"
72#include "wine/shell32_main.h"
73#include "shresdef.h"
74#include "wine/cpanel.h"
75#include "CActiveDesktop.h"
76#include "CEnumIDListBase.h"
77#include "shfldr.h"
78#include "CShellItem.h"
79#include "CShellLink.h"
80#include "CFolderItemVerbs.h"
81#include "CFolderItems.h"
82#include "CFolder.h"
83#include "CShellDispatch.h"
84#include "CDropTargetHelper.h"
85#include "CFolderOptions.h"
86#include "folders/CFSFolder.h"
91#include "folders/CNetFolder.h"
95#include "folders/CRecycleBin.h"
98#include "COpenWithMenu.h"
99#include "CNewMenu.h"
100#include "CSendToMenu.h"
101#include "CCopyMoveToMenu.h"
102#include "CCopyAsPathMenu.h"
103#include "dialogs/filedefext.h"
104#include "dialogs/drvdefext.h"
105#include "CQueryAssociations.h"
106#include "shellmenu/CMenuBand.h"
108#include "shellmenu/CMenuSite.h"
110#include "shellmenu/shellmenu.h"
111#include "CUserNotification.h"
114
115#include <wine/debug.h>
116#include <wine/unicode.h>
117
120extern const GUID CLSID_StartMenu;
121extern const GUID CLSID_MenuBandSite;
122extern const GUID CLSID_OpenWith;
123extern const GUID CLSID_UnixFolder;
124extern const GUID CLSID_UnixDosFolder;
127
128#define MAX_PROPERTY_SHEET_PAGE 32
129
130extern inline
131BOOL
134{
136
137 if (pHeader->nPages < MAX_PROPERTY_SHEET_PAGE)
138 {
139 pHeader->phpage[pHeader->nPages++] = hPage;
140 return TRUE;
141 }
142
143 return FALSE;
144}
145
150UINT
152UINT
154#define SHELL_ExecuteControlPanelCPL(hwnd, cpl) SHRunControlPanel((cpl), (hwnd))
155
156// CStubWindow32 --- The owner window of file property sheets.
157// This window hides taskbar button of property sheet.
158class CStubWindow32 : public CWindowImpl<CStubWindow32>
159{
160public:
161 DECLARE_WND_CLASS_EX(_T("StubWindow32"), 0, COLOR_WINDOWTEXT)
162
165};
166
169 _In_ LPCITEMIDLIST pidl,
170 _In_ HANDLE hToken,
171 _Out_ LPITEMIDLIST *ppidlAlias,
173
179
182
185 _In_ IShellFolder *psf,
186 _In_ LPCITEMIDLIST pidl,
188 _Out_ LPWSTR pszBuf,
189 _In_ UINT cchBuf);
190
194 _In_ LPCITEMIDLIST pidl,
196 _Out_ void **ppvObj);
197
200 _In_opt_ IShellFolder *pShellFolder,
201 _In_ LPCITEMIDLIST pidl,
202 _In_opt_ IBindCtx *pBindCtx,
204 _Out_ void **ppvObj);
205
206DWORD
209
212 _In_ LPCITEMIDLIST pidl,
214 _Out_opt_ LPWSTR pszText,
215 _In_ UINT cchBuf,
216 _Inout_opt_ DWORD *pdwAttributes);
217
219
222 _In_ IBindCtx *pBindCtx,
223 _In_ LPOLESTR pszKey,
224 _In_opt_ IUnknown *punk,
225 _Out_ LPBC *ppbc);
226
231
235 _In_ PCWSTR pszCommandName,
239 _In_ IExecuteCommand *pEC,
240 _In_ PCWSTR pszCommandName,
242 _In_opt_ IShellItemArray *pSIA,
243 _In_opt_ LPCMINVOKECOMMANDINFOEX pICI,
244 _In_opt_ IUnknown *pSite);
247 _In_ IExecuteCommand *pEC,
248 _In_ PCWSTR pszCommandName,
250 _In_ IDataObject *pDO,
251 _In_opt_ LPCMINVOKECOMMANDINFOEX pICI,
252 _In_opt_ IUnknown *pSite);
253
254#endif /* _PRECOMP_H__ */
#define msg(x)
Definition: auth_time.c:54
#define EXTERN_C
Definition: basetyps.h:12
LPARAM lParam
Definition: combotst.c:139
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define CALLBACK
Definition: compat.h:35
HRESULT Shell_DisplayNameOf(_In_ IShellFolder *psf, _In_ LPCITEMIDLIST pidl, _In_ DWORD dwFlags, _Out_ LPWSTR pszBuf, _In_ UINT cchBuf)
Definition: utils.cpp:230
DWORD SHGetAttributes(_In_ IShellFolder *psf, _In_ LPCITEMIDLIST pidl, _In_ DWORD dwAttributes)
Definition: utils.cpp:246
const GUID CLSID_UnixDosFolder
const GUID CLSID_MenuBandSite
const GUID CLSID_OpenWith
EXTERN_C INT Shell_ParseSpecialFolder(_In_ LPCWSTR pszStart, _Out_ LPWSTR *ppch, _Out_ INT *pcch)
Definition: shellpath.c:1859
UINT MapVerbToDfmCmd(_In_ LPCSTR verba)
HRESULT SHGetNameAndFlagsW(_In_ LPCITEMIDLIST pidl, _In_ DWORD dwFlags, _Out_opt_ LPWSTR pszText, _In_ UINT cchBuf, _Inout_opt_ DWORD *pdwAttributes)
Definition: utils.cpp:289
DWORD BindCtx_GetMode(_In_ IBindCtx *pbc, _In_ DWORD dwDefault)
Definition: utils.cpp:128
#define MAX_PROPERTY_SHEET_PAGE
Definition: precomp.h:128
BOOL BindCtx_ContainsObject(_In_ IBindCtx *pBindCtx, _In_ LPCWSTR pszName)
Definition: utils.cpp:120
const GUID SHELL32_AdvtShortcutProduct
HRESULT SHIsFileSysBindCtx(_In_ IBindCtx *pBindCtx, _Out_opt_ WIN32_FIND_DATAW *pFindData)
Definition: utils.cpp:153
BOOL PathIsValidElement(_In_ LPCWSTR pszPath)
Definition: utils.cpp:38
const GUID CLSID_UnixFolder
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)
Definition: utils.cpp:1307
BOOL Shell_FailForceReturn(_In_ HRESULT hr)
Definition: utils.cpp:170
EXTERN_C HRESULT SHBindToObject(_In_opt_ IShellFolder *psf, _In_ LPCITEMIDLIST pidl, _In_ REFIID riid, _Out_ void **ppvObj)
Definition: utils.cpp:220
EXTERN_C HRESULT IUnknown_InitializeCommand(_In_ IUnknown *pUnk, _In_ PCWSTR pszCommandName, _In_opt_ IPropertyBag *pPB)
Definition: utils.cpp:1294
const GUID CLSID_FontsFolderShortcut
UINT GetDfmCmd(_In_ IContextMenu *pCM, _In_ LPCSTR verba)
Definition: utils.cpp:1376
EXTERN_C HRESULT BindCtx_RegisterObjectParam(_In_ IBindCtx *pBindCtx, _In_ LPOLESTR pszKey, _In_opt_ IUnknown *punk, _Out_ LPBC *ppbc)
Definition: utils.cpp:383
HRESULT SHELL32_DefaultContextMenuCallBack(IShellFolder *psf, IDataObject *pdo, UINT msg)
Definition: shlfolder.cpp:515
const GUID CLSID_AdminFolderShortcut
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)
Definition: utils.cpp:1348
EXTERN_C HWND BindCtx_GetUIWindow(_In_ IBindCtx *pBindCtx)
Definition: utils.cpp:323
const GUID CLSID_StartMenu
HRESULT SHBindToObjectEx(_In_opt_ IShellFolder *pShellFolder, _In_ LPCITEMIDLIST pidl, _In_opt_ IBindCtx *pBindCtx, _In_ REFIID riid, _Out_ void **ppvObj)
Definition: utils.cpp:187
HRESULT Shell_TranslateIDListAlias(_In_ LPCITEMIDLIST pidl, _In_ HANDLE hToken, _Out_ LPITEMIDLIST *ppidlAlias, _In_ DWORD dwFlags)
Definition: utils.cpp:111
BOOL SHSkipJunctionBinding(_In_ IBindCtx *pbc, _In_ CLSID *pclsid)
Definition: utils.cpp:141
BOOL PathIsDotOrDotDotW(_In_ LPCWSTR pszPath)
Definition: utils.cpp:26
HRESULT SHILAppend(_Inout_ LPITEMIDLIST pidl, _Inout_ LPITEMIDLIST *ppidl)
Definition: utils.cpp:73
HRESULT SHELL32_ShowPropertiesDialog(IDataObject *pdtobj)
Definition: shlfolder.cpp:497
const GUID SHELL32_AdvtShortcutComponent
BOOL CALLBACK AddPropSheetPageCallback(HPROPSHEETPAGE hPage, LPARAM lParam)
Definition: precomp.h:133
HRESULT SHCoInitializeAnyApartment(VOID)
Definition: utils.cpp:280
BOOL PathIsDosDevice(_In_ LPCWSTR pszName)
Definition: utils.cpp:52
static void *static void *static LPDIRECTPLAY IUnknown * pUnk
Definition: dplayx.c:30
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
FxContextHeader * pHeader
Definition: handleapi.cpp:604
REFIID riid
Definition: atlbase.h:39
#define BEGIN_MSG_MAP(theClass)
Definition: atlwin.h:1898
#define END_MSG_MAP()
Definition: atlwin.h:1917
#define DECLARE_WND_CLASS_EX(WndClassName, style, bkgnd)
Definition: atlwin.h:2004
static LPOLESTR
Definition: stg_prop.c:27
#define _Out_opt_
Definition: ms_sal.h:346
#define _Inout_
Definition: ms_sal.h:378
#define _Inout_opt_
Definition: ms_sal.h:379
#define _Out_
Definition: ms_sal.h:345
#define _In_
Definition: ms_sal.h:308
#define _In_opt_
Definition: ms_sal.h:309
struct _PSP * HPROPSHEETPAGE
Definition: mstask.idl:90
unsigned int UINT
Definition: ndis.h:50
interface IBindCtx * LPBC
Definition: objfwd.h:18
#define REFIID
Definition: guiddef.h:118
HRESULT hr
Definition: shlfolder.c:183
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
const uint16_t * PCWSTR
Definition: typedefs.h:57
int32_t INT
Definition: typedefs.h:58
DWORD dwAttributes
Definition: vdmdbg.h:34
#define _T(x)
Definition: vfdio.h:22
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
LONG_PTR LPARAM
Definition: windef.h:208
#define COLOR_WINDOWTEXT
Definition: winuser.h:921
const char * LPCSTR
Definition: xmlstorage.h:183
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185