1 /** 2 * This file has no copyright assigned and is placed in the Public Domain. 3 * This file is part of the mingw-w64 runtime package. 4 * No warranty is given; refer to the file DISCLAIMER.PD within this package. 5 */ 6 #ifndef _INC_SHELLAPI 7 #define _INC_SHELLAPI 8 9 #include <_mingw_unicode.h> 10 11 #ifndef WINSHELLAPI 12 #if !defined(_SHELL32_) 13 #define WINSHELLAPI DECLSPEC_IMPORT 14 #else 15 #define WINSHELLAPI 16 #endif 17 #endif 18 19 #ifndef SHSTDAPI 20 #if !defined(_SHELL32_) 21 #define SHSTDAPI EXTERN_C DECLSPEC_IMPORT HRESULT WINAPI 22 #define SHSTDAPI_(type) EXTERN_C DECLSPEC_IMPORT type WINAPI 23 #else 24 #define SHSTDAPI STDAPI 25 #define SHSTDAPI_(type) STDAPI_(type) 26 #endif 27 #endif 28 29 #ifndef SHDOCAPI 30 #if !defined(_SHDOCVW_) 31 #define SHDOCAPI EXTERN_C DECLSPEC_IMPORT HRESULT WINAPI 32 #define SHDOCAPI_(type) EXTERN_C DECLSPEC_IMPORT type WINAPI 33 #else 34 #define SHDOCAPI STDAPI 35 #define SHDOCAPI_(type) STDAPI_(type) 36 #endif 37 #endif 38 39 #if !defined(_WIN64) 40 #include <pshpack1.h> 41 #endif 42 43 #ifdef __cplusplus 44 extern "C" { 45 #endif 46 47 DECLARE_HANDLE(HDROP); 48 49 #define DragQueryFile __MINGW_NAME_AW(DragQueryFile) 50 #define ShellExecute __MINGW_NAME_AW(ShellExecute) 51 #define FindExecutable __MINGW_NAME_AW(FindExecutable) 52 #define ShellAbout __MINGW_NAME_AW(ShellAbout) 53 #define ExtractAssociatedIcon __MINGW_NAME_AW(ExtractAssociatedIcon) 54 #define ExtractAssociatedIconEx __MINGW_NAME_AW(ExtractAssociatedIconEx) 55 #define ExtractIcon __MINGW_NAME_AW(ExtractIcon) 56 57 SHSTDAPI_(UINT) DragQueryFileA(HDROP,UINT,LPSTR,UINT); 58 SHSTDAPI_(UINT) DragQueryFileW(HDROP,UINT,LPWSTR,UINT); 59 SHSTDAPI_(WINBOOL) DragQueryPoint(HDROP,LPPOINT); 60 SHSTDAPI_(void) DragFinish(HDROP); 61 SHSTDAPI_(void) DragAcceptFiles(HWND,WINBOOL); 62 SHSTDAPI_(HINSTANCE) ShellExecuteA(HWND hwnd,LPCSTR lpOperation,LPCSTR lpFile,LPCSTR lpParameters,LPCSTR lpDirectory,INT nShowCmd); 63 SHSTDAPI_(HINSTANCE) ShellExecuteW(HWND hwnd,LPCWSTR lpOperation,LPCWSTR lpFile,LPCWSTR lpParameters,LPCWSTR lpDirectory,INT nShowCmd); 64 SHSTDAPI_(HINSTANCE) FindExecutableA(LPCSTR lpFile,LPCSTR lpDirectory,LPSTR lpResult); 65 SHSTDAPI_(HINSTANCE) FindExecutableW(LPCWSTR lpFile,LPCWSTR lpDirectory,LPWSTR lpResult); 66 SHSTDAPI_(LPWSTR *) CommandLineToArgvW(LPCWSTR lpCmdLine,int*pNumArgs); 67 SHSTDAPI_(INT) ShellAboutA(HWND hWnd,LPCSTR szApp,LPCSTR szOtherStuff,HICON hIcon); 68 SHSTDAPI_(INT) ShellAboutW(HWND hWnd,LPCWSTR szApp,LPCWSTR szOtherStuff,HICON hIcon); 69 SHSTDAPI_(HICON) DuplicateIcon(HINSTANCE hInst,HICON hIcon); 70 SHSTDAPI_(HICON) ExtractAssociatedIconA(HINSTANCE hInst,LPSTR lpIconPath,LPWORD lpiIcon); 71 SHSTDAPI_(HICON) ExtractAssociatedIconW(HINSTANCE hInst,LPWSTR lpIconPath,LPWORD lpiIcon); 72 #if (_WIN32_IE >= 0x0601) 73 SHSTDAPI_(HICON) ExtractAssociatedIconExA(HINSTANCE hInst,LPSTR lpIconPath,LPWORD lpiIconIndex,LPWORD lpiIconId); 74 SHSTDAPI_(HICON) ExtractAssociatedIconExW(HINSTANCE hInst,LPWSTR lpIconPath,LPWORD lpiIconIndex,LPWORD lpiIconId); 75 #endif 76 SHSTDAPI_(HICON) ExtractIconA(HINSTANCE hInst,LPCSTR lpszExeFileName,UINT nIconIndex); 77 SHSTDAPI_(HICON) ExtractIconW(HINSTANCE hInst,LPCWSTR lpszExeFileName,UINT nIconIndex); 78 79 typedef struct _DRAGINFOA { 80 UINT uSize; 81 POINT pt; 82 WINBOOL fNC; 83 LPSTR lpFileList; 84 DWORD grfKeyState; 85 } DRAGINFOA,*LPDRAGINFOA; 86 87 typedef struct _DRAGINFOW { 88 UINT uSize; 89 POINT pt; 90 WINBOOL fNC; 91 LPWSTR lpFileList; 92 DWORD grfKeyState; 93 } DRAGINFOW,*LPDRAGINFOW; 94 95 __MINGW_TYPEDEF_AW(DRAGINFO) 96 __MINGW_TYPEDEF_AW(LPDRAGINFO) 97 98 #define ABM_NEW 0x00000000 99 #define ABM_REMOVE 0x00000001 100 #define ABM_QUERYPOS 0x00000002 101 #define ABM_SETPOS 0x00000003 102 #define ABM_GETSTATE 0x00000004 103 #define ABM_GETTASKBARPOS 0x00000005 104 #define ABM_ACTIVATE 0x00000006 105 #define ABM_GETAUTOHIDEBAR 0x00000007 106 #define ABM_SETAUTOHIDEBAR 0x00000008 107 108 #define ABM_WINDOWPOSCHANGED 0x0000009 109 #define ABM_SETSTATE 0x0000000a 110 111 #define ABN_STATECHANGE 0x0000000 112 #define ABN_POSCHANGED 0x0000001 113 #define ABN_FULLSCREENAPP 0x0000002 114 #define ABN_WINDOWARRANGE 0x0000003 115 116 #define ABS_AUTOHIDE 0x0000001 117 #define ABS_ALWAYSONTOP 0x0000002 118 119 #define ABE_LEFT 0 120 #define ABE_TOP 1 121 #define ABE_RIGHT 2 122 #define ABE_BOTTOM 3 123 124 typedef struct _AppBarData { 125 DWORD cbSize; 126 HWND hWnd; 127 UINT uCallbackMessage; 128 UINT uEdge; 129 RECT rc; 130 LPARAM lParam; 131 } APPBARDATA,*PAPPBARDATA; 132 133 #define EIRESID(x) (-1 *(int)(x)) 134 135 #define DoEnvironmentSubst __MINGW_NAME_AW(DoEnvironmentSubst) 136 #define ExtractIconEx __MINGW_NAME_AW(ExtractIconEx) 137 138 SHSTDAPI_(UINT_PTR) SHAppBarMessage(DWORD dwMessage,PAPPBARDATA pData); 139 SHSTDAPI_(DWORD) DoEnvironmentSubstA(LPSTR szString,UINT cchString); 140 SHSTDAPI_(DWORD) DoEnvironmentSubstW(LPWSTR szString,UINT cchString); 141 SHSTDAPI_(UINT) ExtractIconExA(LPCSTR lpszFile,int nIconIndex,HICON *phiconLarge,HICON *phiconSmall,UINT nIcons); 142 SHSTDAPI_(UINT) ExtractIconExW(LPCWSTR lpszFile,int nIconIndex,HICON *phiconLarge,HICON *phiconSmall,UINT nIcons); 143 144 #ifndef FO_MOVE 145 146 #define FO_MOVE 0x0001 147 #define FO_COPY 0x0002 148 #define FO_DELETE 0x0003 149 #define FO_RENAME 0x0004 150 151 #define FOF_MULTIDESTFILES 0x0001 152 #define FOF_CONFIRMMOUSE 0x0002 153 #define FOF_SILENT 0x0004 154 #define FOF_RENAMEONCOLLISION 0x0008 155 #define FOF_NOCONFIRMATION 0x0010 156 #define FOF_WANTMAPPINGHANDLE 0x0020 157 158 #define FOF_ALLOWUNDO 0x0040 159 #define FOF_FILESONLY 0x0080 160 #define FOF_SIMPLEPROGRESS 0x0100 161 #define FOF_NOCONFIRMMKDIR 0x0200 162 #define FOF_NOERRORUI 0x0400 163 #define FOF_NOCOPYSECURITYATTRIBS 0x0800 164 #define FOF_NORECURSION 0x1000 165 #define FOF_NO_CONNECTED_ELEMENTS 0x2000 166 #define FOF_WANTNUKEWARNING 0x4000 167 #define FOF_NORECURSEREPARSE 0x8000 168 169 typedef WORD FILEOP_FLAGS; 170 171 #define PO_DELETE 0x0013 172 #define PO_RENAME 0x0014 173 #define PO_PORTCHANGE 0x0020 174 175 #define PO_REN_PORT 0x0034 176 177 typedef WORD PRINTEROP_FLAGS; 178 #endif 179 180 typedef struct _SHFILEOPSTRUCTA { 181 HWND hwnd; 182 UINT wFunc; 183 LPCSTR pFrom; 184 LPCSTR pTo; 185 FILEOP_FLAGS fFlags; 186 WINBOOL fAnyOperationsAborted; 187 LPVOID hNameMappings; 188 LPCSTR lpszProgressTitle; 189 } SHFILEOPSTRUCTA,*LPSHFILEOPSTRUCTA; 190 191 typedef struct _SHFILEOPSTRUCTW { 192 HWND hwnd; 193 UINT wFunc; 194 LPCWSTR pFrom; 195 LPCWSTR pTo; 196 FILEOP_FLAGS fFlags; 197 WINBOOL fAnyOperationsAborted; 198 LPVOID hNameMappings; 199 LPCWSTR lpszProgressTitle; 200 } SHFILEOPSTRUCTW,*LPSHFILEOPSTRUCTW; 201 202 __MINGW_TYPEDEF_AW(SHFILEOPSTRUCT) 203 __MINGW_TYPEDEF_AW(LPSHFILEOPSTRUCT) 204 205 #define SHFileOperation __MINGW_NAME_AW(SHFileOperation) 206 207 SHSTDAPI_(int) SHFileOperationA(LPSHFILEOPSTRUCTA lpFileOp); 208 SHSTDAPI_(int) SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp); 209 SHSTDAPI_(void) SHFreeNameMappings(HANDLE hNameMappings); 210 211 typedef struct _SHNAMEMAPPINGA { 212 LPSTR pszOldPath; 213 LPSTR pszNewPath; 214 int cchOldPath; 215 int cchNewPath; 216 } SHNAMEMAPPINGA,*LPSHNAMEMAPPINGA; 217 218 typedef struct _SHNAMEMAPPINGW { 219 LPWSTR pszOldPath; 220 LPWSTR pszNewPath; 221 int cchOldPath; 222 int cchNewPath; 223 } SHNAMEMAPPINGW,*LPSHNAMEMAPPINGW; 224 225 __MINGW_TYPEDEF_AW(SHNAMEMAPPING) 226 __MINGW_TYPEDEF_AW(LPSHNAMEMAPPING) 227 228 #define SE_ERR_FNF 2 229 #define SE_ERR_PNF 3 230 #define SE_ERR_ACCESSDENIED 5 231 #define SE_ERR_OOM 8 232 #define SE_ERR_DLLNOTFOUND 32 233 234 #define SE_ERR_SHARE 26 235 #define SE_ERR_ASSOCINCOMPLETE 27 236 #define SE_ERR_DDETIMEOUT 28 237 #define SE_ERR_DDEFAIL 29 238 #define SE_ERR_DDEBUSY 30 239 #define SE_ERR_NOASSOC 31 240 241 #define SEE_MASK_CLASSNAME 0x00000001 242 #define SEE_MASK_CLASSKEY 0x00000003 243 244 #define SEE_MASK_IDLIST 0x00000004 245 #define SEE_MASK_INVOKEIDLIST 0x0000000c 246 #define SEE_MASK_ICON 0x00000010 247 #define SEE_MASK_HOTKEY 0x00000020 248 #define SEE_MASK_NOCLOSEPROCESS 0x00000040 249 #define SEE_MASK_CONNECTNETDRV 0x00000080 250 #define SEE_MASK_FLAG_DDEWAIT 0x00000100 251 #define SEE_MASK_DOENVSUBST 0x00000200 252 #define SEE_MASK_FLAG_NO_UI 0x00000400 253 #define SEE_MASK_UNICODE 0x00004000 254 #define SEE_MASK_NO_CONSOLE 0x00008000 255 #define SEE_MASK_ASYNCOK 0x00100000 256 #define SEE_MASK_HMONITOR 0x00200000 257 #if (_WIN32_IE >= 0x0560) 258 #define SEE_MASK_NOZONECHECKS 0x00800000 259 #endif 260 #define SEE_MASK_NOQUERYCLASSSTORE 0x01000000 261 #define SEE_MASK_WAITFORINPUTIDLE 0x02000000 262 #if (_WIN32_IE >= 0x0560) 263 #define SEE_MASK_FLAG_LOG_USAGE 0x04000000 264 #endif 265 266 typedef struct _SHELLEXECUTEINFOA { 267 DWORD cbSize; 268 ULONG fMask; 269 HWND hwnd; 270 LPCSTR lpVerb; 271 LPCSTR lpFile; 272 LPCSTR lpParameters; 273 LPCSTR lpDirectory; 274 int nShow; 275 HINSTANCE hInstApp; 276 LPVOID lpIDList; 277 LPCSTR lpClass; 278 HKEY hkeyClass; 279 DWORD dwHotKey; 280 __C89_NAMELESS union { 281 HANDLE hIcon; 282 HANDLE hMonitor; 283 } DUMMYUNIONNAME; 284 HANDLE hProcess; 285 } SHELLEXECUTEINFOA,*LPSHELLEXECUTEINFOA; 286 287 typedef struct _SHELLEXECUTEINFOW { 288 DWORD cbSize; 289 ULONG fMask; 290 HWND hwnd; 291 LPCWSTR lpVerb; 292 LPCWSTR lpFile; 293 LPCWSTR lpParameters; 294 LPCWSTR lpDirectory; 295 int nShow; 296 HINSTANCE hInstApp; 297 LPVOID lpIDList; 298 LPCWSTR lpClass; 299 HKEY hkeyClass; 300 DWORD dwHotKey; 301 __C89_NAMELESS union { 302 HANDLE hIcon; 303 HANDLE hMonitor; 304 } DUMMYUNIONNAME; 305 HANDLE hProcess; 306 } SHELLEXECUTEINFOW,*LPSHELLEXECUTEINFOW; 307 308 __MINGW_TYPEDEF_AW(SHELLEXECUTEINFO) 309 __MINGW_TYPEDEF_AW(LPSHELLEXECUTEINFO) 310 311 #define ShellExecuteEx __MINGW_NAME_AW(ShellExecuteEx) 312 #define WinExecError __MINGW_NAME_AW(WinExecError) 313 314 SHSTDAPI_(WINBOOL) ShellExecuteExA(LPSHELLEXECUTEINFOA lpExecInfo); 315 SHSTDAPI_(WINBOOL) ShellExecuteExW(LPSHELLEXECUTEINFOW lpExecInfo); 316 SHSTDAPI_(void) WinExecErrorA(HWND hwnd,int error,LPCSTR lpstrFileName,LPCSTR lpstrTitle); 317 SHSTDAPI_(void) WinExecErrorW(HWND hwnd,int error,LPCWSTR lpstrFileName,LPCWSTR lpstrTitle); 318 319 typedef struct _SHCREATEPROCESSINFOW { 320 DWORD cbSize; 321 ULONG fMask; 322 HWND hwnd; 323 LPCWSTR pszFile; 324 LPCWSTR pszParameters; 325 LPCWSTR pszCurrentDirectory; 326 HANDLE hUserToken; 327 LPSECURITY_ATTRIBUTES lpProcessAttributes; 328 LPSECURITY_ATTRIBUTES lpThreadAttributes; 329 WINBOOL bInheritHandles; 330 DWORD dwCreationFlags; 331 LPSTARTUPINFOW lpStartupInfo; 332 LPPROCESS_INFORMATION lpProcessInformation; 333 } SHCREATEPROCESSINFOW,*PSHCREATEPROCESSINFOW; 334 335 SHSTDAPI_(WINBOOL) SHCreateProcessAsUserW(PSHCREATEPROCESSINFOW pscpi); 336 337 typedef struct _SHQUERYRBINFO { 338 DWORD cbSize; 339 __MINGW_EXTENSION __int64 i64Size; 340 __MINGW_EXTENSION __int64 i64NumItems; 341 } SHQUERYRBINFO,*LPSHQUERYRBINFO; 342 343 #define SHERB_NOCONFIRMATION 0x00000001 344 #define SHERB_NOPROGRESSUI 0x00000002 345 #define SHERB_NOSOUND 0x00000004 346 347 #define SHQueryRecycleBin __MINGW_NAME_AW(SHQueryRecycleBin) 348 #define SHEmptyRecycleBin __MINGW_NAME_AW(SHEmptyRecycleBin) 349 350 SHSTDAPI SHQueryRecycleBinA(LPCSTR pszRootPath,LPSHQUERYRBINFO pSHQueryRBInfo); 351 SHSTDAPI SHQueryRecycleBinW(LPCWSTR pszRootPath,LPSHQUERYRBINFO pSHQueryRBInfo); 352 SHSTDAPI SHEmptyRecycleBinA(HWND hwnd,LPCSTR pszRootPath,DWORD dwFlags); 353 SHSTDAPI SHEmptyRecycleBinW(HWND hwnd,LPCWSTR pszRootPath,DWORD dwFlags); 354 355 typedef struct _NOTIFYICONDATAA { 356 DWORD cbSize; 357 HWND hWnd; 358 UINT uID; 359 UINT uFlags; 360 UINT uCallbackMessage; 361 HICON hIcon; 362 CHAR szTip[128]; 363 DWORD dwState; 364 DWORD dwStateMask; 365 CHAR szInfo[256]; 366 __C89_NAMELESS union { 367 UINT uTimeout; 368 UINT uVersion; 369 } DUMMYUNIONNAME; 370 CHAR szInfoTitle[64]; 371 DWORD dwInfoFlags; 372 #if (_WIN32_IE >= 0x600) 373 GUID guidItem; 374 #endif 375 } NOTIFYICONDATAA,*PNOTIFYICONDATAA; 376 377 typedef struct _NOTIFYICONDATAW { 378 DWORD cbSize; 379 HWND hWnd; 380 UINT uID; 381 UINT uFlags; 382 UINT uCallbackMessage; 383 HICON hIcon; 384 WCHAR szTip[128]; 385 DWORD dwState; 386 DWORD dwStateMask; 387 WCHAR szInfo[256]; 388 __C89_NAMELESS union { 389 UINT uTimeout; 390 UINT uVersion; 391 } DUMMYUNIONNAME; 392 WCHAR szInfoTitle[64]; 393 DWORD dwInfoFlags; 394 #if (_WIN32_IE >= 0x600) 395 GUID guidItem; 396 #endif 397 } NOTIFYICONDATAW,*PNOTIFYICONDATAW; 398 399 __MINGW_TYPEDEF_AW(NOTIFYICONDATA) 400 __MINGW_TYPEDEF_AW(PNOTIFYICONDATA) 401 402 #define NOTIFYICONDATAA_V1_SIZE FIELD_OFFSET(NOTIFYICONDATAA,szTip[64]) 403 #define NOTIFYICONDATAW_V1_SIZE FIELD_OFFSET(NOTIFYICONDATAW,szTip[64]) 404 405 #define NOTIFYICONDATAA_V2_SIZE FIELD_OFFSET(NOTIFYICONDATAA,guidItem) 406 #define NOTIFYICONDATAW_V2_SIZE FIELD_OFFSET(NOTIFYICONDATAW,guidItem) 407 408 #define NOTIFYICONDATA_V1_SIZE __MINGW_NAME_AW_EXT(NOTIFYICONDATA,_V1_SIZE) 409 #define NOTIFYICONDATA_V2_SIZE __MINGW_NAME_AW_EXT(NOTIFYICONDATA,_V2_SIZE) 410 411 412 #define NIN_SELECT (WM_USER + 0) 413 #define NINF_KEY 0x1 414 #define NIN_KEYSELECT (NIN_SELECT | NINF_KEY) 415 #define NIN_BALLOONSHOW (WM_USER + 2) 416 #define NIN_BALLOONHIDE (WM_USER + 3) 417 #define NIN_BALLOONTIMEOUT (WM_USER + 4) 418 #define NIN_BALLOONUSERCLICK (WM_USER + 5) 419 #define NIM_ADD 0x00000000 420 #define NIM_MODIFY 0x00000001 421 #define NIM_DELETE 0x00000002 422 #define NIM_SETFOCUS 0x00000003 423 #define NIM_SETVERSION 0x00000004 424 #define NOTIFYICON_VERSION 3 425 #if (_WIN32_WINNT >= 0x600) 426 #define NOTIFYICON_VERSION_4 4 427 #endif 428 429 #define NIF_MESSAGE 0x00000001 430 #define NIF_ICON 0x00000002 431 #define NIF_TIP 0x00000004 432 #define NIF_STATE 0x00000008 433 #define NIF_INFO 0x00000010 434 #if (_WIN32_IE >= 0x600) 435 #define NIF_GUID 0x00000020 436 #endif 437 438 #define NIS_HIDDEN 0x00000001 439 #define NIS_SHAREDICON 0x00000002 440 441 #define NIIF_NONE 0x00000000 442 #define NIIF_INFO 0x00000001 443 #define NIIF_WARNING 0x00000002 444 #define NIIF_ERROR 0x00000003 445 #if (_WIN32_IE >= 0x0600) 446 #define NIIF_USER 0x00000004 447 #endif 448 #define NIIF_ICON_MASK 0x0000000F 449 #define NIIF_NOSOUND 0x00000010 450 451 #define Shell_NotifyIcon __MINGW_NAME_AW(Shell_NotifyIcon) 452 453 SHSTDAPI_(WINBOOL) Shell_NotifyIconA(DWORD dwMessage,PNOTIFYICONDATAA lpData); 454 SHSTDAPI_(WINBOOL) Shell_NotifyIconW(DWORD dwMessage,PNOTIFYICONDATAW lpData); 455 456 #ifndef SHFILEINFO_DEFINED 457 #define SHFILEINFO_DEFINED 458 typedef struct _SHFILEINFOA { 459 HICON hIcon; 460 int iIcon; 461 DWORD dwAttributes; 462 CHAR szDisplayName[MAX_PATH]; 463 CHAR szTypeName[80]; 464 } SHFILEINFOA; 465 466 typedef struct _SHFILEINFOW { 467 HICON hIcon; 468 int iIcon; 469 DWORD dwAttributes; 470 WCHAR szDisplayName[MAX_PATH]; 471 WCHAR szTypeName[80]; 472 } SHFILEINFOW; 473 474 __MINGW_TYPEDEF_AW(SHFILEINFO) 475 #endif 476 477 #define SHGFI_ICON 0x000000100 478 #define SHGFI_DISPLAYNAME 0x000000200 479 #define SHGFI_TYPENAME 0x000000400 480 #define SHGFI_ATTRIBUTES 0x000000800 481 #define SHGFI_ICONLOCATION 0x000001000 482 #define SHGFI_EXETYPE 0x000002000 483 #define SHGFI_SYSICONINDEX 0x000004000 484 #define SHGFI_LINKOVERLAY 0x000008000 485 #define SHGFI_SELECTED 0x000010000 486 #define SHGFI_ATTR_SPECIFIED 0x000020000 487 #define SHGFI_LARGEICON 0x000000000 488 #define SHGFI_SMALLICON 0x000000001 489 #define SHGFI_OPENICON 0x000000002 490 #define SHGFI_SHELLICONSIZE 0x000000004 491 #define SHGFI_PIDL 0x000000008 492 #define SHGFI_USEFILEATTRIBUTES 0x000000010 493 #define SHGFI_ADDOVERLAYS 0x000000020 494 #define SHGFI_OVERLAYINDEX 0x000000040 495 496 #define SHGetFileInfo __MINGW_NAME_AW(SHGetFileInfo) 497 #define SHGetDiskFreeSpaceEx __MINGW_NAME_AW(SHGetDiskFreeSpaceEx) 498 #define SHGetNewLinkInfo __MINGW_NAME_AW(SHGetNewLinkInfo) 499 500 SHSTDAPI_(DWORD_PTR) SHGetFileInfoA(LPCSTR pszPath,DWORD dwFileAttributes,SHFILEINFOA *psfi,UINT cbFileInfo,UINT uFlags); 501 SHSTDAPI_(DWORD_PTR) SHGetFileInfoW(LPCWSTR pszPath,DWORD dwFileAttributes,SHFILEINFOW *psfi,UINT cbFileInfo,UINT uFlags); 502 #define SHGetDiskFreeSpace SHGetDiskFreeSpaceEx 503 SHSTDAPI_(WINBOOL) SHGetDiskFreeSpaceExA(LPCSTR pszDirectoryName,ULARGE_INTEGER *pulFreeBytesAvailableToCaller,ULARGE_INTEGER *pulTotalNumberOfBytes,ULARGE_INTEGER *pulTotalNumberOfFreeBytes); 504 SHSTDAPI_(WINBOOL) SHGetDiskFreeSpaceExW(LPCWSTR pszDirectoryName,ULARGE_INTEGER *pulFreeBytesAvailableToCaller,ULARGE_INTEGER *pulTotalNumberOfBytes,ULARGE_INTEGER *pulTotalNumberOfFreeBytes); 505 SHSTDAPI_(WINBOOL) SHGetNewLinkInfoA(LPCSTR pszLinkTo,LPCSTR pszDir,LPSTR pszName,WINBOOL *pfMustCopy,UINT uFlags); 506 SHSTDAPI_(WINBOOL) SHGetNewLinkInfoW(LPCWSTR pszLinkTo,LPCWSTR pszDir,LPWSTR pszName,WINBOOL *pfMustCopy,UINT uFlags); 507 508 #define SHGNLI_PIDL 0x000000001 509 #define SHGNLI_PREFIXNAME 0x000000002 510 #define SHGNLI_NOUNIQUE 0x000000004 511 #define SHGNLI_NOLNK 0x000000008 512 513 #define PRINTACTION_OPEN 0 514 #define PRINTACTION_PROPERTIES 1 515 #define PRINTACTION_NETINSTALL 2 516 #define PRINTACTION_NETINSTALLLINK 3 517 #define PRINTACTION_TESTPAGE 4 518 #define PRINTACTION_OPENNETPRN 5 519 #ifdef WINNT 520 #define PRINTACTION_DOCUMENTDEFAULTS 6 521 #define PRINTACTION_SERVERPROPERTIES 7 522 #endif 523 524 #define SHInvokePrinterCommand __MINGW_NAME_AW(SHInvokePrinterCommand) 525 526 SHSTDAPI_(WINBOOL) SHInvokePrinterCommandA(HWND hwnd,UINT uAction,LPCSTR lpBuf1,LPCSTR lpBuf2,WINBOOL fModal); 527 SHSTDAPI_(WINBOOL) SHInvokePrinterCommandW(HWND hwnd,UINT uAction,LPCWSTR lpBuf1,LPCWSTR lpBuf2,WINBOOL fModal); 528 SHSTDAPI SHLoadNonloadedIconOverlayIdentifiers(void); 529 SHSTDAPI SHIsFileAvailableOffline(LPCWSTR pwszPath,LPDWORD pdwStatus); 530 531 #define OFFLINE_STATUS_LOCAL 0x0001 532 #define OFFLINE_STATUS_REMOTE 0x0002 533 #define OFFLINE_STATUS_INCOMPLETE 0x0004 534 535 SHSTDAPI SHSetLocalizedName(LPWSTR pszPath,LPCWSTR pszResModule,int idsRes); 536 537 #if (_WIN32_IE >= 0x0601) 538 539 #define ShellMessageBox __MINGW_NAME_AW(ShellMessageBox) 540 541 int __cdecl ShellMessageBoxA(HINSTANCE hAppInst,HWND hWnd,LPCSTR lpcText,LPCSTR lpcTitle,UINT fuStyle,...); 542 int __cdecl ShellMessageBoxW(HINSTANCE hAppInst,HWND hWnd,LPCWSTR lpcText,LPCWSTR lpcTitle,UINT fuStyle,...); 543 #endif 544 545 #if (_WIN32_IE >= 0x0601) 546 547 #define IsLFNDrive __MINGW_NAME_AW(IsLFNDrive) 548 549 SHSTDAPI_(WINBOOL) IsLFNDriveA(LPCSTR pszPath); 550 SHSTDAPI_(WINBOOL) IsLFNDriveW(LPCWSTR pszPath); 551 #endif 552 553 #if _WIN32_IE >= 0x0600 554 555 #define SHEnumerateUnreadMailAccounts __MINGW_NAME_AW(SHEnumerateUnreadMailAccounts) 556 #define SHGetUnreadMailCount __MINGW_NAME_AW(SHGetUnreadMailCount) 557 #define SHSetUnreadMailCount __MINGW_NAME_AW(SHSetUnreadMailCount) 558 559 STDAPI SHEnumerateUnreadMailAccountsA(HKEY hKeyUser,DWORD dwIndex,LPSTR pszMailAddress,int cchMailAddress); 560 STDAPI SHEnumerateUnreadMailAccountsW(HKEY hKeyUser,DWORD dwIndex,LPWSTR pszMailAddress,int cchMailAddress); 561 STDAPI SHGetUnreadMailCountA(HKEY hKeyUser,LPCSTR pszMailAddress,DWORD *pdwCount,FILETIME *pFileTime,LPSTR pszShellExecuteCommand,int cchShellExecuteCommand); 562 STDAPI SHGetUnreadMailCountW(HKEY hKeyUser,LPCWSTR pszMailAddress,DWORD *pdwCount,FILETIME *pFileTime,LPWSTR pszShellExecuteCommand,int cchShellExecuteCommand); 563 STDAPI SHSetUnreadMailCountA(LPCSTR pszMailAddress,DWORD dwCount,LPCSTR pszShellExecuteCommand); 564 STDAPI SHSetUnreadMailCountW(LPCWSTR pszMailAddress,DWORD dwCount,LPCWSTR pszShellExecuteCommand); 565 #endif 566 567 #if (_WIN32_IE >= 0x0601) 568 STDAPI_(WINBOOL) SHTestTokenMembership(HANDLE hToken,ULONG ulRID); 569 #endif 570 571 #if _WIN32_IE >= 0x0600 572 573 STDAPI SHGetImageList(int iImageList,REFIID riid,void **ppvObj); 574 575 #define SHIL_LARGE 0x0 576 #define SHIL_SMALL 0x1 577 #define SHIL_EXTRALARGE 0x2 578 #define SHIL_SYSSMALL 0x3 579 #if (_WIN32_WINNT >= 0x600) 580 # define SHIL_JUMBO 0x4 581 # define SHIL_LAST SHIL_JUMBO 582 #else 583 # define SHIL_LAST SHIL_SYSSMALL 584 #endif 585 typedef HRESULT (WINAPI *PFNCANSHAREFOLDERW)(LPCWSTR pszPath); 586 typedef HRESULT (WINAPI *PFNSHOWSHAREFOLDERUIW)(HWND hwndParent,LPCWSTR pszPath); 587 #endif 588 589 typedef struct _SHSTOCKICONINFO { 590 DWORD cbSize; 591 HICON hIcon; 592 int iSysImageIndex; 593 int iIcon; 594 WCHAR szPath[MAX_PATH]; 595 } SHSTOCKICONINFO; 596 597 #define SHGSI_ICONLOCATION 0 598 #define SHGSI_ICON SHGFI_ICON 599 #define SHGSI_SYSICONINDEX SHGFI_SYSICONINDEX 600 #define SHGSI_LINKOVERLAY SHGFI_LINKOVERLAY 601 #define SHGSI_SELECTED SHGFI_SELECTED 602 #define SHGSI_LARGEICON SHGFI_LARGEICON 603 #define SHGSI_SMALLICON SHGFI_SMALLICON 604 #define SHGSI_SHELLICONSIZE SHGFI_SHELLICONSIZE 605 606 typedef enum SHSTOCKICONID { 607 SIID_DOCNOASSOC = 0, 608 SIID_DOCASSOC = 1, 609 SIID_APPLICATION = 2, 610 SIID_FOLDER = 3, 611 SIID_FOLDEROPEN = 4, 612 SIID_DRIVE525 = 5, 613 SIID_DRIVE35 = 6, 614 SIID_DRIVEREMOVE = 7, 615 SIID_DRIVEFIXED = 8, 616 SIID_DRIVENET = 9, 617 SIID_DRIVENETDISABLED = 10, 618 SIID_DRIVECD = 11, 619 SIID_DRIVERAM = 12, 620 SIID_WORLD = 13, 621 SIID_SERVER = 15, 622 SIID_PRINTER = 16, 623 SIID_MYNETWORK = 17, 624 SIID_FIND = 22, 625 SIID_HELP = 23, 626 SIID_SHARE = 28, 627 SIID_LINK = 29, 628 SIID_SLOWFILE = 30, 629 SIID_RECYCLER = 31, 630 SIID_RECYCLERFULL = 32, 631 SIID_MEDIACDAUDIO = 40, 632 SIID_LOCK = 47, 633 SIID_AUTOLIST = 49, 634 SIID_PRINTERNET = 50, 635 SIID_SERVERSHARE = 51, 636 SIID_PRINTERFAX = 52, 637 SIID_PRINTERFAXNET = 53, 638 SIID_PRINTERFILE = 54, 639 SIID_STACK = 55, 640 SIID_MEDIASVCD = 56, 641 SIID_STUFFEDFOLDER = 57, 642 SIID_DRIVEUNKNOWN = 58, 643 SIID_DRIVEDVD = 59, 644 SIID_MEDIADVD = 60, 645 SIID_MEDIADVDRAM = 61, 646 SIID_MEDIADVDRW = 62, 647 SIID_MEDIADVDR = 63, 648 SIID_MEDIADVDROM = 64, 649 SIID_MEDIACDAUDIOPLUS = 65, 650 SIID_MEDIACDRW = 66, 651 SIID_MEDIACDR = 67, 652 SIID_MEDIACDBURN = 68, 653 SIID_MEDIABLANKCD = 69, 654 SIID_MEDIACDROM = 70, 655 SIID_AUDIOFILES = 71, 656 SIID_IMAGEFILES = 72, 657 SIID_VIDEOFILES = 73, 658 SIID_MIXEDFILES = 74, 659 SIID_FOLDERBACK = 75, 660 SIID_FOLDERFRONT = 76, 661 SIID_SHIELD = 77, 662 SIID_WARNING = 78, 663 SIID_INFO = 79, 664 SIID_ERROR = 80, 665 SIID_KEY = 81, 666 SIID_SOFTWARE = 82, 667 SIID_RENAME = 83, 668 SIID_DELETE = 84, 669 SIID_MEDIAAUDIODVD = 85, 670 SIID_MEDIAMOVIEDVD = 86, 671 SIID_MEDIAENHANCEDCD = 87, 672 SIID_MEDIAENHANCEDDVD = 88, 673 SIID_MEDIAHDDVD = 89, 674 SIID_MEDIABLURAY = 90, 675 SIID_MEDIAVCD = 91, 676 SIID_MEDIADVDPLUSR = 92, 677 SIID_MEDIADVDPLUSRW = 93, 678 SIID_DESKTOPPC = 94, 679 SIID_MOBILEPC = 95, 680 SIID_USERS = 96, 681 SIID_MEDIASMARTMEDIA = 97, 682 SIID_MEDIACOMPACTFLASH = 98, 683 SIID_DEVICECELLPHONE = 99, 684 SIID_DEVICECAMERA = 100, 685 SIID_DEVICEVIDEOCAMERA = 101, 686 SIID_DEVICEAUDIOPLAYER = 102, 687 SIID_NETWORKCONNECT = 103, 688 SIID_INTERNET = 104, 689 SIID_ZIPFILE = 105, 690 SIID_SETTINGS = 106, 691 SIID_DRIVEHDDVD = 132, 692 SIID_DRIVEBD = 133, 693 SIID_MEDIAHDDVDROM = 134, 694 SIID_MEDIAHDDVDR = 135, 695 SIID_MEDIAHDDVDRAM = 136, 696 SIID_MEDIABDROM = 137, 697 SIID_MEDIABDR = 138, 698 SIID_MEDIABDRE = 139, 699 SIID_CLUSTEREDDRIVE = 140, 700 SIID_MAX_ICONS = 174 701 } SHSTOCKICONID; 702 703 #define SIID_INVALID ((SHSTOCKICONID)-1) 704 705 #ifdef __cplusplus 706 } 707 #endif 708 709 #if !defined(_WIN64) 710 #include <poppack.h> 711 #endif 712 #endif 713