xref: /reactos/sdk/include/psdk/shellapi.h (revision c569aee0)
1 #ifndef _SHELLAPI_H
2 #define _SHELLAPI_H
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7 #ifdef _MSC_VER
8 #pragma warning(push)
9 #pragma warning(disable:4201)
10 #endif
11 
12 #if !defined(_WIN64)
13 #include <pshpack1.h>
14 #endif
15 
16 #define WINSHELLAPI DECLSPEC_IMPORT
17 #define ABE_LEFT	0
18 #define ABE_TOP	1
19 #define ABE_RIGHT	2
20 #define ABE_BOTTOM	3
21 #define ABS_AUTOHIDE	1
22 #define ABS_ALWAYSONTOP	2
23 
24 #define SEE_MASK_DEFAULT	0x00000000
25 #define SEE_MASK_CLASSNAME	0x00000001
26 #define SEE_MASK_CLASSKEY	0x00000003
27 #define SEE_MASK_IDLIST	0x00000004
28 #define SEE_MASK_INVOKEIDLIST	0x0000000C
29 #define SEE_MASK_ICON	0x00000010
30 #define SEE_MASK_HOTKEY	0x00000020
31 #define SEE_MASK_NOCLOSEPROCESS	0x00000040
32 #define SEE_MASK_CONNECTNETDRV	0x00000080
33 #define SEE_MASK_NOASYNC	0x00000100
34 #define SEE_MASK_FLAG_DDEWAIT	SEE_MASK_NOASYNC
35 #define SEE_MASK_DOENVSUBST	0x00000200
36 #define SEE_MASK_FLAG_NO_UI	0x00000400
37 #define SEE_MASK_UNICODE	0x00004000
38 #define SEE_MASK_NO_CONSOLE	0x00008000
39 /*
40  * NOTE: The following 5 flags are undocumented and are not present in the
41  * official Windows SDK. However they are used in shobjidl.idl to define some
42  * CMIC_MASK_* flags, these ones being mentioned in the MSDN documentation of
43  * the CMINVOKECOMMANDINFOEX structure.
44  * I affect them this range of values which seems to be strangely empty. Of
45  * course their values may differ from the real ones, however I have no way
46  * of discovering them. If somebody else can verify them, it would be great.
47  */
48 #define SEE_MASK_UNKNOWN_0x1000 0x00001000 /* FIXME: Name */
49 #define SEE_MASK_HASLINKNAME    0x00010000
50 #define SEE_MASK_FLAG_SEPVDM    0x00020000
51 #define SEE_MASK_USE_RESERVED   0x00040000
52 #define SEE_MASK_HASTITLE       0x00080000
53 /* END NOTE */
54 #define SEE_MASK_ASYNCOK	0x00100000
55 #define SEE_MASK_HMONITOR	0x00200000
56 #define SEE_MASK_NOZONECHECKS	0x00800000
57 #define SEE_MASK_NOQUERYCLASSSTORE	0x01000000
58 #define SEE_MASK_WAITFORINPUTIDLE	0x02000000
59 #define SEE_MASK_FLAG_LOG_USAGE	0x04000000
60 #define SEE_MASK_FLAG_HINST_IS_SITE 0x08000000
61 
62 #define ABM_NEW	0
63 #define ABM_REMOVE	1
64 #define ABM_QUERYPOS	2
65 #define ABM_SETPOS	3
66 #define ABM_GETSTATE	4
67 #define ABM_GETTASKBARPOS	5
68 #define ABM_ACTIVATE	6
69 #define ABM_GETAUTOHIDEBAR	7
70 #define ABM_SETAUTOHIDEBAR	8
71 #define ABM_WINDOWPOSCHANGED	9
72 #define ABM_SETSTATE            10
73 #define ABN_STATECHANGE		0
74 #define ABN_POSCHANGED		1
75 #define ABN_FULLSCREENAPP	2
76 #define ABN_WINDOWARRANGE	3
77 
78 #if (_WIN32_IE >= 0x0500)
79 #define NIN_SELECT          (WM_USER + 0)
80 #define NINF_KEY            1
81 #define NIN_KEYSELECT       (NIN_SELECT | NINF_KEY)
82 #endif
83 
84 #if (_WIN32_IE >= 0x0501)
85 #define NIN_BALLOONSHOW         (WM_USER + 2)
86 #define NIN_BALLOONHIDE         (WM_USER + 3)
87 #define NIN_BALLOONTIMEOUT      (WM_USER + 4)
88 #define NIN_BALLOONUSERCLICK    (WM_USER + 5)
89 #endif
90 #if (NTDDI_VERSION >= NTDDI_VISTA)
91 #define NIN_POPUPOPEN           (WM_USER + 6)
92 #define NIN_POPUPCLOSE          (WM_USER + 7)
93 #endif
94 
95 #define NIM_ADD	0
96 #define NIM_MODIFY	1
97 #define NIM_DELETE	2
98 #if _WIN32_IE >= 0x0500
99 #define NIM_SETFOCUS	3
100 #define NIM_SETVERSION	4
101 #define NOTIFYICON_VERSION      3
102 #if (NTDDI_VERSION >= NTDDI_VISTA)
103 #define NOTIFYICON_VERSION_4    4
104 #endif
105 #endif
106 #define NIF_MESSAGE	1
107 #define NIF_ICON	2
108 #define NIF_TIP	4
109 #if _WIN32_IE >= 0x0500
110 #define NIF_STATE	8
111 #define NIF_INFO	16
112 #define NIS_HIDDEN	1
113 #define NIS_SHAREDICON	2
114 #define NIIF_NONE	0
115 #define NIIF_INFO	1
116 #define NIIF_WARNING	2
117 #define NIIF_ERROR	3
118 #define NIIF_USER	4
119 #if _WIN32_IE >= 0x0600
120 #define NIF_GUID	32
121 #define NIIF_ICON_MASK	0xf
122 #define NIIF_NOSOUND	0x10
123 #endif /* _WIN32_IE >= 0x0600 */
124 #endif /* _WIN32_IE >= 0x0500 */
125 
126 #define SE_ERR_FNF	2
127 #define SE_ERR_PNF	3
128 #define SE_ERR_ACCESSDENIED	5
129 #define SE_ERR_OOM	8
130 #define SE_ERR_DLLNOTFOUND	32
131 #define SE_ERR_SHARE	26
132 #define SE_ERR_ASSOCINCOMPLETE	27
133 #define SE_ERR_DDETIMEOUT	28
134 #define SE_ERR_DDEFAIL	29
135 #define SE_ERR_DDEBUSY	30
136 #define SE_ERR_NOASSOC	31
137 #define FO_MOVE	1
138 #define FO_COPY	2
139 #define FO_DELETE	3
140 #define FO_RENAME	4
141 
142 #define FOF_MULTIDESTFILES         0x0001
143 #define FOF_CONFIRMMOUSE           0x0002
144 #define FOF_SILENT                 0x0004
145 #define FOF_RENAMEONCOLLISION      0x0008
146 #define FOF_NOCONFIRMATION         0x0010
147 #define FOF_WANTMAPPINGHANDLE      0x0020
148 #define FOF_ALLOWUNDO              0x0040
149 #define FOF_FILESONLY              0x0080
150 #define FOF_SIMPLEPROGRESS         0x0100
151 #define FOF_NOCONFIRMMKDIR         0x0200
152 #define FOF_NOERRORUI              0x0400
153 #define FOF_NOCOPYSECURITYATTRIBS  0x0800
154 #define FOF_NORECURSION            0x1000  /* don't do recursion into directories */
155 #define FOF_NO_CONNECTED_ELEMENTS  0x2000  /* don't do connected files */
156 #define FOF_WANTNUKEWARNING        0x4000  /* during delete operation, warn if delete instead
157                                               of recycling (even if FOF_NOCONFIRMATION) */
158 #define FOF_NORECURSEREPARSE       0x8000  /* don't do recursion into reparse points */
159 
160 #define PO_DELETE 19
161 #define PO_RENAME 20
162 #define PO_PORTCHANGE 32
163 #define PO_REN_PORT 52
164 #define SHGFI_ADDOVERLAYS	32
165 #define SHGFI_OVERLAYINDEX	64
166 #define SHGFI_ICON	256
167 #define SHGSI_ICON SHGFI_ICON
168 #define SHGFI_DISPLAYNAME	512
169 #define SHGFI_TYPENAME	1024
170 #define SHGFI_ATTRIBUTES	2048
171 #define SHGFI_ICONLOCATION	4096
172 #define SHGFI_EXETYPE 8192
173 #define SHGFI_SYSICONINDEX 16384
174 #define SHGFI_LINKOVERLAY 32768
175 #define SHGFI_SELECTED 65536
176 #define SHGFI_ATTR_SPECIFIED 131072
177 #define SHGFI_LARGEICON	0
178 #define SHGFI_SMALLICON	1
179 #define SHGSI_SMALLICON SHGFI_SMALLICON
180 #define SHGFI_OPENICON	2
181 #define SHGFI_SHELLICONSIZE	4
182 #define SHGFI_PIDL	8
183 #define SHGFI_USEFILEATTRIBUTES	16
184 
185 #if (NTDDI_VERSION >= NTDDI_WINXP)
186 #define SHIL_LARGE        0x0
187 #define SHIL_SMALL        0x1
188 #define SHIL_EXTRALARGE   0x2
189 #define SHIL_SYSSMALL     0x3
190 #if (NTDDI_VERSION >= NTDDI_VISTA)
191 #define SHIL_JUMBO        0x4
192 #define SHIL_LAST         SHIL_JUMBO
193 #else
194 #define SHIL_LAST         SHIL_SYSSMALL
195 #endif
196 #endif
197 
198 typedef struct _SHCREATEPROCESSINFOW
199 {
200     DWORD cbSize;
201     ULONG fMask;
202     HWND hwnd;
203     LPCWSTR pszFile;
204     LPCWSTR pszParameters;
205     LPCWSTR pszCurrentDirectory;
206     IN HANDLE hUserToken;
207     IN LPSECURITY_ATTRIBUTES lpProcessAttributes;
208     IN LPSECURITY_ATTRIBUTES lpThreadAttributes;
209     IN BOOL bInheritHandles;
210     IN DWORD dwCreationFlags;
211     IN LPSTARTUPINFOW lpStartupInfo;
212     OUT LPPROCESS_INFORMATION lpProcessInformation;
213 } SHCREATEPROCESSINFOW, *PSHCREATEPROCESSINFOW;
214 
215 typedef WORD FILEOP_FLAGS;
216 typedef WORD PRINTEROP_FLAGS;
217 
218 typedef struct _AppBarData {
219 	DWORD	cbSize;
220 	HWND	hWnd;
221 	UINT	uCallbackMessage;
222 	UINT	uEdge;
223 	RECT	rc;
224 	LPARAM lParam;
225 } APPBARDATA,*PAPPBARDATA;
226 DECLARE_HANDLE(HDROP);
227 
228 typedef struct _NOTIFYICONDATAA {
229 	DWORD cbSize;
230 	HWND hWnd;
231 	UINT uID;
232 	UINT uFlags;
233 	UINT uCallbackMessage;
234 	HICON hIcon;
235 #if (NTDDI_VERSION < NTDDI_WIN2K)
236 	CHAR szTip[64];
237 #endif
238 #if (NTDDI_VERSION >= NTDDI_WIN2K)
239 	CHAR szTip[128];
240 	DWORD dwState;
241 	DWORD dwStateMask;
242 	CHAR szInfo[256];
243 	_ANONYMOUS_UNION union {
244 		UINT uTimeout;
245 		UINT uVersion;
246 	} DUMMYUNIONNAME;
247 	CHAR szInfoTitle[64];
248 	DWORD dwInfoFlags;
249 #endif
250 #if (NTDDI_VERSION >= NTDDI_WINXP)
251 	GUID guidItem;
252 #endif
253 #if (NTDDI_VERSION >= NTDDI_VISTA)
254 	HICON hBalloonIcon;
255 #endif
256 } NOTIFYICONDATAA,*PNOTIFYICONDATAA;
257 
258 typedef struct _NOTIFYICONDATAW {
259 	DWORD cbSize;
260 	HWND hWnd;
261 	UINT uID;
262 	UINT uFlags;
263 	UINT uCallbackMessage;
264 	HICON hIcon;
265 #if (NTDDI_VERSION < NTDDI_WIN2K)
266 	WCHAR szTip[64];
267 #endif
268 #if (NTDDI_VERSION >= NTDDI_WIN2K)
269 	WCHAR szTip[128];
270 	DWORD dwState;
271 	DWORD dwStateMask;
272 	WCHAR szInfo[256];
273 	_ANONYMOUS_UNION union {
274 		UINT uTimeout;
275 		UINT uVersion;
276 	} DUMMYUNIONNAME;
277 	WCHAR szInfoTitle[64];
278 	DWORD dwInfoFlags;
279 #endif
280 #if (NTDDI_VERSION >= NTDDI_WINXP)
281 	GUID guidItem;
282 #endif
283 #if (NTDDI_VERSION >= NTDDI_VISTA)
284 	HICON hBalloonIcon;
285 #endif
286 } NOTIFYICONDATAW,*PNOTIFYICONDATAW;
287 
288 #define NOTIFYICONDATAA_V1_SIZE FIELD_OFFSET(NOTIFYICONDATAA, szTip[64])
289 #define NOTIFYICONDATAW_V1_SIZE FIELD_OFFSET(NOTIFYICONDATAW, szTip[64])
290 #define NOTIFYICONDATAA_V2_SIZE FIELD_OFFSET(NOTIFYICONDATAA, guidItem)
291 #define NOTIFYICONDATAW_V2_SIZE FIELD_OFFSET(NOTIFYICONDATAW, guidItem)
292 #define NOTIFYICONDATAA_V3_SIZE FIELD_OFFSET(NOTIFYICONDATAA, hBalloonIcon)
293 #define NOTIFYICONDATAW_V3_SIZE FIELD_OFFSET(NOTIFYICONDATAW, hBalloonIcon)
294 
295 #if WINVER >= 0x400
296 typedef struct _DRAGINFOA {
297 	UINT uSize;
298 	POINT pt;
299 	BOOL fNC;
300 	LPSTR lpFileList;
301 	DWORD grfKeyState;
302 } DRAGINFOA,*LPDRAGINFOA;
303 typedef struct _DRAGINFOW {
304 	UINT uSize;
305 	POINT pt;
306 	BOOL fNC;
307 	LPWSTR lpFileList;
308 	DWORD grfKeyState;
309 } DRAGINFOW,*LPDRAGINFOW;
310 #endif
311 
312 typedef struct _SHELLEXECUTEINFOA {
313 	DWORD cbSize;
314 	ULONG fMask;
315 	HWND hwnd;
316 	LPCSTR lpVerb;
317 	LPCSTR lpFile;
318 	LPCSTR lpParameters;
319 	LPCSTR lpDirectory;
320 	int nShow;
321 	HINSTANCE hInstApp;
322 	PVOID lpIDList;
323 	LPCSTR lpClass;
324 	HKEY hkeyClass;
325 	DWORD dwHotKey;
326 	HANDLE hIcon;
327 	HANDLE hProcess;
328 } SHELLEXECUTEINFOA,*LPSHELLEXECUTEINFOA;
329 typedef struct _SHELLEXECUTEINFOW {
330 	DWORD cbSize;
331 	ULONG fMask;
332 	HWND hwnd;
333 	LPCWSTR lpVerb;
334 	LPCWSTR lpFile;
335 	LPCWSTR lpParameters;
336 	LPCWSTR lpDirectory;
337 	int nShow;
338 	HINSTANCE hInstApp;
339 	PVOID lpIDList;
340 	LPCWSTR lpClass;
341 	HKEY hkeyClass;
342 	DWORD dwHotKey;
343 	HANDLE hIcon;
344 	HANDLE hProcess;
345 } SHELLEXECUTEINFOW,*LPSHELLEXECUTEINFOW;
346 typedef struct _SHFILEOPSTRUCTA {
347 	HWND hwnd;
348 	UINT wFunc;
349 	LPCSTR pFrom;
350 	LPCSTR pTo;
351 	FILEOP_FLAGS fFlags;
352 	BOOL fAnyOperationsAborted;
353 	PVOID hNameMappings;
354 	LPCSTR lpszProgressTitle;
355 } SHFILEOPSTRUCTA,*LPSHFILEOPSTRUCTA;
356 typedef struct _SHFILEOPSTRUCTW {
357 	HWND hwnd;
358 	UINT wFunc;
359 	LPCWSTR pFrom;
360 	LPCWSTR pTo;
361 	FILEOP_FLAGS fFlags;
362 	BOOL fAnyOperationsAborted;
363 	PVOID hNameMappings;
364 	LPCWSTR lpszProgressTitle;
365 } SHFILEOPSTRUCTW,*LPSHFILEOPSTRUCTW;
366 typedef struct _SHFILEINFOA {
367 	HICON hIcon;
368 	int iIcon;
369 	DWORD dwAttributes;
370 	CHAR szDisplayName[MAX_PATH];
371 	CHAR szTypeName[80];
372 } SHFILEINFOA;
373 typedef struct _SHFILEINFOW {
374 	HICON hIcon;
375 	int iIcon;
376 	DWORD dwAttributes;
377 	WCHAR szDisplayName[MAX_PATH];
378 	WCHAR szTypeName[80];
379 } SHFILEINFOW;
380 typedef struct _SHQUERYRBINFO {
381 	DWORD   cbSize;
382 	__int64 i64Size;
383 	__int64 i64NumItems;
384 } SHQUERYRBINFO, *LPSHQUERYRBINFO;
385 typedef struct _SHNAMEMAPPINGA {
386 	LPSTR	pszOldPath;
387 	LPSTR	pszNewPath;
388 	int	cchOldPath;
389 	int	cchNewPath;
390 } SHNAMEMAPPINGA, *LPSHNAMEMAPPINGA;
391 typedef struct _SHNAMEMAPPINGW {
392 	LPWSTR	pszOldPath;
393 	LPWSTR	pszNewPath;
394 	int	cchOldPath;
395 	int	cchNewPath;
396 } SHNAMEMAPPINGW, *LPSHNAMEMAPPINGW;
397 
398 #define SHERB_NOCONFIRMATION 0x1
399 #define SHERB_NOPROGRESSUI   0x2
400 #define SHERB_NOSOUND        0x4
401 
402 /******************************************
403  * Links
404  */
405 
406 #define SHGNLI_PIDL        0x01
407 #define SHGNLI_PREFIXNAME  0x02
408 #define SHGNLI_NOUNIQUE    0x04
409 #define SHGNLI_NOLNK       0x08
410 
411 LPWSTR * WINAPI CommandLineToArgvW(_In_ LPCWSTR, _Out_ int*);
412 void WINAPI DragAcceptFiles(_In_ HWND, _In_ BOOL);
413 void WINAPI DragFinish(_In_ HDROP);
414 
415 _Success_(return != 0)
416 UINT
417 WINAPI
418 DragQueryFileA(
419   _In_ HDROP hDrop,
420   _In_ UINT iFile,
421   _Out_writes_opt_(cch) LPSTR lpszFile,
422   _In_ UINT cch);
423 
424 _Success_(return != 0)
425 UINT
426 WINAPI
427 DragQueryFileW(
428   _In_ HDROP hDrop,
429   _In_ UINT iFile,
430   _Out_writes_opt_(cch) LPWSTR lpszFile,
431   _In_ UINT cch);
432 
433 BOOL WINAPI DragQueryPoint(_In_ HDROP, _Out_ LPPOINT);
434 
435 HICON
436 WINAPI
437 ExtractAssociatedIconA(
438   _Reserved_ HINSTANCE hInst,
439   _Inout_updates_(128) LPSTR pszIconPath,
440   _Inout_ WORD *piIcon);
441 
442 HICON
443 WINAPI
444 ExtractAssociatedIconW(
445   _Reserved_ HINSTANCE hInst,
446   _Inout_updates_(128) LPWSTR pszIconPath,
447   _Inout_ WORD *piIcon);
448 
449 HICON
450 WINAPI
451 ExtractIconA(
452   _Reserved_ HINSTANCE hInst,
453   _In_ LPCSTR pszExeFileName,
454   UINT nIconIndex);
455 
456 HICON
457 WINAPI
458 ExtractIconW(
459   _Reserved_ HINSTANCE hInst,
460   _In_ LPCWSTR pszExeFileName,
461   UINT nIconIndex);
462 
463 UINT
464 WINAPI
465 ExtractIconExA(
466   _In_ LPCSTR lpszFile,
467   _In_ int nIconIndex,
468   _Out_writes_opt_(nIcons) HICON *phiconLarge,
469   _Out_writes_opt_(nIcons) HICON *phiconSmall,
470   _In_ UINT nIcons);
471 
472 UINT
473 WINAPI
474 ExtractIconExW(
475   _In_ LPCWSTR lpszFile,
476   _In_ int nIconIndex,
477   _Out_writes_opt_(nIcons) HICON *phiconLarge,
478   _Out_writes_opt_(nIcons) HICON *phiconSmall,
479   _In_ UINT nIcons);
480 
481 _Success_(return > 32)
482 HINSTANCE
483 WINAPI
484 FindExecutableA(
485   _In_ LPCSTR lpFile,
486   _In_opt_ LPCSTR lpDirectory,
487   _Out_writes_(MAX_PATH) LPSTR lpResult);
488 
489 _Success_(return > 32)
490 HINSTANCE
491 WINAPI
492 FindExecutableW(
493   _In_ LPCWSTR lpFile,
494   _In_opt_ LPCWSTR lpDirectory,
495   _Out_writes_(MAX_PATH) LPWSTR lpResult);
496 
497 UINT_PTR WINAPI SHAppBarMessage(_In_ DWORD, _Inout_ PAPPBARDATA);
498 BOOL WINAPI Shell_NotifyIconA(_In_ DWORD, _In_ PNOTIFYICONDATAA);
499 BOOL WINAPI Shell_NotifyIconW(_In_ DWORD, _In_ PNOTIFYICONDATAW);
500 
501 int
502 WINAPI
503 ShellAboutA(
504   _In_opt_ HWND hWnd,
505   _In_ LPCSTR szApp,
506   _In_opt_ LPCSTR szOtherStuff,
507   _In_opt_ HICON hIcon);
508 
509 int
510 WINAPI
511 ShellAboutW(
512   _In_opt_ HWND hWnd,
513   _In_ LPCWSTR szApp,
514   _In_opt_ LPCWSTR szOtherStuff,
515   _In_opt_ HICON hIcon);
516 
517 int
518 WINAPIV
519 ShellMessageBoxA(
520   _In_opt_ HINSTANCE hAppInst,
521   _In_opt_ HWND hWnd,
522   _In_ LPCSTR lpcText,
523   _In_opt_ LPCSTR lpcTitle,
524   _In_ UINT fuStyle,
525   ...);
526 
527 int
528 WINAPIV
529 ShellMessageBoxW(
530   _In_opt_ HINSTANCE hAppInst,
531   _In_opt_ HWND hWnd,
532   _In_ LPCWSTR lpcText,
533   _In_opt_ LPCWSTR lpcTitle,
534   _In_ UINT fuStyle,
535   ...);
536 
537 HINSTANCE
538 WINAPI
539 ShellExecuteA(
540   _In_opt_ HWND hwnd,
541   _In_opt_ LPCSTR lpOperation,
542   _In_ LPCSTR lpFile,
543   _In_opt_ LPCSTR lpParameters,
544   _In_opt_ LPCSTR lpDirectory,
545   _In_ INT nShowCmd);
546 
547 HINSTANCE
548 WINAPI
549 ShellExecuteW(
550   _In_opt_ HWND hwnd,
551   _In_opt_ LPCWSTR lpOperation,
552   _In_ LPCWSTR lpFile,
553   _In_opt_ LPCWSTR lpParameters,
554   _In_opt_ LPCWSTR lpDirectory,
555   _In_ INT nShowCmd);
556 
557 BOOL WINAPI ShellExecuteExA(_Inout_ LPSHELLEXECUTEINFOA);
558 BOOL WINAPI ShellExecuteExW(_Inout_ LPSHELLEXECUTEINFOW);
559 int WINAPI SHFileOperationA(_Inout_ LPSHFILEOPSTRUCTA);
560 int WINAPI SHFileOperationW(_Inout_ LPSHFILEOPSTRUCTW);
561 void WINAPI SHFreeNameMappings(_In_opt_ HANDLE);
562 
563 DWORD_PTR
564 WINAPI
565 SHGetFileInfoA(
566   _In_ LPCSTR pszPath,
567   DWORD dwFileAttributes,
568   _Inout_updates_bytes_opt_(cbFileInfo) SHFILEINFOA *psfi,
569   UINT cbFileInfo,
570   UINT uFlags);
571 
572 DWORD_PTR
573 WINAPI
574 SHGetFileInfoW(
575   _In_ LPCWSTR pszPath,
576   DWORD dwFileAttributes,
577   _Inout_updates_bytes_opt_(cbFileInfo) SHFILEINFOW *psfi,
578   UINT cbFileInfo,
579   UINT uFlags);
580 
581 _Success_(return != 0)
582 BOOL
583 WINAPI
584 SHGetNewLinkInfoA(
585   _In_ LPCSTR pszLinkTo,
586   _In_ LPCSTR pszDir,
587   _Out_writes_(MAX_PATH) LPSTR pszName,
588   _Out_ BOOL *pfMustCopy,
589   _In_ UINT uFlags);
590 
591 _Success_(return != 0)
592 BOOL
593 WINAPI
594 SHGetNewLinkInfoW(
595   _In_ LPCWSTR pszLinkTo,
596   _In_ LPCWSTR pszDir,
597   _Out_writes_(MAX_PATH) LPWSTR pszName,
598   _Out_ BOOL *pfMustCopy,
599   _In_ UINT uFlags);
600 
601 HRESULT
602 WINAPI
603 SHQueryRecycleBinA(
604   _In_opt_ LPCSTR pszRootPath,
605   _Inout_ LPSHQUERYRBINFO pSHQueryRBInfo);
606 
607 HRESULT
608 WINAPI
609 SHQueryRecycleBinW(
610   _In_opt_ LPCWSTR pszRootPath,
611   _Inout_ LPSHQUERYRBINFO pSHQueryRBInfo);
612 
613 HRESULT
614 WINAPI
615 SHEmptyRecycleBinA(
616   _In_opt_ HWND hwnd,
617   _In_opt_ LPCSTR pszRootPath,
618   DWORD dwFlags);
619 
620 HRESULT
621 WINAPI
622 SHEmptyRecycleBinW(
623   _In_opt_ HWND hwnd,
624   _In_opt_ LPCWSTR pszRootPath,
625   DWORD dwFlags);
626 
627 BOOL WINAPI SHCreateProcessAsUserW(_Inout_ PSHCREATEPROCESSINFOW);
628 
629 DWORD
630 WINAPI
631 DoEnvironmentSubstA(
632     _Inout_updates_(cchSrc) LPSTR pszSrc,
633     UINT cchSrc);
634 
635 DWORD
636 WINAPI
637 DoEnvironmentSubstW(
638     _Inout_updates_(cchSrc) LPWSTR pszSrc,
639     UINT cchSrc);
640 
641 #if (_WIN32_IE >= 0x0601)
642 BOOL
643 WINAPI
644 SHTestTokenMembership(
645     _In_opt_ HANDLE hToken,
646     _In_ ULONG ulRID);
647 #endif
648 
649 #ifdef UNICODE
650 #define NOTIFYICONDATA_V1_SIZE NOTIFYICONDATAW_V1_SIZE
651 #define NOTIFYICONDATA_V2_SIZE NOTIFYICONDATAW_V2_SIZE
652 #define NOTIFYICONDATA_V3_SIZE NOTIFYICONDATAW_V3_SIZE
653 typedef NOTIFYICONDATAW NOTIFYICONDATA,*PNOTIFYICONDATA;
654 typedef DRAGINFOW DRAGINFO,*LPDRAGINFO;
655 typedef SHELLEXECUTEINFOW SHELLEXECUTEINFO,*LPSHELLEXECUTEINFO;
656 typedef SHFILEOPSTRUCTW SHFILEOPSTRUCT,*LPSHFILEOPSTRUCT;
657 typedef SHFILEINFOW SHFILEINFO;
658 typedef SHNAMEMAPPINGW SHNAMEMAPPING;
659 typedef LPSHNAMEMAPPINGW LPSHNAMEMAPPING;
660 #define DragQueryFile DragQueryFileW
661 #define ExtractAssociatedIcon ExtractAssociatedIconW
662 #define ExtractIcon ExtractIconW
663 #define ExtractIconEx ExtractIconExW
664 #define FindExecutable FindExecutableW
665 #define Shell_NotifyIcon Shell_NotifyIconW
666 #define ShellAbout ShellAboutW
667 #define ShellExecute ShellExecuteW
668 #define ShellExecuteEx ShellExecuteExW
669 #define ShellMessageBox ShellMessageBoxW
670 #define SHFileOperation SHFileOperationW
671 #define SHGetFileInfo SHGetFileInfoW
672 #define SHQueryRecycleBin SHQueryRecycleBinW
673 #define SHEmptyRecycleBin SHEmptyRecycleBinW
674 #define SHGetNewLinkInfo SHGetNewLinkInfoW
675 #define DoEnvironmentSubst DoEnvironmentSubstW
676 
677 #else
678 #define NOTIFYICONDATA_V1_SIZE NOTIFYICONDATAA_V1_SIZE
679 #define NOTIFYICONDATA_V2_SIZE NOTIFYICONDATAA_V2_SIZE
680 #define NOTIFYICONDATA_V3_SIZE NOTIFYICONDATAA_V3_SIZE
681 typedef NOTIFYICONDATAA NOTIFYICONDATA,*PNOTIFYICONDATA;
682 typedef DRAGINFOA DRAGINFO,*LPDRAGINFO;
683 typedef SHELLEXECUTEINFOA SHELLEXECUTEINFO,*LPSHELLEXECUTEINFO;
684 typedef SHFILEOPSTRUCTA SHFILEOPSTRUCT,*LPSHFILEOPSTRUCT;
685 typedef SHFILEINFOA SHFILEINFO;
686 typedef SHNAMEMAPPINGA SHNAMEMAPPING;
687 typedef LPSHNAMEMAPPINGA LPSHNAMEMAPPING;
688 #define DragQueryFile DragQueryFileA
689 #define ExtractAssociatedIcon ExtractAssociatedIconA
690 #define ExtractIcon ExtractIconA
691 #define ExtractIconEx ExtractIconExA
692 #define FindExecutable FindExecutableA
693 #define Shell_NotifyIcon Shell_NotifyIconA
694 #define ShellAbout ShellAboutA
695 #define ShellExecute ShellExecuteA
696 #define ShellExecuteEx ShellExecuteExA
697 #define ShellMessageBox ShellMessageBoxA
698 #define SHFileOperation SHFileOperationA
699 #define SHGetFileInfo SHGetFileInfoA
700 #define SHQueryRecycleBin SHQueryRecycleBinA
701 #define SHEmptyRecycleBin SHEmptyRecycleBinA
702 #define SHGetNewLinkInfo SHGetNewLinkInfoA
703 #define DoEnvironmentSubst DoEnvironmentSubstA
704 #endif
705 
706 #if (NTDDI_VERSION >= NTDDI_VISTA)
707 
708 typedef struct _SHSTOCKICONINFO {
709   DWORD cbSize;
710   HICON hIcon;
711   int iSysImageIndex;
712   int iIcon;
713   WCHAR szPath[MAX_PATH];
714 } SHSTOCKICONINFO;
715 
716 #define SHGSI_ICONLOCATION 0
717 
718 typedef enum SHSTOCKICONID
719 {
720   SIID_INVALID=-1,
721   SIID_DOCNOASSOC,
722   SIID_DOCASSOC,
723   SIID_APPLICATION,
724   SIID_FOLDER,
725   SIID_FOLDEROPEN,
726   SIID_DRIVE525,
727   SIID_DRIVE35,
728   SIID_DRIVERREMOVE,
729   SIID_DRIVERFIXED,
730   SIID_DRIVERNET,
731   SIID_DRIVERNETDISABLE,
732   SIID_DRIVERCD,
733   SIID_DRIVERRAM,
734   SIID_WORLD,
735   /* Missing: 14 */
736   SIID_SERVER = 15,
737   SIID_PRINTER,
738   SIID_MYNETWORK,
739   /* Missing: 18 - 21 */
740   SIID_FIND = 22,
741   SIID_HELP,
742   /* Missing: 24 - 27 */
743   SIID_SHARE = 28,
744   SIID_LINK,
745   SIID_SLOWFILE,
746   SIID_RECYCLER,
747   SIID_RECYCLERFULL,
748   /* Missing: 33 - 39 */
749   SIID_MEDIACDAUDIO = 40,
750   /* Missing: 41 - 46 */
751   SIID_LOCK = 47,
752   /* Missing: 48 */
753   SIID_AUTOLIST = 49,
754   SIID_PRINTERNET,
755   SIID_SERVERSHARE,
756   SIID_PRINTERFAX,
757   SIID_PRINTERFAXNET,
758   SIID_PRINTERFILE,
759   SIID_STACK,
760   SIID_MEDIASVCD,
761   SIID_STUFFEDFOLDER,
762   SIID_DRIVEUNKNOWN,
763   SIID_DRIVEDVD,
764   SIID_MEDIADVD,
765   SIID_MEDIADVDRAM,
766   SIID_MEDIADVDRW,
767   SIID_MEDIADVDR,
768   SIID_MEDIADVDROM,
769   SIID_MEDIACDAUDIOPLUS,
770   SIID_MEDIACDRW,
771   SIID_MEDIACDR,
772   SIID_MEDIACDBURN,
773   SIID_MEDIABLANKCD,
774   SIID_MEDIACDROM,
775   SIID_AUDIOFILES,
776   SIID_IMAGEFILES,
777   SIID_VIDEOFILES,
778   SIID_MIXEDFILES,
779   SIID_FOLDERBACK,
780   SIID_FOLDERFRONT,
781   SIID_SHIELD,
782   SIID_WARNING,
783   SIID_INFO,
784   SIID_ERROR,
785   SIID_KEY,
786   SIID_SOFTWARE,
787   SIID_RENAME,
788   SIID_DELETE,
789   SIID_MEDIAAUDIODVD,
790   SIID_MEDIAMOVIEDVD,
791   SIID_MEDIAENHANCEDCD,
792   SIID_MEDIAENHANCEDDVD,
793   SIID_MEDIAHDDVD,
794   SIID_MEDIABLUERAY,
795   SIID_MEDIAVCD,
796   SIID_MEDIADVDPLUSR,
797   SIID_MEDIADVDPLUSRW,
798   SIID_DESKTOPPC,
799   SIID_MOBILEPC,
800   SIID_USERS,
801   SIID_MEDIASMARTMEDIA,
802   SIID_MEDIACOMPACTFLASH,
803   SIID_DEVICECELLPHONE,
804   SIID_DEVICECAMERA,
805   SIID_DEVICEVIDEOCAMERA,
806   SIID_DEVICEAUDIOPLAYER,
807   SIID_NETWORKCONNECT,
808   SIID_INTERNET,
809   SIID_ZIPFILE,
810   SIID_SETTINGS,
811   /* Missing: 107 - 131 */
812   SIID_DRIVEHDDVD = 132,
813   SIID_DRIVEBD,
814   SIID_MEDIAHDDVDROM,
815   SIID_MEDIAHDDVDR,
816   SIID_MEDIAHDDVDRAM,
817   SIID_MEDIABDROM,
818   SIID_MEDIABDR,
819   SIID_MEDIABDRE,
820   SIID_CLUSTEREDDRIVE,
821   /* Missing: 141 - 174 */
822   SIID_MAX_ICONS = 175
823 } SHSTOCKICONID;
824 
825 #endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
826 
827 #if !defined(_WIN64)
828 #include <poppack.h>
829 #endif
830 
831 #ifdef _MSC_VER
832 #pragma warning(pop)
833 #endif
834 #ifdef __cplusplus
835 }
836 #endif
837 #endif
838