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