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