1 /* 2 * Copyright (C) the Wine project 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Lesser General Public 6 * License as published by the Free Software Foundation; either 7 * version 2.1 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Lesser General Public License for more details. 13 * 14 * You should have received a copy of the GNU Lesser General Public 15 * License along with this library; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 17 */ 18 19 #ifndef __WINE_SHLOBJ_H 20 #define __WINE_SHLOBJ_H 21 22 #include <ole2.h> 23 #include <commctrl.h> 24 #include <prsht.h> 25 26 #ifndef INITGUID 27 #include <shlguid.h> 28 #endif 29 30 #ifdef WINE_NO_UNICODE_MACROS 31 #undef GetObject 32 #endif 33 34 #ifdef __cplusplus 35 extern "C" { 36 #endif /* defined(__cplusplus) */ 37 38 /* Except for specific structs, this header is byte packed */ 39 #include <pshpack1.h> 40 41 #include <shtypes.h> 42 #include <shobjidl.h> 43 44 #include <pshpack8.h> 45 46 typedef struct 47 { 48 DWORD dwSize; 49 DWORD dwMask; 50 SHELLVIEWID* pvid; 51 LPSTR pszWebViewTemplate; 52 DWORD cchWebViewTemplate; 53 LPSTR pszWebViewTemplateVersion; 54 LPSTR pszInfoTip; 55 DWORD cchInfoTip; 56 CLSID* pclsid; 57 DWORD dwFlags; 58 LPSTR pszIconFile; 59 DWORD cchIconFile; 60 int iIconIndex; 61 LPSTR pszLogo; 62 DWORD cchLogo; 63 } SHFOLDERCUSTOMSETTINGSA, *LPSHFOLDERCUSTOMSETTINGSA; 64 65 typedef struct 66 { 67 DWORD dwSize; 68 DWORD dwMask; 69 SHELLVIEWID* pvid; 70 LPWSTR pszWebViewTemplate; 71 DWORD cchWebViewTemplate; 72 LPWSTR pszWebViewTemplateVersion; 73 LPWSTR pszInfoTip; 74 DWORD cchInfoTip; 75 CLSID* pclsid; 76 DWORD dwFlags; 77 LPWSTR pszIconFile; 78 DWORD cchIconFile; 79 int iIconIndex; 80 LPWSTR pszLogo; 81 DWORD cchLogo; 82 } SHFOLDERCUSTOMSETTINGSW, *LPSHFOLDERCUSTOMSETTINGSW; 83 84 #include <poppack.h> 85 86 #define FCS_READ 0x00000001 87 #define FCS_FORCEWRITE 0x00000002 88 89 #define FCSM_ICONFILE 0x00000010 90 91 #ifndef HPSXA_DEFINED 92 #define HPSXA_DEFINED 93 DECLARE_HANDLE(HPSXA); 94 #endif 95 96 typedef enum 97 { 98 KF_FLAG_DEFAULT = 0x00000000, 99 KF_FLAG_SIMPLE_IDLIST = 0x00000100, 100 KF_FLAG_NOT_PARENT_RELATIVE = 0x00000200, 101 KF_FLAG_DEFAULT_PATH = 0x00000400, 102 KF_FLAG_INIT = 0x00000800, 103 KF_FLAG_NO_ALIAS = 0x00001000, 104 KF_FLAG_DONT_UNEXPAND = 0x00002000, 105 KF_FLAG_DONT_VERIFY = 0x00004000, 106 KF_FLAG_CREATE = 0x00008000, 107 KF_FLAG_NO_APPCONTAINER_REDIRECTION = 0x00010000, 108 KF_FLAG_ALIAS_ONLY = 0x80000000 109 } KNOWN_FOLDER_FLAG; 110 111 typedef int GPFIDL_FLAGS; 112 113 UINT 114 WINAPI 115 SHAddFromPropSheetExtArray( 116 _In_ HPSXA, 117 _In_ LPFNADDPROPSHEETPAGE, 118 LPARAM); 119 120 LPVOID WINAPI SHAlloc(SIZE_T) __WINE_ALLOC_SIZE(1); 121 122 HRESULT 123 WINAPI 124 SHCoCreateInstance( 125 _In_opt_ LPCWSTR, 126 _In_opt_ const CLSID*, 127 _In_opt_ IUnknown*, 128 _In_ REFIID, 129 _Outptr_ LPVOID*); 130 131 HPSXA WINAPI SHCreatePropSheetExtArray(_In_ HKEY, _In_opt_ LPCWSTR, UINT); 132 HPSXA WINAPI SHCreatePropSheetExtArrayEx(HKEY,LPCWSTR,UINT,IDataObject*); 133 HRESULT WINAPI SHCreateQueryCancelAutoPlayMoniker(IMoniker**); 134 135 HRESULT 136 WINAPI 137 SHCreateShellItem( 138 _In_opt_ PCIDLIST_ABSOLUTE, 139 _In_opt_ IShellFolder*, 140 _In_ PCUITEMID_CHILD, 141 _Outptr_ IShellItem**); 142 143 DWORD WINAPI SHCLSIDFromStringA(_In_ LPCSTR, _Out_ CLSID*); 144 DWORD WINAPI SHCLSIDFromStringW(_In_ LPCWSTR, _Out_ CLSID*); 145 #define SHCLSIDFromString WINELIB_NAME_AW(SHCLSIDFromString) 146 147 HRESULT 148 WINAPI 149 SHCreateStdEnumFmtEtc( 150 _In_ UINT cfmt, 151 _In_reads_(cfmt) const FORMATETC *, 152 _Outptr_ IEnumFORMATETC**); 153 154 void WINAPI SHDestroyPropSheetExtArray(_In_ HPSXA); 155 BOOL WINAPI SHFindFiles(_In_opt_ PCIDLIST_ABSOLUTE, _In_opt_ PCIDLIST_ABSOLUTE); 156 DWORD WINAPI SHFormatDrive(_In_ HWND, UINT, UINT, UINT); 157 void WINAPI SHFree(_In_opt_ LPVOID); 158 159 BOOL 160 WINAPI 161 GetFileNameFromBrowse( 162 _In_opt_ HWND, 163 _Inout_updates_(cchFilePath) LPWSTR, 164 UINT cchFilePath, 165 _In_opt_ LPCWSTR, 166 _In_ LPCWSTR, 167 _In_opt_ LPCWSTR, 168 _In_opt_ LPCWSTR); 169 170 _Check_return_ HRESULT WINAPI SHGetInstanceExplorer(_Outptr_ IUnknown**); 171 172 VOID WINAPI SHSetInstanceExplorer(_In_opt_ IUnknown*); 173 174 HRESULT 175 WINAPI 176 SHGetFolderPathAndSubDirA( 177 _Reserved_ HWND, 178 _In_ int, 179 _In_opt_ HANDLE, 180 _In_ DWORD, 181 _In_opt_ LPCSTR, _Out_writes_(MAX_PATH) LPSTR); 182 183 HRESULT 184 WINAPI 185 SHGetFolderPathAndSubDirW( 186 _Reserved_ HWND, 187 _In_ int, 188 _In_opt_ HANDLE, 189 _In_ DWORD, 190 _In_opt_ LPCWSTR, 191 _Out_writes_(MAX_PATH) LPWSTR); 192 193 #define SHGetFolderPathAndSubDir WINELIB_NAME_AW(SHGetFolderPathAndSubDir); 194 195 _Success_(return != 0) 196 BOOL 197 WINAPI 198 SHGetPathFromIDListA( 199 _In_ PCIDLIST_ABSOLUTE, 200 _Out_writes_(MAX_PATH) LPSTR); 201 202 _Success_(return != 0) 203 BOOL 204 WINAPI 205 SHGetPathFromIDListW( 206 _In_ PCIDLIST_ABSOLUTE, 207 _Out_writes_(MAX_PATH) LPWSTR); 208 209 #define SHGetPathFromIDList WINELIB_NAME_AW(SHGetPathFromIDList) 210 211 INT WINAPI SHHandleUpdateImage(_In_ PCIDLIST_ABSOLUTE); 212 213 HRESULT 214 WINAPI 215 SHILCreateFromPath( 216 _In_ PCWSTR, 217 _Outptr_ PIDLIST_ABSOLUTE*, 218 _Inout_opt_ DWORD*); 219 220 HRESULT WINAPI SHLoadOLE(LPARAM); 221 222 HRESULT 223 WINAPI 224 SHParseDisplayName( 225 _In_ PCWSTR, 226 _In_opt_ IBindCtx*, 227 _Outptr_ PIDLIST_ABSOLUTE*, 228 _In_ SFGAOF, 229 _Out_opt_ SFGAOF*); 230 231 HRESULT 232 WINAPI 233 SHPathPrepareForWriteA( 234 _In_opt_ HWND, 235 _In_opt_ IUnknown*, 236 _In_ LPCSTR, DWORD); 237 238 HRESULT 239 WINAPI 240 SHPathPrepareForWriteW( 241 _In_opt_ HWND, 242 _In_opt_ IUnknown*, 243 _In_ LPCWSTR, DWORD); 244 245 #define SHPathPrepareForWrite WINELIB_NAME_AW(SHPathPrepareForWrite); 246 247 UINT 248 WINAPI 249 SHReplaceFromPropSheetExtArray( 250 _In_ HPSXA, 251 UINT, 252 _In_ LPFNADDPROPSHEETPAGE, 253 LPARAM); 254 255 PIDLIST_ABSOLUTE WINAPI SHSimpleIDListFromPath(PCWSTR); 256 257 int 258 WINAPI 259 SHMapPIDLToSystemImageListIndex( 260 _In_ IShellFolder*, 261 _In_ PCUITEMID_CHILD, 262 _Out_opt_ int*); 263 264 HRESULT WINAPI SHStartNetConnectionDialog(HWND,LPCSTR,DWORD); 265 VOID WINAPI SHUpdateImageA(_In_ LPCSTR, INT, UINT, INT); 266 VOID WINAPI SHUpdateImageW(_In_ LPCWSTR, INT, UINT, INT); 267 #define SHUpdateImage WINELIB_NAME_AW(SHUpdateImage) 268 269 INT 270 WINAPI 271 PickIconDlg( 272 _In_opt_ HWND, 273 _Inout_updates_(cchIconPath) LPWSTR, 274 UINT cchIconPath, 275 _Inout_opt_ int *); 276 277 HRESULT 278 WINAPI 279 SHLimitInputEdit( 280 _In_ HWND hwnd, 281 _In_ IShellFolder *folder); 282 283 int WINAPI RestartDialog(_In_opt_ HWND, _In_opt_ LPCWSTR, DWORD); 284 int WINAPI RestartDialogEx(_In_opt_ HWND, _In_opt_ LPCWSTR, DWORD, DWORD); 285 int WINAPI DriveType(int); 286 int WINAPI RealDriveType(int, BOOL); 287 int WINAPI IsNetDrive(int); 288 BOOL WINAPI IsUserAnAdmin(void); 289 290 #define KF_FLAG_DEFAULT_PATH 0x00000400 291 292 #define SHFMT_ERROR 0xFFFFFFFFL /* Error on last format, drive may be formattable */ 293 #define SHFMT_CANCEL 0xFFFFFFFEL /* Last format was cancelled */ 294 #define SHFMT_NOFORMAT 0xFFFFFFFDL /* Drive is not formattable */ 295 296 /* SHFormatDrive flags */ 297 #define SHFMT_ID_DEFAULT 0xFFFF 298 #define SHFMT_OPT_FULL 1 299 #define SHFMT_OPT_SYSONLY 2 300 301 /* SHPathPrepareForWrite flags */ 302 #define SHPPFW_NONE 0x00000000 303 #define SHPPFW_DIRCREATE 0x00000001 304 #define SHPPFW_DEFAULT SHPPFW_DIRCREATE 305 #define SHPPFW_ASKDIRCREATE 0x00000002 306 #define SHPPFW_IGNOREFILENAME 0x00000004 307 #define SHPPFW_NOWRITECHECK 0x00000008 308 #define SHPPFW_MEDIACHECKONLY 0x00000010 309 310 /* SHObjectProperties flags */ 311 #define SHOP_PRINTERNAME 0x01 312 #define SHOP_FILEPATH 0x02 313 #define SHOP_VOLUMEGUID 0x04 314 315 BOOL 316 WINAPI 317 SHObjectProperties( 318 _In_opt_ HWND, 319 _In_ DWORD, 320 _In_ LPCWSTR, 321 _In_opt_ LPCWSTR); 322 323 HRESULT 324 WINAPI 325 SHOpenFolderAndSelectItems( 326 _In_ PCIDLIST_ABSOLUTE pidlFolder, 327 _In_ UINT cidl, 328 _In_reads_opt_(cidl) PCUITEMID_CHILD_ARRAY, 329 _In_ DWORD); 330 331 #define PCS_FATAL 0x80000000 332 #define PCS_REPLACEDCHAR 0x00000001 333 #define PCS_REMOVEDCHAR 0x00000002 334 #define PCS_TRUNCATED 0x00000004 335 #define PCS_PATHTOOLONG 0x00000008 336 337 int WINAPI PathCleanupSpec(_In_opt_ LPCWSTR, _Inout_ LPWSTR); 338 339 /***************************************************************************** 340 * IContextMenu interface 341 */ 342 343 344 /* DATAOBJECT_InitShellIDList*/ 345 #define CFSTR_SHELLIDLISTA "Shell IDList Array" /* CF_IDLIST */ 346 #define CFSTR_SHELLIDLISTOFFSETA "Shell Object Offsets" /* CF_OBJECTPOSITIONS */ 347 #define CFSTR_NETRESOURCESA "Net Resource" /* CF_NETRESOURCE */ 348 /* DATAOBJECT_InitFileGroupDesc */ 349 #define CFSTR_FILEDESCRIPTORA "FileGroupDescriptor" /* CF_FILEGROUPDESCRIPTORA */ 350 /* DATAOBJECT_InitFileContents*/ 351 #define CFSTR_FILECONTENTSA "FileContents" /* CF_FILECONTENTS */ 352 #define CFSTR_FILENAMEA "FileName" /* CF_FILENAMEA */ 353 #define CFSTR_FILENAMEMAPA "FileNameMap" /* CF_FILENAMEMAPA */ 354 #define CFSTR_PRINTERGROUPA "PrinterFriendlyName" /* CF_PRINTERS */ 355 #define CFSTR_SHELLURLA "UniformResourceLocator" 356 #define CFSTR_INETURLA CFSTR_SHELLURLA 357 #define CFSTR_PREFERREDDROPEFFECTA "Preferred DropEffect" 358 #define CFSTR_PERFORMEDDROPEFFECTA "Performed DropEffect" 359 #define CFSTR_PASTESUCCEEDEDA "Paste Succeeded" 360 #define CFSTR_INDRAGLOOPA "InShellDragLoop" 361 #define CFSTR_DRAGCONTEXTA "DragContext" 362 #define CFSTR_MOUNTEDVOLUMEA "MountedVolume" 363 #define CFSTR_PERSISTEDDATAOBJECTA "PersistedDataObject" 364 #define CFSTR_TARGETCLSIDA "TargetCLSID" 365 #define CFSTR_AUTOPLAY_SHELLIDLISTSA "Autoplay Enumerated IDList Array" 366 #define CFSTR_LOGICALPERFORMEDDROPEFFECTA "Logical Performed DropEffect" 367 368 #if defined(__GNUC__) 369 # define CFSTR_SHELLIDLISTW \ 370 (const WCHAR []){ 'S','h','e','l','l',' ','I','D','L','i','s','t',' ','A','r','r','a','y',0 } 371 # define CFSTR_SHELLIDLISTOFFSETW \ 372 (const WCHAR []){ 'S','h','e','l','l',' ','O','b','j','e','c','t',' ','O','f','f','s','e','t','s',0 } 373 # define CFSTR_NETRESOURCESW \ 374 (const WCHAR []){ 'N','e','t',' ','R','e','s','o','u','r','c','e',0 } 375 # define CFSTR_FILEDESCRIPTORW \ 376 (const WCHAR []){ 'F','i','l','e','G','r','o','u','p','D','e','s','c','r','i','p','t','o','r','W',0 } 377 # define CFSTR_FILECONTENTSW \ 378 (const WCHAR []){ 'F','i','l','e','C','o','n','t','e','n','t','s',0 } 379 # define CFSTR_FILENAMEW \ 380 (const WCHAR []){ 'F','i','l','e','N','a','m','e','W',0 } 381 # define CFSTR_FILENAMEMAPW \ 382 (const WCHAR []){ 'F','i','l','e','N','a','m','e','M','a','p','W',0 } 383 # define CFSTR_PRINTERGROUPW \ 384 (const WCHAR []){ 'P','r','i','n','t','e','r','F','r','i','e','n','d','l','y','N','a','m','e',0 } 385 # define CFSTR_SHELLURLW \ 386 (const WCHAR []){ 'U','n','i','f','o','r','m','R','e','s','o','u','r','c','e','L','o','c','a','t','o','r',0 } 387 # define CFSTR_INETURLW \ 388 (const WCHAR []){ 'U','n','i','f','o','r','m','R','e','s','o','u','r','c','e','L','o','c','a','t','o','r','W',0 } 389 # define CFSTR_PREFERREDDROPEFFECTW \ 390 (const WCHAR []){ 'P','r','e','f','e','r','r','e','d',' ','D','r','o','p','E','f','f','e','c','t',0 } 391 # define CFSTR_PERFORMEDDROPEFFECTW \ 392 (const WCHAR []){ 'P','e','r','f','o','r','m','e','d',' ','D','r','o','p','E','f','f','e','c','t',0 } 393 # define CFSTR_PASTESUCCEEDEDW \ 394 (const WCHAR []){ 'P','a','s','t','e',' ','S','u','c','c','e','e','d','e','d',0 } 395 # define CFSTR_INDRAGLOOPW \ 396 (const WCHAR []){ 'I','n','S','h','e','l','l','D','r','a','g','L','o','o','p',0 } 397 # define CFSTR_DRAGCONTEXTW \ 398 (const WCHAR []){ 'D','r','a','g','C','o','n','t','e','x','t',0 } 399 # define CFSTR_MOUNTEDVOLUMEW \ 400 (const WCHAR []){ 'M','o','u','n','t','e','d','V','o','l','u','m','e',0 } 401 # define CFSTR_PERSISTEDDATAOBJECTW \ 402 (const WCHAR []){ 'P','e','r','s','i','s','t','e','d','D','a','t','a','O','b','j','e','c','t',0 } 403 # define CFSTR_TARGETCLSIDW \ 404 (const WCHAR []){ 'T','a','r','g','e','t','C','L','S','I','D',0 } 405 # define CFSTR_AUTOPLAY_SHELLIDLISTSW \ 406 (const WCHAR []){ 'A','u','t','o','p','l','a','y',' ','E','n','u','m','e','r','a','t','e','d',\ 407 ' ','I','D','L','i','s','t',' ','A','r','r','a','y',0 } 408 # define CFSTR_LOGICALPERFORMEDDROPEFFECTW \ 409 (const WCHAR []){ 'L','o','g','i','c','a','l',' ','P','e','r','f','o','r','m','e','d',\ 410 ' ','D','r','o','p','E','f','f','e','c','t',0 } 411 #elif defined(_MSC_VER) 412 # define CFSTR_SHELLIDLISTW L"Shell IDList Array" 413 # define CFSTR_SHELLIDLISTOFFSETW L"Shell Object Offsets" 414 # define CFSTR_NETRESOURCESW L"Net Resource" 415 # define CFSTR_FILEDESCRIPTORW L"FileGroupDescriptorW" 416 # define CFSTR_FILECONTENTSW L"FileContents" 417 # define CFSTR_FILENAMEW L"FileNameW" 418 # define CFSTR_FILENAMEMAPW L"FileNameMapW" 419 # define CFSTR_PRINTERGROUPW L"PrinterFriendlyName" 420 # define CFSTR_SHELLURLW L"UniformResourceLocator" 421 # define CFSTR_INETURLW L"UniformResourceLocatorW" 422 # define CFSTR_PREFERREDDROPEFFECTW L"Preferred DropEffect" 423 # define CFSTR_PERFORMEDDROPEFFECTW L"Performed DropEffect" 424 # define CFSTR_PASTESUCCEEDEDW L"Paste Succeeded" 425 # define CFSTR_INDRAGLOOPW L"InShellDragLoop" 426 # define CFSTR_DRAGCONTEXTW L"DragContext" 427 # define CFSTR_MOUNTEDVOLUMEW L"MountedVolume" 428 # define CFSTR_PERSISTEDDATAOBJECTW L"PersistedDataObject" 429 # define CFSTR_TARGETCLSIDW L"TargetCLSID" 430 # define CFSTR_AUTOPLAY_SHELLIDLISTSW L"Autoplay Enumerated IDList Array" 431 # define CFSTR_LOGICALPERFORMEDDROPEFFECTW L"Logical Performed DropEffect" 432 #else 433 static const WCHAR CFSTR_SHELLIDLISTW[] = 434 { 'S','h','e','l','l',' ','I','D','L','i','s','t',' ','A','r','r','a','y',0 }; 435 static const WCHAR CFSTR_SHELLIDLISTOFFSETW[] = 436 { 'S','h','e','l','l',' ','O','b','j','e','c','t',' ','O','f','f','s','e','t','s',0 }; 437 static const WCHAR CFSTR_NETRESOURCESW[] = 438 { 'N','e','t',' ','R','e','s','o','u','r','c','e',0 }; 439 static const WCHAR CFSTR_FILEDESCRIPTORW[] = 440 { 'F','i','l','e','G','r','o','u','p','D','e','s','c','r','i','p','t','o','r','W',0 }; 441 static const WCHAR CFSTR_FILECONTENTSW[] = 442 { 'F','i','l','e','C','o','n','t','e','n','t','s',0 }; 443 static const WCHAR CFSTR_FILENAMEW[] = 444 { 'F','i','l','e','N','a','m','e','W',0 }; 445 static const WCHAR CFSTR_FILENAMEMAPW[] = 446 { 'F','i','l','e','N','a','m','e','M','a','p','W',0 }; 447 static const WCHAR CFSTR_PRINTERGROUPW[] = 448 { 'P','r','i','n','t','e','r','F','r','i','e','n','d','l','y','N','a','m','e',0 }; 449 static const WCHAR CFSTR_SHELLURLW[] = 450 { 'U','n','i','f','o','r','m','R','e','s','o','u','r','c','e','L','o','c','a','t','o','r',0 }; 451 static const WCHAR CFSTR_INETURLW[] = 452 { 'U','n','i','f','o','r','m','R','e','s','o','u','r','c','e','L','o','c','a','t','o','r','W',0 }; 453 static const WCHAR CFSTR_PREFERREDDROPEFFECTW[] = 454 { 'P','r','e','f','e','r','r','e','d',' ','D','r','o','p','E','f','f','e','c','t',0 }; 455 static const WCHAR CFSTR_PERFORMEDDROPEFFECTW[] = 456 { 'P','e','r','f','o','r','m','e','d',' ','D','r','o','p','E','f','f','e','c','t',0 }; 457 static const WCHAR CFSTR_PASTESUCCEEDEDW[] = 458 { 'P','a','s','t','e',' ','S','u','c','c','e','e','d','e','d',0 }; 459 static const WCHAR CFSTR_INDRAGLOOPW[] = 460 { 'I','n','S','h','e','l','l','D','r','a','g','L','o','o','p',0 }; 461 static const WCHAR CFSTR_DRAGCONTEXTW[] = 462 { 'D','r','a','g','C','o','n','t','e','x','t',0 }; 463 static const WCHAR CFSTR_MOUNTEDVOLUMEW[] = 464 { 'M','o','u','n','t','e','d','V','o','l','u','m','e',0 }; 465 static const WCHAR CFSTR_PERSISTEDDATAOBJECTW[] = 466 { 'P','e','r','s','i','s','t','e','d','D','a','t','a','O','b','j','e','c','t',0 }; 467 static const WCHAR CFSTR_TARGETCLSIDW[] = 468 { 'T','a','r','g','e','t','C','L','S','I','D',0 }; 469 static const WCHAR CFSTR_AUTOPLAY_SHELLIDLISTSW[] = 470 { 'A','u','t','o','p','l','a','y',' ','E','n','u','m','e','r','a','t','e','d', 471 ' ','I','D','L','i','s','t',' ','A','r','r','a','y',0 }; 472 static const WCHAR CFSTR_LOGICALPERFORMEDDROPEFFECTW[] = 473 { 'L','o','g','i','c','a','l',' ','P','e','r','f','o','r','m','e','d', 474 ' ','D','r','o','p','E','f','f','e','c','t',0 }; 475 #endif 476 477 #define CFSTR_SHELLIDLIST WINELIB_NAME_AW(CFSTR_SHELLIDLIST) 478 #define CFSTR_SHELLIDLISTOFFSET WINELIB_NAME_AW(CFSTR_SHELLIDLISTOFFSET) 479 #define CFSTR_NETRESOURCES WINELIB_NAME_AW(CFSTR_NETRESOURCES) 480 #define CFSTR_FILEDESCRIPTOR WINELIB_NAME_AW(CFSTR_FILEDESCRIPTOR) 481 #define CFSTR_FILECONTENTS WINELIB_NAME_AW(CFSTR_FILECONTENTS) 482 #define CFSTR_FILENAME WINELIB_NAME_AW(CFSTR_FILENAME) 483 #define CFSTR_FILENAMEMAP WINELIB_NAME_AW(CFSTR_FILENAMEMAP) 484 #define CFSTR_PRINTERGROUP WINELIB_NAME_AW(CFSTR_PRINTERGROUP) 485 #define CFSTR_SHELLURL WINELIB_NAME_AW(CFSTR_SHELLURL) 486 #define CFSTR_INETURL WINELIB_NAME_AW(CFSTR_INETURL) 487 #define CFSTR_PREFERREDDROPEFFECT WINELIB_NAME_AW(CFSTR_PREFERREDDROPEFFECT) 488 #define CFSTR_PERFORMEDDROPEFFECT WINELIB_NAME_AW(CFSTR_PERFORMEDDROPEFFECT) 489 #define CFSTR_PASTESUCCEEDED WINELIB_NAME_AW(CFSTR_PASTESUCCEEDED) 490 #define CFSTR_INDRAGLOOP WINELIB_NAME_AW(CFSTR_INDRAGLOOP) 491 #define CFSTR_DRAGCONTEXT WINELIB_NAME_AW(CFSTR_DRAGCONTEXT) 492 #define CFSTR_MOUNTEDVOLUME WINELIB_NAME_AW(CFSTR_MOUNTEDVOLUME) 493 #define CFSTR_PERSISTEDDATAOBJECT WINELIB_NAME_AW(CFSTR_PERSISTEDDATAOBJECT) 494 #define CFSTR_TARGETCLSID WINELIB_NAME_AW(CFSTR_TARGETCLSID) 495 #define CFSTR_AUTOPLAY_SHELLIDLISTS WINELIB_NAME_AW(CFSTR_AUTOPLAY_SHELLIDLISTS) 496 #define CFSTR_LOGICALPERFORMEDDROPEFFECT WINELIB_NAME_AW(CFSTR_LOGICALPERFORMEDDROPEFFECT) 497 498 typedef struct 499 { UINT cidl; 500 UINT aoffset[1]; 501 } CIDA, *LPIDA; 502 503 /************************************************************************ 504 * IShellView interface 505 */ 506 507 #define FCIDM_SHVIEWFIRST 0x0000 508 /* undocumented */ 509 #define FCIDM_SHVIEW_ARRANGE 0x7001 510 #define FCIDM_SHVIEW_DELETE 0x7011 511 #define FCIDM_SHVIEW_PROPERTIES 0x7013 512 #define FCIDM_SHVIEW_CUT 0x7018 513 #define FCIDM_SHVIEW_COPY 0x7019 514 #define FCIDM_SHVIEW_INSERT 0x701A 515 #define FCIDM_SHVIEW_UNDO 0x701B 516 #define FCIDM_SHVIEW_INSERTLINK 0x701C 517 #define FCIDM_SHVIEW_COPYTO 0x701E 518 #define FCIDM_SHVIEW_MOVETO 0x701F 519 #define FCIDM_SHVIEW_SELECTALL 0x7021 520 #define FCIDM_SHVIEW_INVERTSELECTION 0x7022 521 522 #define FCIDM_SHVIEW_BIGICON 0x7029 523 #define FCIDM_SHVIEW_SMALLICON 0x702A 524 #define FCIDM_SHVIEW_LISTVIEW 0x702B 525 #define FCIDM_SHVIEW_REPORTVIEW 0x702C 526 /* 0x7030-0x703f are used by the shellbrowser */ 527 #define FCIDM_SHVIEW_AUTOARRANGE 0x7031 528 #define FCIDM_SHVIEW_SNAPTOGRID 0x7032 529 530 #define FCIDM_SHVIEW_HELP 0x7041 531 #define FCIDM_SHVIEW_RENAME 0x7050 532 #define FCIDM_SHVIEW_CREATELINK 0x7051 533 #define FCIDM_SHVIEW_NEWLINK 0x7052 534 #define FCIDM_SHVIEW_NEWFOLDER 0x7053 535 536 #define FCIDM_SHVIEW_REFRESH 0x7100 /* FIXME */ 537 #define FCIDM_SHVIEW_EXPLORE 0x7101 /* FIXME */ 538 #define FCIDM_SHVIEW_OPEN 0x7102 /* FIXME */ 539 540 #define FCIDM_SHVIEWLAST 0x7fff 541 #define FCIDM_BROWSERFIRST 0xA000 542 /* undocumented toolbar items from stddlg's*/ 543 #define FCIDM_TB_UPFOLDER 0xA001 544 #define FCIDM_TB_NEWFOLDER 0xA002 545 #define FCIDM_TB_SMALLICON 0xA003 546 #define FCIDM_TB_REPORTVIEW 0xA004 547 #define FCIDM_TB_DESKTOP 0xA005 /* FIXME */ 548 549 #define FCIDM_BROWSERLAST 0xbf00 550 #define FCIDM_GLOBALFIRST 0x8000 551 #define FCIDM_GLOBALLAST 0x9fff 552 553 /* 554 * Global submenu IDs and separator IDs 555 */ 556 #define FCIDM_MENU_FILE (FCIDM_GLOBALFIRST+0x0000) 557 #define FCIDM_MENU_EDIT (FCIDM_GLOBALFIRST+0x0040) 558 #define FCIDM_MENU_VIEW (FCIDM_GLOBALFIRST+0x0080) 559 #define FCIDM_MENU_VIEW_SEP_OPTIONS (FCIDM_GLOBALFIRST+0x0081) 560 #define FCIDM_MENU_TOOLS (FCIDM_GLOBALFIRST+0x00c0) 561 #define FCIDM_MENU_TOOLS_SEP_GOTO (FCIDM_GLOBALFIRST+0x00c1) 562 #define FCIDM_MENU_HELP (FCIDM_GLOBALFIRST+0x0100) 563 #define FCIDM_MENU_FIND (FCIDM_GLOBALFIRST+0x0140) 564 #define FCIDM_MENU_EXPLORE (FCIDM_GLOBALFIRST+0x0150) 565 #define FCIDM_MENU_FAVORITES (FCIDM_GLOBALFIRST+0x0170) 566 567 /* control IDs known to the view */ 568 #define FCIDM_TOOLBAR (FCIDM_BROWSERFIRST + 0) 569 #define FCIDM_STATUS (FCIDM_BROWSERFIRST + 1) 570 571 #define INTERFACE IShellDetails 572 DECLARE_INTERFACE_(IShellDetails, IUnknown) 573 { 574 /*** IUnknown methods ***/ 575 STDMETHOD_(HRESULT,QueryInterface) (THIS_ REFIID riid, void **ppv) PURE; 576 STDMETHOD_(ULONG,AddRef) (THIS) PURE; 577 STDMETHOD_(ULONG,Release) (THIS) PURE; 578 /*** IShellDetails methods ***/ 579 STDMETHOD(GetDetailsOf)(THIS_ _In_opt_ PCUITEMID_CHILD pidl, UINT iColumn, _Out_ SHELLDETAILS *pDetails) PURE; 580 STDMETHOD(ColumnClick)(THIS_ UINT iColumn) PURE; 581 }; 582 #undef INTERFACE 583 584 #if !defined(__cplusplus) || defined(CINTERFACE) 585 /*** IUnknown methods ***/ 586 #define IShellDetails_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) 587 #define IShellDetails_AddRef(p) (p)->lpVtbl->AddRef(p) 588 #define IShellDetails_Release(p) (p)->lpVtbl->Release(p) 589 /*** IShellDetails methods ***/ 590 #define IShellDetails_GetDetailsOf(p,a,b,c) (p)->lpVtbl->GetDetailsOf(p,a,b,c) 591 #define IShellDetails_ColumnClick(p,a) (p)->lpVtbl->ColumnClick(p,a) 592 #endif 593 594 /* IQueryInfo interface */ 595 #define INTERFACE IQueryInfo 596 DECLARE_INTERFACE_(IQueryInfo,IUnknown) 597 { 598 /*** IUnknown methods ***/ 599 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; 600 STDMETHOD_(ULONG,AddRef)(THIS) PURE; 601 STDMETHOD_(ULONG,Release)(THIS) PURE; 602 /*** IQueryInfo methods ***/ 603 STDMETHOD(GetInfoTip)(THIS_ DWORD dwFlags, _Outptr_ WCHAR** lppTips) PURE; 604 STDMETHOD(GetInfoFlags)(THIS_ _Out_ DWORD* lpFlags) PURE; 605 }; 606 #undef INTERFACE 607 608 #if !defined(__cplusplus) || defined(CINTERFACE) 609 /*** IUnknown methods ***/ 610 #define IQueryInfo_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) 611 #define IQueryInfo_AddRef(p) (p)->lpVtbl->AddRef(p) 612 #define IQueryInfo_Release(p) (p)->lpVtbl->Release(p) 613 /*** IQueryInfo methods ***/ 614 #define IQueryInfo_GetInfoTip(p,a,b) (p)->lpVtbl->GetInfoTip(p,a,b) 615 #define IQueryInfo_GetInfoFlags(p,a) (p)->lpVtbl->GetInfoFlags(p,a) 616 #endif 617 618 /* IInputObject interface */ 619 #define INTERFACE IInputObject 620 DECLARE_INTERFACE_(IInputObject,IUnknown) 621 { 622 /*** IUnknown methods ***/ 623 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; 624 STDMETHOD_(ULONG,AddRef)(THIS) PURE; 625 STDMETHOD_(ULONG,Release)(THIS) PURE; 626 /*** IInputObject methods ***/ 627 STDMETHOD(UIActivateIO)(THIS_ BOOL bActivating, LPMSG lpMsg) PURE; 628 STDMETHOD(HasFocusIO)(THIS) PURE; 629 STDMETHOD(TranslateAcceleratorIO)(THIS_ LPMSG lpMsg) PURE; 630 }; 631 #undef INTERFACE 632 633 #if !defined(__cplusplus) || defined(CINTERFACE) 634 /*** IUnknown methods ***/ 635 #define IInputObject_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) 636 #define IInputObject_AddRef(p) (p)->lpVtbl->AddRef(p) 637 #define IInputObject_Release(p) (p)->lpVtbl->Release(p) 638 /*** IInputObject methods ***/ 639 #define IInputObject_UIActivateIO(p,a,b) (p)->lpVtbl->UIActivateIO(p,a,b) 640 #define IInputObject_HasFocusIO(p) (p)->lpVtbl->HasFocusIO(p) 641 #define IInputObject_TranslateAcceleratorIO(p,a) (p)->lpVtbl->TranslateAcceleratorIO(p,a) 642 #endif 643 644 /* IInputObjectSite interface */ 645 #define INTERFACE IInputObjectSite 646 DECLARE_INTERFACE_(IInputObjectSite,IUnknown) 647 { 648 /*** IUnknown methods ***/ 649 STDMETHOD_(HRESULT,QueryInterface) (THIS_ REFIID riid, void** ppvObject) PURE; 650 STDMETHOD_(ULONG,AddRef) (THIS) PURE; 651 STDMETHOD_(ULONG,Release) (THIS) PURE; 652 /*** IInputObjectSite methods ***/ 653 STDMETHOD(OnFocusChangeIS)(THIS_ LPUNKNOWN lpUnknown, BOOL bFocus) PURE; 654 }; 655 #undef INTERFACE 656 657 #if !defined(__cplusplus) || defined(CINTERFACE) 658 /*** IUnknown methods ***/ 659 #define IInputObjectSite_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) 660 #define IInputObjectSite_AddRef(p) (p)->lpVtbl->AddRef(p) 661 #define IInputObjectSite_Release(p) (p)->lpVtbl->Release(p) 662 /*** IInputObject methods ***/ 663 #define IInputObjectSite_OnFocusChangeIS(p,a,b) (p)->lpVtbl->OnFocusChangeIS(p,a,b) 664 #endif 665 666 /* IObjMgr interface */ 667 #define INTERFACE IObjMgr 668 DECLARE_INTERFACE_(IObjMgr,IUnknown) 669 { 670 /*** IUnknown methods ***/ 671 STDMETHOD_(HRESULT,QueryInterface) (THIS_ REFIID riid, void** ppvObject) PURE; 672 STDMETHOD_(ULONG,AddRef) (THIS) PURE; 673 STDMETHOD_(ULONG,Release) (THIS) PURE; 674 /*** IObjMgr methods ***/ 675 STDMETHOD(Append)(THIS_ _In_ LPUNKNOWN punk) PURE; 676 STDMETHOD(Remove)(THIS_ _In_ LPUNKNOWN punk) PURE; 677 }; 678 #undef INTERFACE 679 680 #if !defined(__cplusplus) || defined(CINTERFACE) 681 /*** IUnknown methods ***/ 682 #define IObjMgr_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) 683 #define IObjMgr_AddRef(p) (p)->lpVtbl->AddRef(p) 684 #define IObjMgr_Release(p) (p)->lpVtbl->Release(p) 685 /*** IObjMgr methods ***/ 686 #define IObjMgr_Append(p,a) (p)->lpVtbl->Append(p,a) 687 #define IObjMgr_Remove(p,a) (p)->lpVtbl->Remove(p,a) 688 #endif 689 690 /* ICurrentWorkingDirectory interface */ 691 #define INTERFACE ICurrentWorkingDirectory 692 DECLARE_INTERFACE_(ICurrentWorkingDirectory,IUnknown) 693 { 694 /*** IUnknown methods ***/ 695 STDMETHOD_(HRESULT,QueryInterface) (THIS_ REFIID riid, void** ppvObject) PURE; 696 STDMETHOD_(ULONG,AddRef) (THIS) PURE; 697 STDMETHOD_(ULONG,Release) (THIS) PURE; 698 /*** ICurrentWorkingDirectory methods ***/ 699 STDMETHOD(GetDirectory)(THIS_ _Out_writes_(cchSize) PWSTR pwzPath, DWORD cchSize) PURE; 700 STDMETHOD(SetDirectory)(THIS_ _In_ PCWSTR pwzPath) PURE; 701 }; 702 #undef INTERFACE 703 704 #if !defined(__cplusplus) || defined(CINTERFACE) 705 /*** IUnknown methods ***/ 706 #define ICurrentWorkingDirectory_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) 707 #define ICurrentWorkingDirectory_AddRef(p) (p)->lpVtbl->AddRef(p) 708 #define ICurrentWorkingDirectory_Release(p) (p)->lpVtbl->Release(p) 709 /*** ICurrentWorkingDirectory methods ***/ 710 #define ICurrentWorkingDirectory_GetDirectory(p,a,b) (p)->lpVtbl->GetDirectory(p,a,b) 711 #define ICurrentWorkingDirectory_SetDirectory(p,a) (p)->lpVtbl->SetDirectory(p,a) 712 #endif 713 714 /* IACList interface */ 715 #define INTERFACE IACList 716 DECLARE_INTERFACE_(IACList,IUnknown) 717 { 718 /*** IUnknown methods ***/ 719 STDMETHOD_(HRESULT,QueryInterface) (THIS_ REFIID riid, void** ppvObject) PURE; 720 STDMETHOD_(ULONG,AddRef) (THIS) PURE; 721 STDMETHOD_(ULONG,Release) (THIS) PURE; 722 /*** IACList methods ***/ 723 STDMETHOD(Expand)(THIS_ _In_ LPCOLESTR str) PURE; 724 }; 725 #undef INTERFACE 726 727 #if !defined(__cplusplus) || defined(CINTERFACE) 728 /*** IUnknown methods ***/ 729 #define IACList_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) 730 #define IACList_AddRef(p) (p)->lpVtbl->AddRef(p) 731 #define IACList_Release(p) (p)->lpVtbl->Release(p) 732 /*** IACList methods ***/ 733 #define IACList_Expand(p,a) (p)->lpVtbl->Expand(p,a) 734 #endif 735 736 /* IACList2 interface */ 737 738 #define ACLO_NONE 0x00000000 739 #define ACLO_CURRENTDIR 0x00000001 740 #define ACLO_MYCOMPUTER 0x00000002 741 #define ACLO_DESKTOP 0x00000004 742 #define ACLO_FAVORITES 0x00000008 743 #define ACLO_FILESYSONLY 0x00000010 744 #define ACLO_FILESYSDIRS 0x00000020 745 746 #define INTERFACE IACList2 747 DECLARE_INTERFACE_(IACList2,IACList) 748 { 749 /*** IUnknown methods ***/ 750 STDMETHOD_(HRESULT,QueryInterface) (THIS_ REFIID riid, void** ppvObject) PURE; 751 STDMETHOD_(ULONG,AddRef) (THIS) PURE; 752 STDMETHOD_(ULONG,Release) (THIS) PURE; 753 /*** IACList methods ***/ 754 STDMETHOD(Expand)(THIS_ LPCOLESTR str) PURE; 755 /*** IACList2 methods ***/ 756 STDMETHOD(SetOptions)(THIS_ DWORD dwFlag) PURE; 757 STDMETHOD(GetOptions)(THIS_ _Out_ DWORD* pdwFlag) PURE; 758 }; 759 #undef INTERFACE 760 761 #if !defined(__cplusplus) || defined(CINTERFACE) 762 /*** IUnknown methods ***/ 763 #define IACList2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) 764 #define IACList2_AddRef(p) (p)->lpVtbl->AddRef(p) 765 #define IACList2_Release(p) (p)->lpVtbl->Release(p) 766 /*** IACList2 methods ***/ 767 #define IACList2_GetOptions(p,a) (p)->lpVtbl->GetOptions(p,a) 768 #define IACList2_SetOptions(p,a) (p)->lpVtbl->SetOptions(p,a) 769 #endif 770 771 /**************************************************************************** 772 * IShellFolderViewCB interface 773 */ 774 775 #define INTERFACE IShellFolderViewCB 776 DECLARE_INTERFACE_(IShellFolderViewCB,IUnknown) 777 { 778 /*** IUnknown methods ***/ 779 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; 780 STDMETHOD_(ULONG,AddRef)(THIS) PURE; 781 STDMETHOD_(ULONG,Release)(THIS) PURE; 782 /*** IShellFolderViewCB methods ***/ 783 STDMETHOD(MessageSFVCB)(THIS_ UINT uMsg, WPARAM wParam, LPARAM lParam) PURE; 784 }; 785 #undef INTERFACE 786 787 #if !defined(__cplusplus) || defined(CINTERFACE) 788 /*** IUnknown methods ***/ 789 #define IShellFolderViewCB_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) 790 #define IShellFolderViewCB_AddRef(p) (p)->lpVtbl->AddRef(p) 791 #define IShellFolderViewCB_Release(p) (p)->lpVtbl->Release(p) 792 /*** IShellFolderViewCB methods ***/ 793 #define IShellFolderViewCB_MessageSFVCB(p,a,b,c) (p)->lpVtbl->MessageSFVCB(p,a,b,c) 794 #endif 795 796 /**************************************************************************** 797 * IShellFolderView interface 798 */ 799 800 #include <pshpack8.h> 801 802 typedef struct _ITEMSPACING 803 { 804 int cxSmall; 805 int cySmall; 806 int cxLarge; 807 int cyLarge; 808 } ITEMSPACING; 809 810 #include <poppack.h> 811 812 #define INTERFACE IShellFolderView 813 DEFINE_GUID(IID_IShellFolderView,0x37a378c0,0xf82d,0x11ce,0xae,0x65,0x08,0x00,0x2b,0x2e,0x12,0x62); 814 DECLARE_INTERFACE_(IShellFolderView, IUnknown) 815 { 816 /*** IUnknown methods ***/ 817 STDMETHOD_(HRESULT,QueryInterface) (THIS_ REFIID riid, void **ppv) PURE; 818 STDMETHOD_(ULONG,AddRef) (THIS) PURE; 819 STDMETHOD_(ULONG,Release) (THIS) PURE; 820 821 /*** IShellFolderView methods ***/ 822 STDMETHOD(Rearrange) (THIS_ LPARAM lParamSort) PURE; 823 STDMETHOD(GetArrangeParam) (THIS_ _Out_ LPARAM *plParamSort) PURE; 824 STDMETHOD(ArrangeGrid) (THIS) PURE; 825 STDMETHOD(AutoArrange) (THIS) PURE; 826 STDMETHOD(GetAutoArrange) (THIS) PURE; 827 STDMETHOD(AddObject) (THIS_ _In_ PITEMID_CHILD pidl, _Out_ UINT *puItem) PURE; 828 STDMETHOD(GetObject) (THIS_ _Outptr_ PITEMID_CHILD *ppidl, UINT uItem) PURE; 829 STDMETHOD(RemoveObject) (THIS_ _In_opt_ PITEMID_CHILD pidl, _Out_ UINT *puItem) PURE; 830 STDMETHOD(GetObjectCount) (THIS_ _Out_ UINT *puCount) PURE; 831 STDMETHOD(SetObjectCount) (THIS_ UINT uCount, UINT dwFlags) PURE; 832 STDMETHOD(UpdateObject) (THIS_ _In_ PITEMID_CHILD pidlOld, _In_ PITEMID_CHILD pidlNew, _Out_ UINT *puItem) PURE; 833 STDMETHOD(RefreshObject) (THIS_ _In_ PITEMID_CHILD pidl, _Out_ UINT *puItem) PURE; 834 STDMETHOD(SetRedraw) (THIS_ BOOL bRedraw) PURE; 835 STDMETHOD(GetSelectedCount) (THIS_ _Out_ UINT *puSelected) PURE; 836 STDMETHOD(GetSelectedObjects) (THIS_ _Outptr_result_buffer_(*puItems) PCUITEMID_CHILD **pppidl, _Out_ UINT *puItems) PURE; 837 STDMETHOD(IsDropOnSource) (THIS_ _In_opt_ IDropTarget *pDropTarget) PURE; 838 STDMETHOD(GetDragPoint) (THIS_ _Out_ POINT *ppt) PURE; 839 STDMETHOD(GetDropPoint) (THIS_ _Out_ POINT *ppt) PURE; 840 STDMETHOD(MoveIcons) (THIS_ _In_ IDataObject *pDataObject) PURE; 841 STDMETHOD(SetItemPos) (THIS_ _In_ PCUITEMID_CHILD pidl, _In_ POINT *ppt) PURE; 842 STDMETHOD(IsBkDropTarget) (THIS_ _In_opt_ IDropTarget *pDropTarget) PURE; 843 STDMETHOD(SetClipboard) (THIS_ BOOL bMove) PURE; 844 STDMETHOD(SetPoints) (THIS_ _In_ IDataObject *pDataObject) PURE; 845 STDMETHOD(GetItemSpacing) (THIS_ _Out_ ITEMSPACING *pSpacing) PURE; 846 STDMETHOD(SetCallback) (THIS_ _In_opt_ IShellFolderViewCB* pNewCB, _Outptr_result_maybenull_ IShellFolderViewCB** ppOldCB) PURE; 847 STDMETHOD(Select) ( THIS_ UINT dwFlags ) PURE; 848 STDMETHOD(QuerySupport) (THIS_ _Inout_ UINT * pdwSupport) PURE; 849 STDMETHOD(SetAutomationObject)(THIS_ _In_opt_ IDispatch* pdisp) PURE; 850 }; 851 #undef INTERFACE 852 853 #if !defined(__cplusplus) || defined(CINTERFACE) 854 /*** IUnknown methods ***/ 855 #define IShellFolderView_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) 856 #define IShellFolderView_AddRef(p) (p)->lpVtbl->AddRef(p) 857 #define IShellFolderView_Release(p) (p)->lpVtbl->Release(p) 858 /*** IShellFolderView methods ***/ 859 #define IShellFolderView_Rearrange(p,a) (p)->lpVtbl->Rearrange(p,a) 860 #define IShellFolderView_GetArrangeParam(p,a) (p)->lpVtbl->GetArrangeParam(p,a) 861 #define IShellFolderView_ArrangeGrid(p) (p)->lpVtbl->ArrangeGrid(p) 862 #define IShellFolderView_AutoArrange(p) (p)->lpVtbl->AutoArrange(p) 863 #define IShellFolderView_GetAutoArrange(p) (p)->lpVtbl->GetAutoArrange(p) 864 #define IShellFolderView_AddObject(p,a,b) (p)->lpVtbl->AddObject(p,a,b) 865 #define IShellFolderView_GetObject(p,a,b) (p)->lpVtbl->GetObject(p,a,b) 866 #define IShellFolderView_RemoveObject(p,a,b) (p)->lpVtbl->RemoveObject(p,a,b) 867 #define IShellFolderView_GetObjectCount(p,a) (p)->lpVtbl->GetObjectCount(p,a) 868 #define IShellFolderView_SetObjectCount(p,a,b) (p)->lpVtbl->SetObjectCount(p,a,b) 869 #define IShellFolderView_UpdateObject(p,a,b,c) (p)->lpVtbl->UpdateObject(p,a,b,c) 870 #define IShellFolderView_RefreshObject(p,a,b) (p)->lpVtbl->RefreshObject(p,a,b) 871 #define IShellFolderView_SetRedraw(p,a) (p)->lpVtbl->SetRedraw(p,a) 872 #define IShellFolderView_GetSelectedCount(p,a) (p)->lpVtbl->GetSelectedCount(p,a) 873 #define IShellFolderView_GetSelectedObjects(p,a,b) (p)->lpVtbl->GetSelectedObjects(p,a,b) 874 #define IShellFolderView_IsDropOnSource(p,a) (p)->lpVtbl->IsDropOnSource(p,a) 875 #define IShellFolderView_GetDragPoint(p,a) (p)->lpVtbl->GetDragPoint(p,a) 876 #define IShellFolderView_GetDropPoint(p,a) (p)->lpVtbl->GetDropPoint(p,a) 877 #define IShellFolderView_MoveIcons(p,a) (p)->lpVtbl->MoveIcons(p,a) 878 #define IShellFolderView_SetItemPos(p,a,b) (p)->lpVtbl->SetItemPos(p,a,b) 879 #define IShellFolderView_DropTarget(p,a) (p)->lpVtbl->DropTarget(p,a) 880 #define IShellFolderView_SetClipboard(p,a) (p)->lpVtbl->SetClipboard(p,a) 881 #define IShellFolderView_SetPoints(p,a) (p)->lpVtbl->SetPoints(p,a) 882 #define IShellFolderView_GetItemSpacing(p,a) (p)->lpVtbl->GetItemSpacing(p,a) 883 #define IShellFolderView_SetCallback(p,a) (p)->lpVtbl->SetCallback(p,a) 884 #define IShellFolderView_Select(p,a) (p)->lpVtbl->Select(p,a) 885 #define IShellFolderView_QuerySupport(p,a) (p)->lpVtbl->QuerySupport(p,a) 886 #define IShellFolderView_SetAutomationObject(p,a) (p)->lpVtbl->SetAutomationObject(p,a) 887 #endif 888 889 /* IProgressDialog interface */ 890 #define PROGDLG_NORMAL 0x00000000 891 #define PROGDLG_MODAL 0x00000001 892 #define PROGDLG_AUTOTIME 0x00000002 893 #define PROGDLG_NOTIME 0x00000004 894 #define PROGDLG_NOMINIMIZE 0x00000008 895 #define PROGDLG_NOPROGRESSBAR 0x00000010 896 #define PROGDLG_MARQUEEPROGRESS 0x00000020 897 #define PROGDLG_NOCANCEL 0x00000040 898 899 #define PDTIMER_RESET 0x00000001 900 #define PDTIMER_PAUSE 0x00000002 901 #define PDTIMER_RESUME 0x00000003 902 903 #define INTERFACE IProgressDialog 904 DECLARE_INTERFACE_(IProgressDialog,IUnknown) 905 { 906 /*** IUnknown methods ***/ 907 STDMETHOD_(HRESULT,QueryInterface) (THIS_ REFIID riid, void** ppvObject) PURE; 908 STDMETHOD_(ULONG,AddRef) (THIS) PURE; 909 STDMETHOD_(ULONG,Release) (THIS) PURE; 910 /*** IProgressDialog methods ***/ 911 STDMETHOD(StartProgressDialog)(THIS_ _In_opt_ HWND hwndParent, _In_opt_ IUnknown *punkEnableModeless, DWORD dwFlags, _Reserved_ LPCVOID reserved) PURE; 912 STDMETHOD(StopProgressDialog)(THIS) PURE; 913 STDMETHOD(SetTitle)(THIS_ _In_ LPCWSTR pwzTitle) PURE; 914 STDMETHOD(SetAnimation)(THIS_ _In_opt_ HINSTANCE hInstance, UINT uiResourceId) PURE; 915 STDMETHOD_(BOOL,HasUserCancelled)(THIS) PURE; 916 STDMETHOD(SetProgress)(THIS_ DWORD dwCompleted, DWORD dwTotal) PURE; 917 STDMETHOD(SetProgress64)(THIS_ ULONGLONG ullCompleted, ULONGLONG ullTotal) PURE; 918 STDMETHOD(SetLine)(THIS_ DWORD dwLineNum, _In_ LPCWSTR pwzString, BOOL bPath, _Reserved_ LPCVOID reserved) PURE; 919 STDMETHOD(SetCancelMsg)(THIS_ _In_ LPCWSTR pwzCancelMsg, _Reserved_ LPCVOID reserved) PURE; 920 STDMETHOD(Timer)(THIS_ DWORD dwTimerAction, _Reserved_ LPCVOID reserved) PURE; 921 }; 922 #undef INTERFACE 923 924 #if !defined(__cplusplus) || defined(CINTERFACE) 925 /*** IUnknown methods ***/ 926 #define IProgressDialog_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) 927 #define IProgressDialog_AddRef(p) (p)->lpVtbl->AddRef(p) 928 #define IProgressDialog_Release(p) (p)->lpVtbl->Release(p) 929 /*** IProgressDialog methods ***/ 930 #define IProgressDialog_StartProgressDialog(p,a,b,c,d) (p)->lpVtbl->StartProgressDialog(p,a,b,c,d) 931 #define IProgressDialog_StopProgressDialog(p) (p)->lpVtbl->StopProgressDialog(p) 932 #define IProgressDialog_SetTitle(p,a) (p)->lpVtbl->SetTitle(p,a) 933 #define IProgressDialog_SetAnimation(p,a,b) (p)->lpVtbl->SetAnimation(p,a,b) 934 #define IProgressDialog_HasUserCancelled(p) (p)->lpVtbl->HasUserCancelled(p) 935 #define IProgressDialog_SetProgress(p,a,b) (p)->lpVtbl->SetProgress(p,a,b) 936 #define IProgressDialog_SetProgress64(p,a,b) (p)->lpVtbl->SetProgress64(p,a,b) 937 #define IProgressDialog_SetLine(p,a,b,c,d) (p)->lpVtbl->SetLine(p,a,b,c,d) 938 #define IProgressDialog_SetCancelMsg(p,a,b) (p)->lpVtbl->SetCancelMsg(p,a,b) 939 #define IProgressDialog_Timer(p,a,b) (p)->lpVtbl->Timer(p,a,b) 940 #endif 941 942 943 /* IDeskBarClient interface */ 944 #define INTERFACE IDeskBarClient 945 DECLARE_INTERFACE_(IDeskBarClient,IOleWindow) 946 { 947 /*** IUnknown methods ***/ 948 STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE; 949 STDMETHOD_(ULONG,AddRef)(THIS) PURE; 950 STDMETHOD_(ULONG,Release)(THIS) PURE; 951 /*** IOleWindow methods ***/ 952 STDMETHOD_(HRESULT,GetWindow)(THIS_ HWND*) PURE; 953 STDMETHOD_(HRESULT,ContextSensitiveHelp)(THIS_ BOOL) PURE; 954 /*** IDeskBarClient methods ***/ 955 STDMETHOD_(HRESULT,SetDeskBarSite)(THIS_ _In_opt_ IUnknown*) PURE; 956 STDMETHOD_(HRESULT,SetModeDBC)(THIS_ DWORD) PURE; 957 STDMETHOD_(HRESULT,UIActivateDBC)(THIS_ DWORD) PURE; 958 STDMETHOD_(HRESULT,GetSize)(THIS_ DWORD, _Out_ LPRECT) PURE; 959 }; 960 #undef INTERFACE 961 962 #if !defined(__cplusplus) || defined(CINTERFACE) 963 /*** IUnknown methods ***/ 964 #define IDeskBarClient_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) 965 #define IDeskBarClient_AddRef(p) (p)->lpVtbl->AddRef(p) 966 #define IDeskBarClient_Release(p) (p)->lpVtbl->Release(p) 967 /*** IOleWindow methods ***/ 968 #define IDeskBarClient_GetWindow(p,a) (p)->lpVtbl->GetWindow(p,a) 969 #define IDeskBarClient_ContextSensitiveHelp(p,a) (p)->lpVtbl->ContextSensitiveHelp(p,a) 970 /*** IOleWindow IDeskBarClient ***/ 971 #define IDeskBarClient_SetDeskBarSite(p,a) (p)->lpVtbl->SetDeskBarSite(p,a) 972 #define IDeskBarClient_SetModeDBC(p,a) (p)->lpVtbl->SetModeDBC(p,a) 973 #define IDeskBarClient_UIActivateDBC(p,a) (p)->lpVtbl->UIActivateDBC(p,a) 974 #define IDeskBarClient_GetSize(p,a,b) (p)->lpVtbl->GetSize(p,a,b) 975 #endif 976 977 #define DBC_GS_IDEAL 0 978 #define DBC_GS_SIZEDOWN 1 979 980 #define DBC_HIDE 0 981 #define DBC_SHOW 1 982 #define DBC_SHOWOBSCURE 2 983 984 985 /* As indicated by the documentation for IActiveDesktop, 986 you must include wininet.h before shlobj.h */ 987 #ifdef _WINE_WININET_H_ 988 989 990 /* Structs are taken from msdn, and not verified! 991 Only stuff needed to make it compile are here, no flags or anything */ 992 993 typedef struct _tagWALLPAPEROPT 994 { 995 DWORD dwSize; 996 DWORD dwStyle; 997 } WALLPAPEROPT; 998 999 typedef WALLPAPEROPT *LPWALLPAPEROPT; 1000 typedef const WALLPAPEROPT *LPCWALLPAPEROPT; 1001 1002 typedef struct _tagCOMPONENTSOPT 1003 { 1004 DWORD dwSize; 1005 BOOL fEnableComponents; 1006 BOOL fActiveDesktop; 1007 } COMPONENTSOPT; 1008 1009 typedef COMPONENTSOPT *LPCOMPONENTSOPT; 1010 typedef const COMPONENTSOPT *LPCCOMPONENTSOPT; 1011 1012 1013 typedef struct _tagCOMPPOS 1014 { 1015 DWORD dwSize; 1016 int iLeft; 1017 int iTop; 1018 DWORD dwWidth; 1019 DWORD dwHeight; 1020 int izIndex; 1021 BOOL fCanResize; 1022 BOOL fCanResizeX; 1023 BOOL fCanResizeY; 1024 int iPreferredLeftPercent; 1025 int iPreferredTopPercent; 1026 } COMPPOS; 1027 1028 typedef struct _tagCOMPSTATEINFO 1029 { 1030 DWORD dwSize; 1031 int iLeft; 1032 int iTop; 1033 DWORD dwWidth; 1034 DWORD dwHeight; 1035 DWORD dwItemState; 1036 } COMPSTATEINFO; 1037 1038 typedef struct _tagCOMPONENT 1039 { 1040 DWORD dwSize; 1041 DWORD dwID; 1042 int iComponentType; 1043 BOOL fChecked; 1044 BOOL fDirty; 1045 BOOL fNoScroll; 1046 COMPPOS cpPos; 1047 WCHAR wszFriendlyName[MAX_PATH]; 1048 WCHAR wszSource[INTERNET_MAX_URL_LENGTH]; 1049 WCHAR wszSubscribedURL[INTERNET_MAX_URL_LENGTH]; 1050 DWORD dwCurItemState; 1051 COMPSTATEINFO csiOriginal; 1052 COMPSTATEINFO csiRestored; 1053 } COMPONENT; 1054 1055 typedef COMPONENT *LPCOMPONENT; 1056 typedef const COMPONENT *LPCCOMPONENT; 1057 1058 #pragma push_macro("AddDesktopItem") 1059 #undef AddDesktopItem 1060 1061 /* IDeskBarClient interface */ 1062 #define INTERFACE IActiveDesktop 1063 DECLARE_INTERFACE_(IActiveDesktop, IUnknown) 1064 { 1065 /*** IUnknown methods ***/ 1066 STDMETHOD(QueryInterface) (THIS_ _In_ REFIID riid, _Outptr_ void **ppv) PURE; 1067 STDMETHOD_(ULONG,AddRef) (THIS) PURE; 1068 STDMETHOD_(ULONG,Release) (THIS) PURE; 1069 1070 /*** IActiveDesktop methods ***/ 1071 STDMETHOD(ApplyChanges)(THIS_ DWORD dwFlags) PURE; 1072 STDMETHOD(GetWallpaper)(THIS_ PWSTR pwszWallpaper, UINT cchWallpaper, DWORD dwFlags) PURE; 1073 STDMETHOD(SetWallpaper)(THIS_ PCWSTR pwszWallpaper, DWORD dwReserved) PURE; 1074 STDMETHOD(GetWallpaperOptions)(THIS_ LPWALLPAPEROPT pwpo, DWORD dwReserved) PURE; 1075 STDMETHOD(SetWallpaperOptions)(THIS_ LPCWALLPAPEROPT pwpo, DWORD dwReserved) PURE; 1076 STDMETHOD(GetPattern)(THIS_ PWSTR pwszPattern, UINT cchPattern, DWORD dwReserved) PURE; 1077 STDMETHOD(SetPattern)(THIS_ PCWSTR pwszPattern, DWORD dwReserved) PURE; 1078 STDMETHOD(GetDesktopItemOptions)(THIS_ LPCOMPONENTSOPT pco, DWORD dwReserved) PURE; 1079 STDMETHOD(SetDesktopItemOptions)(THIS_ LPCCOMPONENTSOPT pco, DWORD dwReserved) PURE; 1080 STDMETHOD(AddDesktopItem)(THIS_ LPCCOMPONENT pcomp, DWORD dwReserved) PURE; 1081 STDMETHOD(AddDesktopItemWithUI)(THIS_ HWND hwnd, LPCOMPONENT pcomp, DWORD dwReserved) PURE; 1082 STDMETHOD(ModifyDesktopItem)(THIS_ LPCCOMPONENT pcomp, DWORD dwFlags) PURE; 1083 STDMETHOD(RemoveDesktopItem)(THIS_ LPCCOMPONENT pcomp, DWORD dwReserved) PURE; 1084 STDMETHOD(GetDesktopItemCount)(THIS_ int *pcItems, DWORD dwReserved) PURE; 1085 STDMETHOD(GetDesktopItem)(THIS_ int nComponent, LPCOMPONENT pcomp, DWORD dwReserved) PURE; 1086 STDMETHOD(GetDesktopItemByID)(THIS_ ULONG_PTR dwID, LPCOMPONENT pcomp, DWORD dwReserved) PURE; 1087 STDMETHOD(GenerateDesktopItemHtml)(THIS_ PCWSTR pwszFileName, LPCOMPONENT pcomp, DWORD dwReserved) PURE; 1088 STDMETHOD(AddUrl)(THIS_ HWND hwnd, PCWSTR pszSource, LPCOMPONENT pcomp, DWORD dwFlags) PURE; 1089 STDMETHOD(GetDesktopItemBySource)(THIS_ PCWSTR pwszSource, LPCOMPONENT pcomp, DWORD dwReserved) PURE; 1090 }; 1091 #undef INTERFACE 1092 1093 #pragma pop_macro("AddDesktopItem") 1094 1095 #endif 1096 1097 /**************************************************************************** 1098 * SHAddToRecentDocs API 1099 */ 1100 #define SHARD_PIDL 0x00000001L 1101 #define SHARD_PATHA 0x00000002L 1102 #define SHARD_PATHW 0x00000003L 1103 #define SHARD_PATH WINELIB_NAME_AW(SHARD_PATH) 1104 1105 void WINAPI SHAddToRecentDocs(UINT, _In_opt_ LPCVOID); 1106 1107 /**************************************************************************** 1108 * SHBrowseForFolder API 1109 */ 1110 typedef INT (CALLBACK *BFFCALLBACK)(HWND,UINT,LPARAM,LPARAM); 1111 1112 #include <pshpack8.h> 1113 1114 typedef struct tagBROWSEINFOA { 1115 HWND hwndOwner; 1116 PCIDLIST_ABSOLUTE pidlRoot; 1117 LPSTR pszDisplayName; 1118 LPCSTR lpszTitle; 1119 UINT ulFlags; 1120 BFFCALLBACK lpfn; 1121 LPARAM lParam; 1122 INT iImage; 1123 } BROWSEINFOA, *PBROWSEINFOA, *LPBROWSEINFOA; 1124 1125 typedef struct tagBROWSEINFOW { 1126 HWND hwndOwner; 1127 PCIDLIST_ABSOLUTE pidlRoot; 1128 LPWSTR pszDisplayName; 1129 LPCWSTR lpszTitle; 1130 UINT ulFlags; 1131 BFFCALLBACK lpfn; 1132 LPARAM lParam; 1133 INT iImage; 1134 } BROWSEINFOW, *PBROWSEINFOW, *LPBROWSEINFOW; 1135 1136 #define BROWSEINFO WINELIB_NAME_AW(BROWSEINFO) 1137 #define PBROWSEINFO WINELIB_NAME_AW(PBROWSEINFO) 1138 #define LPBROWSEINFO WINELIB_NAME_AW(LPBROWSEINFO) 1139 1140 #include <poppack.h> 1141 1142 /* Browsing for directory. */ 1143 #define BIF_RETURNONLYFSDIRS 0x0001 1144 #define BIF_DONTGOBELOWDOMAIN 0x0002 1145 #define BIF_STATUSTEXT 0x0004 1146 #define BIF_RETURNFSANCESTORS 0x0008 1147 #define BIF_EDITBOX 0x0010 1148 #define BIF_VALIDATE 0x0020 1149 #define BIF_NEWDIALOGSTYLE 0x0040 1150 #define BIF_USENEWUI (BIF_NEWDIALOGSTYLE | BIF_EDITBOX) 1151 #define BIF_BROWSEINCLUDEURLS 0x0080 1152 #define BIF_UAHINT 0x0100 1153 #define BIF_NONEWFOLDERBUTTON 0x0200 1154 #define BIF_NOTRANSLATETARGETS 0x0400 1155 1156 #define BIF_BROWSEFORCOMPUTER 0x1000 1157 #define BIF_BROWSEFORPRINTER 0x2000 1158 #define BIF_BROWSEINCLUDEFILES 0x4000 1159 #define BIF_SHAREABLE 0x8000 1160 1161 /* message from browser */ 1162 #define BFFM_INITIALIZED 1 1163 #define BFFM_SELCHANGED 2 1164 #define BFFM_VALIDATEFAILEDA 3 1165 #define BFFM_VALIDATEFAILEDW 4 1166 #define BFFM_IUNKNOWN 5 1167 1168 /* messages to browser */ 1169 #define BFFM_SETSTATUSTEXTA (WM_USER+100) 1170 #define BFFM_ENABLEOK (WM_USER+101) 1171 #define BFFM_SETSELECTIONA (WM_USER+102) 1172 #define BFFM_SETSELECTIONW (WM_USER+103) 1173 #define BFFM_SETSTATUSTEXTW (WM_USER+104) 1174 #define BFFM_SETOKTEXT (WM_USER+105) 1175 #define BFFM_SETEXPANDED (WM_USER+106) 1176 1177 PIDLIST_ABSOLUTE WINAPI SHBrowseForFolderA(_In_ LPBROWSEINFOA lpbi); 1178 PIDLIST_ABSOLUTE WINAPI SHBrowseForFolderW(_In_ LPBROWSEINFOW lpbi); 1179 #define SHBrowseForFolder WINELIB_NAME_AW(SHBrowseForFolder) 1180 1181 #define BFFM_SETSTATUSTEXT WINELIB_NAME_AW(BFFM_SETSTATUSTEXT) 1182 #define BFFM_SETSELECTION WINELIB_NAME_AW(BFFM_SETSELECTION) 1183 #define BFFM_VALIDATEFAILED WINELIB_NAME_AW(BFFM_VALIDATEFAILED) 1184 1185 /********************************************************************** 1186 * SHCreateShellFolderViewEx API 1187 */ 1188 1189 typedef HRESULT 1190 (CALLBACK *LPFNVIEWCALLBACK)( 1191 _In_ IShellView* dwUser, 1192 _In_ IShellFolder* pshf, 1193 _In_ HWND hWnd, 1194 UINT uMsg, 1195 WPARAM wParam, 1196 LPARAM lParam); 1197 1198 #include <pshpack8.h> 1199 1200 typedef struct _CSFV 1201 { 1202 UINT cbSize; 1203 IShellFolder* pshf; 1204 IShellView* psvOuter; 1205 PCIDLIST_ABSOLUTE pidl; 1206 LONG lEvents; 1207 LPFNVIEWCALLBACK pfnCallback; 1208 FOLDERVIEWMODE fvm; 1209 } CSFV, *LPCSFV; 1210 1211 #include <poppack.h> 1212 1213 HRESULT 1214 WINAPI 1215 SHCreateShellFolderViewEx( 1216 _In_ LPCSFV pshfvi, 1217 _Outptr_ IShellView **ppshv); 1218 1219 /* SHCreateShellFolderViewEx callback messages */ 1220 #define SFVM_MERGEMENU 1 1221 #define SFVM_INVOKECOMMAND 2 1222 #define SFVM_GETHELPTEXT 3 1223 #define SFVM_GETTOOLTIPTEXT 4 1224 #define SFVM_GETBUTTONINFO 5 1225 #define SFVM_GETBUTTONS 6 1226 #define SFVM_INITMENUPOPUP 7 1227 #define SFVM_SELECTIONCHANGED 8 /* undocumented */ 1228 #define SFVM_DRAWMENUITEM 9 /* undocumented */ 1229 #define SFVM_MEASUREMENUITEM 10 /* undocumented */ 1230 #define SFVM_EXITMENULOOP 11 /* undocumented */ 1231 #define SFVM_VIEWRELEASE 12 /* undocumented */ 1232 #define SFVM_GETNAMELENGTH 13 /* undocumented */ 1233 #define SFVM_FSNOTIFY 14 1234 #define SFVM_WINDOWCREATED 15 1235 #define SFVM_WINDOWCLOSING 16 /* undocumented */ 1236 #define SFVM_LISTREFRESHED 17 /* undocumented */ 1237 #define SFVM_WINDOWFOCUSED 18 /* undocumented */ 1238 #define SFVM_REGISTERCOPYHOOK 20 /* undocumented */ 1239 #define SFVM_COPYHOOKCALLBACK 21 /* undocumented */ 1240 #define SFVM_GETDETAILSOF 23 1241 #define SFVM_COLUMNCLICK 24 1242 #define SFVM_QUERYFSNOTIFY 25 1243 #define SFVM_DEFITEMCOUNT 26 1244 #define SFVM_DEFVIEWMODE 27 1245 #define SFVM_UNMERGEFROMMENU 28 1246 #define SFVM_ADDINGOBJECT 29 /* undocumented */ 1247 #define SFVM_REMOVINGOBJECT 30 /* undocumented */ 1248 #define SFVM_UPDATESTATUSBAR 31 1249 #define SFVM_BACKGROUNDENUM 32 1250 #define SFVM_GETCOMMANDDIR 33 /* undocumented */ 1251 #define SFVM_GETCOLUMNSTREAM 34 /* undocumented */ 1252 #define SFVM_CANSELECTALL 35 /* undocumented */ 1253 #define SFVM_DIDDRAGDROP 36 1254 #define SFVM_ISSTRICTREFRESH 37 /* undocumented */ 1255 #define SFVM_ISCHILDOBJECT 38 /* undocumented */ 1256 #define SFVM_SETISFV 39 1257 #define SFVM_GETEXTVIEWS 40 /* undocumented */ 1258 #define SFVM_THISIDLIST 41 1259 #define SFVM_ADDPROPERTYPAGES 47 1260 #define SFVM_BACKGROUNDENUMDONE 48 1261 #define SFVM_GETNOTIFY 49 1262 #define SFVM_GETSORTDEFAULTS 53 1263 #define SFVM_SIZE 57 1264 #define SFVM_GETZONE 58 1265 #define SFVM_GETPANE 59 1266 #define SFVM_GETHELPTOPIC 63 1267 #define SFVM_GETANIMATION 68 1268 #define SFVM_GET_CUSTOMVIEWINFO 77 /* undocumented */ 1269 #define SFVM_ENUMERATEDITEMS 79 /* undocumented */ 1270 #define SFVM_GET_VIEW_DATA 80 /* undocumented */ 1271 #define SFVM_GET_WEBVIEW_LAYOUT 82 /* undocumented */ 1272 #define SFVM_GET_WEBVIEW_CONTENT 83 /* undocumented */ 1273 #define SFVM_GET_WEBVIEW_TASKS 84 /* undocumented */ 1274 #define SFVM_GET_WEBVIEW_THEME 86 /* undocumented */ 1275 #define SFVM_GETDEFERREDVIEWSETTINGS 92 /* undocumented */ 1276 1277 #include <pshpack8.h> 1278 1279 typedef struct _SFV_CREATE 1280 { 1281 UINT cbSize; 1282 IShellFolder *pshf; 1283 IShellView *psvOuter; 1284 IShellFolderViewCB *psfvcb; 1285 } SFV_CREATE; 1286 1287 #include <poppack.h> 1288 1289 HRESULT 1290 WINAPI 1291 SHCreateShellFolderView( 1292 _In_ const SFV_CREATE *pscfv, 1293 _Outptr_ IShellView **ppsv); 1294 1295 /* Types and definitions for the SFM_* parameters */ 1296 #include <pshpack8.h> 1297 1298 #define QCMINFO_PLACE_BEFORE 0 1299 #define QCMINFO_PLACE_AFTER 1 1300 typedef struct _QCMINFO_IDMAP_PLACEMENT 1301 { 1302 UINT id; 1303 UINT fFlags; 1304 } QCMINFO_IDMAP_PLACEMENT; 1305 1306 typedef struct _QCMINFO_IDMAP 1307 { 1308 UINT nMaxIds; 1309 QCMINFO_IDMAP_PLACEMENT pIdList[1]; 1310 } QCMINFO_IDMAP; 1311 1312 typedef struct _QCMINFO 1313 { 1314 HMENU hmenu; 1315 UINT indexMenu; 1316 UINT idCmdFirst; 1317 UINT idCmdLast; 1318 QCMINFO_IDMAP const* pIdMap; 1319 } QCMINFO, *LPQCMINFO; 1320 1321 #define TBIF_DEFAULT 0x00000000 1322 #define TBIF_APPEND 0x00000000 1323 #define TBIF_PREPEND 0x00000001 1324 #define TBIF_REPLACE 0x00000002 1325 #define TBIF_INTERNETBAR 0x00010000 1326 #define TBIF_STANDARDTOOLBAR 0x00020000 1327 #define TBIF_NOTOOLBAR 0x00030000 1328 1329 typedef struct _TBINFO 1330 { 1331 UINT cbuttons; 1332 UINT uFlags; 1333 } TBINFO, *LPTBINFO; 1334 1335 #include <poppack.h> 1336 1337 /**************************************************************************** 1338 * SHShellFolderView_Message API 1339 */ 1340 1341 LRESULT 1342 WINAPI 1343 SHShellFolderView_Message( 1344 _In_ HWND hwndCabinet, 1345 UINT uMessage, 1346 LPARAM lParam); 1347 1348 /* SHShellFolderView_Message messages */ 1349 #define SFVM_REARRANGE 0x0001 1350 #define SFVM_GETARRANGECOLUMN 0x0002 /* undocumented */ 1351 #define SFVM_ADDOBJECT 0x0003 1352 #define SFVM_GETITEMCOUNT 0x0004 /* undocumented */ 1353 #define SFVM_GETITEMPIDL 0x0005 /* undocumented */ 1354 #define SFVM_REMOVEOBJECT 0x0006 1355 #define SFVM_UPDATEOBJECT 0x0007 1356 #define SFVM_SETREDRAW 0x0008 /* undocumented */ 1357 #define SFVM_GETSELECTEDOBJECTS 0x0009 1358 #define SFVM_ISDROPONSOURCE 0x000A /* undocumented */ 1359 #define SFVM_MOVEICONS 0x000B /* undocumented */ 1360 #define SFVM_GETDRAGPOINT 0x000C /* undocumented */ 1361 #define SFVM_GETDROPPOINT 0x000D /* undocumented */ 1362 #define SFVM_SETITEMPOS 0x000E 1363 #define SFVM_ISDROPONBACKGROUND 0x000F /* undocumented */ 1364 #define SFVM_SETCLIPBOARD 0x0010 1365 #define SFVM_TOGGLEAUTOARRANGE 0x0011 /* undocumented */ 1366 #define SFVM_LINEUPICONS 0x0012 /* undocumented */ 1367 #define SFVM_GETAUTOARRANGE 0x0013 /* undocumented */ 1368 #define SFVM_GETSELECTEDCOUNT 0x0014 /* undocumented */ 1369 #define SFVM_GETITEMSPACING 0x0015 /* undocumented */ 1370 #define SFVM_REFRESHOBJECT 0x0016 /* undocumented */ 1371 #define SFVM_SETPOINTS 0x0017 1372 1373 /**************************************************************************** 1374 * SHGetDataFromIDList API 1375 */ 1376 #define SHGDFIL_FINDDATA 1 1377 #define SHGDFIL_NETRESOURCE 2 1378 #define SHGDFIL_DESCRIPTIONID 3 1379 1380 #define SHDID_ROOT_REGITEM 1 1381 #define SHDID_FS_FILE 2 1382 #define SHDID_FS_DIRECTORY 3 1383 #define SHDID_FS_OTHER 4 1384 #define SHDID_COMPUTER_DRIVE35 5 1385 #define SHDID_COMPUTER_DRIVE525 6 1386 #define SHDID_COMPUTER_REMOVABLE 7 1387 #define SHDID_COMPUTER_FIXED 8 1388 #define SHDID_COMPUTER_NETDRIVE 9 1389 #define SHDID_COMPUTER_CDROM 10 1390 #define SHDID_COMPUTER_RAMDISK 11 1391 #define SHDID_COMPUTER_OTHER 12 1392 #define SHDID_NET_DOMAIN 13 1393 #define SHDID_NET_SERVER 14 1394 #define SHDID_NET_SHARE 15 1395 #define SHDID_NET_RESTOFNET 16 1396 #define SHDID_NET_OTHER 17 1397 #define SHDID_COMPUTER_IMAGING 18 1398 #define SHDID_COMPUTER_AUDIO 19 1399 #define SHDID_COMPUTER_SHAREDDOCS 20 1400 1401 #include <pshpack8.h> 1402 1403 typedef struct _SHDESCRIPTIONID 1404 { DWORD dwDescriptionId; 1405 CLSID clsid; 1406 } SHDESCRIPTIONID, *LPSHDESCRIPTIONID; 1407 1408 #include <poppack.h> 1409 1410 HRESULT 1411 WINAPI 1412 SHGetDataFromIDListA( 1413 _In_ LPSHELLFOLDER psf, 1414 _In_ PCUITEMID_CHILD pidl, 1415 int nFormat, 1416 _Out_writes_bytes_(cb) LPVOID pv, 1417 int cb); 1418 1419 HRESULT 1420 WINAPI 1421 SHGetDataFromIDListW( 1422 _In_ LPSHELLFOLDER psf, 1423 _In_ PCUITEMID_CHILD pidl, 1424 int nFormat, 1425 _Out_writes_bytes_(cb) LPVOID pv, 1426 int cb); 1427 1428 #define SHGetDataFromIDList WINELIB_NAME_AW(SHGetDataFromIDList) 1429 1430 PIDLIST_ABSOLUTE 1431 WINAPI 1432 SHCloneSpecialIDList( 1433 _Reserved_ HWND hwnd, 1434 _In_ int csidl, 1435 _In_ BOOL fCreate); 1436 1437 _Success_(return != 0) 1438 BOOL 1439 WINAPI 1440 SHGetSpecialFolderPathA( 1441 _Reserved_ HWND hwndOwner, 1442 _Out_writes_(MAX_PATH) LPSTR szPath, 1443 _In_ int nFolder, 1444 _In_ BOOL bCreate); 1445 1446 _Success_(return != 0) 1447 BOOL 1448 WINAPI 1449 SHGetSpecialFolderPathW( 1450 _Reserved_ HWND hwndOwner, 1451 _Out_writes_(MAX_PATH) LPWSTR szPath, 1452 _In_ int nFolder, 1453 _In_ BOOL bCreate); 1454 1455 #define SHGetSpecialFolderPath WINELIB_NAME_AW(SHGetSpecialFolderPath) 1456 1457 _Check_return_ HRESULT WINAPI SHGetMalloc(_Outptr_ LPMALLOC *lpmal); 1458 1459 /********************************************************************** 1460 * SHGetSetSettings () 1461 */ 1462 1463 typedef struct 1464 { 1465 BOOL fShowAllObjects : 1; 1466 BOOL fShowExtensions : 1; 1467 BOOL fNoConfirmRecycle : 1; 1468 1469 BOOL fShowSysFiles : 1; 1470 BOOL fShowCompColor : 1; 1471 BOOL fDoubleClickInWebView : 1; 1472 BOOL fDesktopHTML : 1; 1473 BOOL fWin95Classic : 1; 1474 BOOL fDontPrettyPath : 1; 1475 BOOL fShowAttribCol : 1; 1476 BOOL fMapNetDrvBtn : 1; 1477 BOOL fShowInfoTip : 1; 1478 BOOL fHideIcons : 1; 1479 BOOL fWebView : 1; 1480 BOOL fFilter : 1; 1481 BOOL fShowSuperHidden : 1; 1482 BOOL fNoNetCrawling : 1; 1483 1484 UINT :15; /* Required for proper binary layout with gcc */ 1485 DWORD dwWin95Unused; 1486 UINT uWin95Unused; 1487 LONG lParamSort; 1488 int iSortDirection; 1489 UINT version; 1490 UINT uNotUsed; 1491 BOOL fSepProcess: 1; 1492 BOOL fStartPanelOn: 1; 1493 BOOL fShowStartPage: 1; 1494 UINT fSpareFlags : 13; 1495 UINT :15; /* Required for proper binary layout with gcc */ 1496 } SHELLSTATE, *LPSHELLSTATE; 1497 1498 VOID WINAPI SHGetSetSettings(LPSHELLSTATE lpss, DWORD dwMask, BOOL bSet); 1499 1500 /********************************************************************** 1501 * SHGetSettings () 1502 */ 1503 typedef struct 1504 { BOOL fShowAllObjects : 1; 1505 BOOL fShowExtensions : 1; 1506 BOOL fNoConfirmRecycle : 1; 1507 BOOL fShowSysFiles : 1; 1508 1509 BOOL fShowCompColor : 1; 1510 BOOL fDoubleClickInWebView : 1; 1511 BOOL fDesktopHTML : 1; 1512 BOOL fWin95Classic : 1; 1513 1514 BOOL fDontPrettyPath : 1; 1515 BOOL fShowAttribCol : 1; 1516 BOOL fMapNetDrvBtn : 1; 1517 BOOL fShowInfoTip : 1; 1518 1519 BOOL fHideIcons : 1; 1520 UINT fRestFlags : 3; 1521 UINT :15; /* Required for proper binary layout with gcc */ 1522 } SHELLFLAGSTATE, * LPSHELLFLAGSTATE; 1523 1524 VOID WINAPI SHGetSettings(_Out_ LPSHELLFLAGSTATE lpsfs, DWORD dwMask); 1525 1526 #define SSF_SHOWALLOBJECTS 0x0001 1527 #define SSF_SHOWEXTENSIONS 0x0002 1528 #define SSF_SHOWCOMPCOLOR 0x0008 1529 #define SSF_SHOWSYSFILES 0x0020 1530 #define SSF_DOUBLECLICKINWEBVIEW 0x0080 1531 #define SSF_SHOWATTRIBCOL 0x0100 1532 #define SSF_DESKTOPHTML 0x0200 1533 #define SSF_WIN95CLASSIC 0x0400 1534 #define SSF_DONTPRETTYPATH 0x0800 1535 #define SSF_SHOWINFOTIP 0x2000 1536 #define SSF_MAPNETDRVBUTTON 0x1000 1537 #define SSF_NOCONFIRMRECYCLE 0x8000 1538 #define SSF_HIDEICONS 0x4000 1539 #define SSF_SHOWSUPERHIDDEN 0x00040000 1540 #define SSF_SEPPROCESS 0x00080000 1541 1542 /**************************************************************************** 1543 * SHRestricted API 1544 */ 1545 typedef enum RESTRICTIONS 1546 { 1547 REST_NONE = 0x00000000, 1548 REST_NORUN = 0x00000001, 1549 REST_NOCLOSE = 0x00000002, 1550 REST_NOSAVESET = 0x00000004, 1551 REST_NOFILEMENU = 0x00000008, 1552 REST_NOSETFOLDERS = 0x00000010, 1553 REST_NOSETTASKBAR = 0x00000020, 1554 REST_NODESKTOP = 0x00000040, 1555 REST_NOFIND = 0x00000080, 1556 REST_NODRIVES = 0x00000100, 1557 REST_NODRIVEAUTORUN = 0x00000200, 1558 REST_NODRIVETYPEAUTORUN = 0x00000400, 1559 REST_NONETHOOD = 0x00000800, 1560 REST_STARTBANNER = 0x00001000, 1561 REST_RESTRICTRUN = 0x00002000, 1562 REST_NOPRINTERTABS = 0x00004000, 1563 REST_NOPRINTERDELETE = 0x00008000, 1564 REST_NOPRINTERADD = 0x00010000, 1565 REST_NOSTARTMENUSUBFOLDERS = 0x00020000, 1566 REST_MYDOCSONNET = 0x00040000, 1567 REST_NOEXITTODOS = 0x00080000, 1568 REST_ENFORCESHELLEXTSECURITY = 0x00100000, 1569 REST_LINKRESOLVEIGNORELINKINFO = 0x00200000, 1570 REST_NOCOMMONGROUPS = 0x00400000, 1571 REST_SEPARATEDESKTOPPROCESS = 0x00800000, 1572 REST_NOWEB = 0x01000000, 1573 REST_NOTRAYCONTEXTMENU = 0x02000000, 1574 REST_NOVIEWCONTEXTMENU = 0x04000000, 1575 REST_NONETCONNECTDISCONNECT = 0x08000000, 1576 REST_STARTMENULOGOFF = 0x10000000, 1577 REST_NOSETTINGSASSIST = 0x20000000, 1578 REST_NOINTERNETICON = 0x40000001, 1579 REST_NORECENTDOCSHISTORY, 1580 REST_NORECENTDOCSMENU, 1581 REST_NOACTIVEDESKTOP, 1582 REST_NOACTIVEDESKTOPCHANGES, 1583 REST_NOFAVORITESMENU, 1584 REST_CLEARRECENTDOCSONEXIT, 1585 REST_CLASSICSHELL, 1586 REST_NOCUSTOMIZEWEBVIEW, 1587 1588 REST_NOHTMLWALLPAPER = 0x40000010, 1589 REST_NOCHANGINGWALLPAPER, 1590 REST_NODESKCOMP, 1591 REST_NOADDDESKCOMP, 1592 REST_NODELDESKCOMP, 1593 REST_NOCLOSEDESKCOMP, 1594 REST_NOCLOSE_DRAGDROPBAND, 1595 REST_NOMOVINGBAND, 1596 REST_NOEDITDESKCOMP, 1597 REST_NORESOLVESEARCH, 1598 REST_NORESOLVETRACK, 1599 REST_FORCECOPYACLWITHFILE, 1600 #if (NTDDI_VERSION < NTDDI_LONGHORN) 1601 REST_NOLOGO3CHANNELNOTIFY = 0x4000001C, 1602 #endif 1603 REST_NOFORGETSOFTWAREUPDATE = 0x4000001D, 1604 REST_NOSETACTIVEDESKTOP, 1605 REST_NOUPDATEWINDOWS, 1606 REST_NOCHANGESTARMENU, /* 0x40000020 */ 1607 REST_NOFOLDEROPTIONS, 1608 REST_HASFINDCOMPUTERS, 1609 REST_INTELLIMENUS, 1610 REST_RUNDLGMEMCHECKBOX, 1611 REST_ARP_ShowPostSetup, 1612 REST_NOCSC, 1613 REST_NOCONTROLPANEL, 1614 REST_ENUMWORKGROUP, 1615 REST_ARP_NOARP, 1616 REST_ARP_NOREMOVEPAGE, 1617 REST_ARP_NOADDPAGE, 1618 REST_ARP_NOWINSETUPPAGE, 1619 REST_GREYMSIADS, 1620 REST_NOCHANGEMAPPEDDRIVELABEL, 1621 REST_NOCHANGEMAPPEDDRIVECOMMENT, 1622 REST_MaxRecentDocs, /* 0x40000030 */ 1623 REST_NONETWORKCONNECTIONS, 1624 REST_FORCESTARTMENULOGOFF, 1625 REST_NOWEBVIEW, 1626 REST_NOCUSTOMIZETHISFOLDER, 1627 REST_NOENCRYPTION, 1628 1629 REST_ALLOWFRENCHENCRYPTION, /* not documented */ 1630 1631 REST_DONTSHOWSUPERHIDDEN, 1632 REST_NOSHELLSEARCHBUTTON, 1633 REST_NOHARDWARETAB, 1634 REST_NORUNASINSTALLPROMPT, 1635 REST_PROMPTRUNASINSTALLNETPATH, 1636 REST_NOMANAGEMYCOMPUTERVERB, 1637 REST_NORECENTDOCSNETHOOD, 1638 REST_DISALLOWRUN, 1639 REST_NOWELCOMESCREEN, 1640 REST_RESTRICTCPL, /* 0x40000040 */ 1641 REST_DISALLOWCPL, 1642 REST_NOSMBALLOONTIP, 1643 REST_NOSMHELP, 1644 REST_NOWINKEYS, 1645 REST_NOENCRYPTONMOVE, 1646 REST_NOLOCALMACHINERUN, 1647 REST_NOCURRENTUSERRUN, 1648 REST_NOLOCALMACHINERUNONCE, 1649 REST_NOCURRENTUSERRUNONCE, 1650 REST_FORCEACTIVEDESKTOPON, 1651 REST_NOCOMPUTERSNEARME, 1652 REST_NOVIEWONDRIVE, 1653 REST_NONETCRAWL, 1654 REST_NOSHAREDDOCUMENTS, 1655 REST_NOSMMYDOCS, 1656 REST_NOSMMYPICS, /* 0x40000050 */ 1657 REST_ALLOWBITBUCKDRIVES, 1658 REST_NONLEGACYSHELLMODE, 1659 REST_NOCONTROLPANELBARRICADE, 1660 REST_NOSTARTPAGE, 1661 REST_NOAUTOTRAYNOTIFY, 1662 REST_NOTASKGROUPING, 1663 REST_NOCDBURNING, 1664 REST_MYCOMPNOPROP, 1665 REST_MYDOCSNOPROP, 1666 REST_NOSTARTPANEL, 1667 REST_NODISPLAYAPPEARANCEPAGE, 1668 REST_NOTHEMESTAB, 1669 REST_NOVISUALSTYLECHOICE, 1670 REST_NOSIZECHOICE, 1671 REST_NOCOLORCHOICE, 1672 REST_SETVISUALSTYLE, /* 0x40000060 */ 1673 REST_STARTRUNNOHOMEPATH, 1674 REST_NOUSERNAMEINSTARTPANEL, 1675 REST_NOMYCOMPUTERICON, 1676 REST_NOSMNETWORKPLACES, 1677 REST_NOSMPINNEDLIST, 1678 REST_NOSMMYMUSIC, 1679 REST_NOSMEJECTPC, 1680 REST_NOSMMOREPROGRAMS, 1681 REST_NOSMMFUPROGRAMS, 1682 REST_NOTRAYITEMSDISPLAY, 1683 REST_NOTOOLBARSONTASKBAR, 1684 /* 0x4000006C 1685 0x4000006D 1686 0x4000006E */ 1687 REST_NOSMCONFIGUREPROGRAMS = 0x4000006F, 1688 REST_HIDECLOCK, /* 0x40000070 */ 1689 REST_NOLOWDISKSPACECHECKS, 1690 REST_NOENTIRENETWORK, 1691 REST_NODESKTOPCLEANUP, 1692 REST_BITBUCKNUKEONDELETE, 1693 REST_BITBUCKCONFIRMDELETE, 1694 REST_BITBUCKNOPROP, 1695 REST_NODISPBACKGROUND, 1696 REST_NODISPSCREENSAVEPG, 1697 REST_NODISPSETTINGSPG, 1698 REST_NODISPSCREENSAVEPREVIEW, 1699 REST_NODISPLAYCPL, 1700 REST_HIDERUNASVERB, 1701 REST_NOTHUMBNAILCACHE, 1702 REST_NOSTRCMPLOGICAL, 1703 REST_NOPUBLISHWIZARD, 1704 REST_NOONLINEPRINTSWIZARD, /* 0x40000080 */ 1705 REST_NOWEBSERVICES, 1706 REST_ALLOWUNHASHEDWEBVIEW, 1707 REST_ALLOWLEGACYWEBVIEW, 1708 REST_REVERTWEBVIEWSECURITY, 1709 1710 REST_INHERITCONSOLEHANDLES = 0x40000086, 1711 1712 REST_NODISCONNECT = 0x41000001, 1713 REST_NOSECURITY, 1714 REST_NOFILEASSOCIATE, /* 0x41000003 */ 1715 } RESTRICTIONS; 1716 1717 DWORD WINAPI SHRestricted(RESTRICTIONS rest); 1718 1719 /**************************************************************************** 1720 * SHChangeNotify API 1721 */ 1722 typedef struct _SHChangeNotifyEntry 1723 { 1724 PCIDLIST_ABSOLUTE pidl; 1725 BOOL fRecursive; 1726 } SHChangeNotifyEntry; 1727 1728 #define SHCNE_RENAMEITEM 0x00000001 1729 #define SHCNE_CREATE 0x00000002 1730 #define SHCNE_DELETE 0x00000004 1731 #define SHCNE_MKDIR 0x00000008 1732 #define SHCNE_RMDIR 0x00000010 1733 #define SHCNE_MEDIAINSERTED 0x00000020 1734 #define SHCNE_MEDIAREMOVED 0x00000040 1735 #define SHCNE_DRIVEREMOVED 0x00000080 1736 #define SHCNE_DRIVEADD 0x00000100 1737 #define SHCNE_NETSHARE 0x00000200 1738 #define SHCNE_NETUNSHARE 0x00000400 1739 #define SHCNE_ATTRIBUTES 0x00000800 1740 #define SHCNE_UPDATEDIR 0x00001000 1741 #define SHCNE_UPDATEITEM 0x00002000 1742 #define SHCNE_SERVERDISCONNECT 0x00004000 1743 #define SHCNE_UPDATEIMAGE 0x00008000 1744 #define SHCNE_DRIVEADDGUI 0x00010000 1745 #define SHCNE_RENAMEFOLDER 0x00020000 1746 #define SHCNE_FREESPACE 0x00040000 1747 1748 #define SHCNE_EXTENDED_EVENT 0x04000000 1749 #define SHCNE_ASSOCCHANGED 0x08000000 1750 #define SHCNE_DISKEVENTS 0x0002381F 1751 #define SHCNE_GLOBALEVENTS 0x0C0581E0 1752 #define SHCNE_ALLEVENTS 0x7FFFFFFF 1753 #define SHCNE_INTERRUPT 0x80000000 1754 1755 #define SHCNEE_ORDERCHANGED 0x0002L 1756 #define SHCNEE_MSI_CHANGE 0x0004L 1757 #define SHCNEE_MSI_UNINSTALL 0x0005L 1758 1759 #define SHCNF_IDLIST 0x0000 1760 #define SHCNF_PATHA 0x0001 1761 #define SHCNF_PRINTERA 0x0002 1762 #define SHCNF_DWORD 0x0003 1763 #define SHCNF_PATHW 0x0005 1764 #define SHCNF_PRINTERW 0x0006 1765 #define SHCNF_TYPE 0x00FF 1766 #define SHCNF_FLUSH 0x1000 1767 #define SHCNF_FLUSHNOWAIT 0x3000 1768 #define SHCNF_NOTIFYRECURSIVE 0x10000 1769 1770 #define SHCNF_PATH WINELIB_NAME_AW(SHCNF_PATH) 1771 #define SHCNF_PRINTER WINELIB_NAME_AW(SHCNF_PRINTER) 1772 1773 #define SHCNRF_InterruptLevel 0x0001 1774 #define SHCNRF_ShellLevel 0x0002 1775 #define SHCNRF_RecursiveInterrupt 0x1000 1776 #define SHCNRF_NewDelivery 0x8000 1777 1778 void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2); 1779 1780 typedef enum { 1781 SLDF_DEFAULT = 0x00000000, 1782 SLDF_HAS_ID_LIST = 0x00000001, 1783 SLDF_HAS_LINK_INFO = 0x00000002, 1784 SLDF_HAS_NAME = 0x00000004, 1785 SLDF_HAS_RELPATH = 0x00000008, 1786 SLDF_HAS_WORKINGDIR = 0x00000010, 1787 SLDF_HAS_ARGS = 0x00000020, 1788 SLDF_HAS_ICONLOCATION = 0x00000040, 1789 SLDF_UNICODE = 0x00000080, 1790 SLDF_FORCE_NO_LINKINFO = 0x00000100, 1791 SLDF_HAS_EXP_SZ = 0x00000200, 1792 SLDF_RUN_IN_SEPARATE = 0x00000400, 1793 #if (NTDDI_VERSION < NTDDI_LONGHORN) 1794 SLDF_HAS_LOGO3ID = 0x00000800, 1795 #endif 1796 SLDF_HAS_DARWINID = 0x00001000, 1797 SLDF_RUNAS_USER = 0x00002000, 1798 SLDF_HAS_EXP_ICON_SZ = 0x00004000, 1799 SLDF_NO_PIDL_ALIAS = 0x00008000, 1800 SLDF_FORCE_UNCNAME = 0x00010000, 1801 SLDF_RUN_WITH_SHIMLAYER = 0x00020000, 1802 #if (NTDDI_VERSION >= NTDDI_LONGHORN) 1803 SLDF_FORCE_NO_LINKTRACK = 0x00040000, 1804 SLDF_ENABLE_TARGET_METADATA = 0x00080000, 1805 SLDF_DISABLE_LINK_PATH_TRACKING = 0x00100000, 1806 SLDF_DISABLE_KNOWNFOLDER_RELATIVE_TRACKING = 0x00200000, 1807 #if (NTDDI_VERSION >= NTDDI_WIN7) 1808 SLDF_NO_KF_ALIAS = 0x00400000, 1809 SLDF_ALLOW_LINK_TO_LINK = 0x00800000, 1810 SLDF_UNALIAS_ON_SAVE = 0x01000000, 1811 SLDF_PREFER_ENVIRONMENT_PATH = 0x02000000, 1812 SLDF_KEEP_LOCAL_IDLIST_FOR_UNC_TARGET = 0x04000000, 1813 #if (NTDDI_VERSION >= NTDDI_WIN8) 1814 SLDF_PERSIST_VOLUME_ID_RELATIVE = 0x08000000, 1815 SLDF_VALID = 0x0ffff7ff, /* Windows 8 */ 1816 #else 1817 SLDF_VALID = 0x07fff7ff, /* Windows 7 */ 1818 #endif 1819 #else 1820 SLDF_VALID = 0x003ff7ff, /* Windows Vista */ 1821 #endif 1822 #endif 1823 SLDF_RESERVED = 0x80000000, 1824 } SHELL_LINK_DATA_FLAGS; 1825 1826 typedef struct tagDATABLOCKHEADER 1827 { 1828 DWORD cbSize; 1829 DWORD dwSignature; 1830 } DATABLOCK_HEADER, *LPDATABLOCK_HEADER, *LPDBLIST; 1831 1832 #ifdef LF_FACESIZE 1833 typedef struct { 1834 DATABLOCK_HEADER dbh; 1835 WORD wFillAttribute; 1836 WORD wPopupFillAttribute; 1837 COORD dwScreenBufferSize; 1838 COORD dwWindowSize; 1839 COORD dwWindowOrigin; 1840 DWORD nFont; 1841 DWORD nInputBufferSize; 1842 COORD dwFontSize; 1843 UINT uFontFamily; 1844 UINT uFontWeight; 1845 WCHAR FaceName[LF_FACESIZE]; 1846 UINT uCursorSize; 1847 BOOL bFullScreen; 1848 BOOL bQuickEdit; 1849 BOOL bInsertMode; 1850 BOOL bAutoPosition; 1851 UINT uHistoryBufferSize; 1852 UINT uNumberOfHistoryBuffers; 1853 BOOL bHistoryNoDup; 1854 COLORREF ColorTable[16]; 1855 } NT_CONSOLE_PROPS, *LPNT_CONSOLE_PROPS; 1856 #endif 1857 1858 typedef struct { 1859 DATABLOCK_HEADER dbh; 1860 UINT uCodePage; 1861 } NT_FE_CONSOLE_PROPS, *LPNT_FE_CONSOLE_PROPS; 1862 1863 typedef struct { 1864 DWORD cbSize; 1865 DWORD dwSignature; 1866 CHAR szTarget[MAX_PATH]; 1867 WCHAR szwTarget[MAX_PATH]; 1868 } EXP_SZ_LINK, *LPEXP_SZ_LINK; 1869 1870 typedef struct { 1871 DATABLOCK_HEADER dbh; 1872 CHAR szDarwinID[MAX_PATH]; 1873 WCHAR szwDarwinID[MAX_PATH]; 1874 } EXP_DARWIN_LINK, *LPEXP_DARWIN_LINK; 1875 1876 typedef struct { 1877 DWORD cbSize; 1878 DWORD dwSignature; 1879 DWORD idSpecialFolder; 1880 DWORD cbOffset; 1881 } EXP_SPECIAL_FOLDER, *LPEXP_SPECIAL_FOLDER; 1882 1883 typedef struct { 1884 DWORD cbSize; 1885 DWORD dwSignature; 1886 BYTE abPropertyStorage[1]; 1887 } EXP_PROPERTYSTORAGE; 1888 1889 #define EXP_SZ_LINK_SIG 0xA0000001 /* EXP_SZ_LINK */ 1890 #define NT_CONSOLE_PROPS_SIG 0xA0000002 /* NT_CONSOLE_PROPS */ 1891 #define NT_FE_CONSOLE_PROPS_SIG 0xA0000004 /* NT_FE_CONSOLE_PROPS */ 1892 #define EXP_SPECIAL_FOLDER_SIG 0xA0000005 /* EXP_SPECIAL_FOLDER */ 1893 #define EXP_DARWIN_ID_SIG 0xA0000006 /* EXP_DARWIN_LINK */ 1894 #if (NTDDI_VERSION < NTDDI_LONGHORN) 1895 #define EXP_LOGO3_ID_SIG 0xA0000007 /* EXP_DARWIN_LINK, for Logo3 / MS Internet Component Download (MSICD) shortcuts; old SDKs only (deprecated) */ 1896 #endif 1897 #define EXP_SZ_ICON_SIG 0xA0000007 /* EXP_SZ_LINK */ 1898 #define EXP_PROPERTYSTORAGE_SIG 0xA0000009 /* EXP_PROPERTYSTORAGE */ 1899 1900 typedef struct _SHChangeDWORDAsIDList { 1901 USHORT cb; 1902 DWORD dwItem1; 1903 DWORD dwItem2; 1904 USHORT cbZero; 1905 } SHChangeDWORDAsIDList, *LPSHChangeDWORDAsIDList; 1906 1907 typedef struct _SHChangeProductKeyAsIDList { 1908 USHORT cb; 1909 WCHAR wszProductKey[39]; 1910 USHORT cbZero; 1911 } SHChangeProductKeyAsIDList, *LPSHChangeProductKeyAsIDList; 1912 1913 ULONG 1914 WINAPI 1915 SHChangeNotifyRegister( 1916 _In_ HWND hwnd, 1917 int fSources, 1918 LONG fEvents, 1919 UINT wMsg, 1920 int cEntries, 1921 _In_ SHChangeNotifyEntry *pshcne); 1922 1923 BOOL WINAPI SHChangeNotifyDeregister(ULONG ulID); 1924 1925 HANDLE 1926 WINAPI 1927 SHChangeNotification_Lock( 1928 _In_ HANDLE hChangeNotification, 1929 DWORD dwProcessId, 1930 _Outptr_opt_result_buffer_(2)_Outptr_opt_result_buffer_(2) PIDLIST_ABSOLUTE **pppidl, 1931 _Out_opt_ LONG *plEvent); 1932 1933 BOOL WINAPI SHChangeNotification_Unlock(_In_ HANDLE hLock); 1934 1935 HRESULT 1936 WINAPI 1937 SHGetRealIDL( 1938 _In_ IShellFolder *psf, 1939 _In_ PCUITEMID_CHILD pidlSimple, 1940 _Outptr_ PITEMID_CHILD * ppidlReal); 1941 1942 /**************************************************************************** 1943 * SHCreateDirectory API 1944 */ 1945 int WINAPI SHCreateDirectory(_In_opt_ HWND, _In_ LPCWSTR); 1946 1947 int 1948 WINAPI 1949 SHCreateDirectoryExA( 1950 _In_opt_ HWND, 1951 _In_ LPCSTR, 1952 _In_opt_ LPSECURITY_ATTRIBUTES); 1953 1954 int 1955 WINAPI 1956 SHCreateDirectoryExW( 1957 _In_opt_ HWND, 1958 _In_ LPCWSTR, 1959 _In_opt_ LPSECURITY_ATTRIBUTES); 1960 1961 #define SHCreateDirectoryEx WINELIB_NAME_AW(SHCreateDirectoryEx) 1962 1963 /**************************************************************************** 1964 * SHGetSpecialFolderLocation API 1965 */ 1966 _Check_return_ 1967 HRESULT 1968 WINAPI 1969 SHGetSpecialFolderLocation( 1970 _Reserved_ HWND hwndOwner, 1971 _In_ int nFolder, 1972 _Outptr_ PIDLIST_ABSOLUTE *ppidl); 1973 1974 HRESULT 1975 WINAPI 1976 SHGetFolderLocation( 1977 _Reserved_ HWND hwndOwner, 1978 _In_ int nFolder, 1979 _In_opt_ HANDLE hToken, 1980 _In_ DWORD dwReserved, 1981 _Outptr_ PIDLIST_ABSOLUTE *ppidl); 1982 1983 /**************************************************************************** 1984 * SHGetFolderPath API 1985 */ 1986 typedef enum { 1987 SHGFP_TYPE_CURRENT = 0, 1988 SHGFP_TYPE_DEFAULT = 1 1989 } SHGFP_TYPE; 1990 1991 HRESULT 1992 WINAPI 1993 SHGetFolderPathA( 1994 _Reserved_ HWND hwnd, 1995 _In_ int nFolder, 1996 _In_opt_ HANDLE hToken, 1997 _In_ DWORD dwFlags, 1998 _Out_writes_(MAX_PATH) LPSTR pszPath); 1999 2000 HRESULT 2001 WINAPI 2002 SHGetFolderPathW( 2003 _Reserved_ HWND hwnd, 2004 _In_ int nFolder, 2005 _In_opt_ HANDLE hToken, 2006 _In_ DWORD dwFlags, 2007 _Out_writes_(MAX_PATH) LPWSTR pszPath); 2008 2009 #define SHGetFolderPath WINELIB_NAME_AW(SHGetFolderPath) 2010 2011 #define CSIDL_DESKTOP 0x0000 2012 #define CSIDL_INTERNET 0x0001 2013 #define CSIDL_PROGRAMS 0x0002 2014 #define CSIDL_CONTROLS 0x0003 2015 #define CSIDL_PRINTERS 0x0004 2016 #define CSIDL_PERSONAL 0x0005 2017 #define CSIDL_FAVORITES 0x0006 2018 #define CSIDL_STARTUP 0x0007 2019 #define CSIDL_RECENT 0x0008 2020 #define CSIDL_SENDTO 0x0009 2021 #define CSIDL_BITBUCKET 0x000a 2022 #define CSIDL_STARTMENU 0x000b 2023 #define CSIDL_MYDOCUMENTS CSIDL_PERSONAL 2024 #define CSIDL_MYMUSIC 0x000d 2025 #define CSIDL_MYVIDEO 0x000e 2026 #define CSIDL_DESKTOPDIRECTORY 0x0010 2027 #define CSIDL_DRIVES 0x0011 2028 #define CSIDL_NETWORK 0x0012 2029 #define CSIDL_NETHOOD 0x0013 2030 #define CSIDL_FONTS 0x0014 2031 #define CSIDL_TEMPLATES 0x0015 2032 #define CSIDL_COMMON_STARTMENU 0x0016 2033 #define CSIDL_COMMON_PROGRAMS 0X0017 2034 #define CSIDL_COMMON_STARTUP 0x0018 2035 #define CSIDL_COMMON_DESKTOPDIRECTORY 0x0019 2036 #define CSIDL_APPDATA 0x001a 2037 #define CSIDL_PRINTHOOD 0x001b 2038 #define CSIDL_LOCAL_APPDATA 0x001c 2039 #define CSIDL_ALTSTARTUP 0x001d 2040 #define CSIDL_COMMON_ALTSTARTUP 0x001e 2041 #define CSIDL_COMMON_FAVORITES 0x001f 2042 #define CSIDL_INTERNET_CACHE 0x0020 2043 #define CSIDL_COOKIES 0x0021 2044 #define CSIDL_HISTORY 0x0022 2045 #define CSIDL_COMMON_APPDATA 0x0023 2046 #define CSIDL_WINDOWS 0x0024 2047 #define CSIDL_SYSTEM 0x0025 2048 #define CSIDL_PROGRAM_FILES 0x0026 2049 #define CSIDL_MYPICTURES 0x0027 2050 #define CSIDL_PROFILE 0x0028 2051 #define CSIDL_SYSTEMX86 0x0029 2052 #define CSIDL_PROGRAM_FILESX86 0x002a 2053 #define CSIDL_PROGRAM_FILES_COMMON 0x002b 2054 #define CSIDL_PROGRAM_FILES_COMMONX86 0x002c 2055 #define CSIDL_COMMON_TEMPLATES 0x002d 2056 #define CSIDL_COMMON_DOCUMENTS 0x002e 2057 #define CSIDL_COMMON_ADMINTOOLS 0x002f 2058 #define CSIDL_ADMINTOOLS 0x0030 2059 #define CSIDL_CONNECTIONS 0x0031 2060 #define CSIDL_COMMON_MUSIC 0x0035 2061 #define CSIDL_COMMON_PICTURES 0x0036 2062 #define CSIDL_COMMON_VIDEO 0x0037 2063 #define CSIDL_RESOURCES 0x0038 2064 #define CSIDL_RESOURCES_LOCALIZED 0x0039 2065 #define CSIDL_COMMON_OEM_LINKS 0x003a 2066 #define CSIDL_CDBURN_AREA 0x003b 2067 #define CSIDL_COMPUTERSNEARME 0x003d 2068 #define CSIDL_PROFILES 0x003e 2069 #define CSIDL_FOLDER_MASK 0x00ff 2070 #define CSIDL_FLAG_PER_USER_INIT 0x0800 2071 #define CSIDL_FLAG_NO_ALIAS 0x1000 2072 #define CSIDL_FLAG_DONT_VERIFY 0x4000 2073 #define CSIDL_FLAG_CREATE 0x8000 2074 2075 #define CSIDL_FLAG_MASK 0xff00 2076 2077 /**************************************************************************** 2078 * SHGetDesktopFolder API 2079 */ 2080 _Check_return_ HRESULT WINAPI SHGetDesktopFolder(_Outptr_ IShellFolder * *); 2081 2082 /**************************************************************************** 2083 * SHBindToParent API 2084 */ 2085 HRESULT 2086 WINAPI 2087 SHBindToParent( 2088 _In_ PCIDLIST_ABSOLUTE pidl, 2089 _In_ REFIID riid, 2090 _Outptr_ LPVOID *ppv, 2091 _Outptr_opt_ PCUITEMID_CHILD *ppidlLast); 2092 2093 /**************************************************************************** 2094 * SHDefExtractIcon API 2095 */ 2096 HRESULT 2097 WINAPI 2098 SHDefExtractIconA( 2099 _In_ LPCSTR pszIconFile, 2100 int iIndex, 2101 UINT uFlags, 2102 _Out_opt_ HICON* phiconLarge, 2103 _Out_opt_ HICON* phiconSmall, 2104 UINT nIconSize); 2105 2106 HRESULT 2107 WINAPI 2108 SHDefExtractIconW( 2109 _In_ LPCWSTR pszIconFile, 2110 int iIndex, 2111 UINT uFlags, 2112 _Out_opt_ HICON* phiconLarge, 2113 _Out_opt_ HICON* phiconSmall, 2114 UINT nIconSize); 2115 2116 #define SHDefExtractIcon WINELIB_NAME_AW(SHDefExtractIcon) 2117 2118 /* 2119 * DROPFILES for CF_HDROP and CF_PRINTERS 2120 */ 2121 typedef struct _DROPFILES 2122 { 2123 DWORD pFiles; 2124 POINT pt; 2125 BOOL fNC; 2126 BOOL fWide; 2127 } DROPFILES, *LPDROPFILES; 2128 2129 2130 /* 2131 * FILEDESCRIPTOR[A|W].dwFlags 2132 */ 2133 #define FD_CLSID 0x00000001 2134 #define FD_SIZEPOINT 0x00000002 2135 #define FD_ATTRIBUTES 0x00000004 2136 #define FD_CREATETIME 0x00000008 2137 #define FD_ACCESSTIME 0x00000010 2138 #define FD_WRITESTIME 0x00000020 2139 #define FD_FILESIZE 0x00000040 2140 #define FD_PROGRESSUI 0x00004000 2141 #define FD_LINKUI 0x00008000 2142 #if (NTDDI_VERSION >= NTDDI_VISTA) 2143 #define FD_UNICODE 0x80000000 2144 #endif 2145 2146 /* 2147 * Properties of a file in the clipboard 2148 */ 2149 typedef struct _FILEDESCRIPTORA { 2150 DWORD dwFlags; 2151 CLSID clsid; 2152 SIZEL sizel; 2153 POINTL pointl; 2154 DWORD dwFileAttributes; 2155 FILETIME ftCreationTime; 2156 FILETIME ftLastAccessTime; 2157 FILETIME ftLastWriteTime; 2158 DWORD nFileSizeHigh; 2159 DWORD nFileSizeLow; 2160 CHAR cFileName[MAX_PATH]; 2161 } FILEDESCRIPTORA, *LPFILEDESCRIPTORA; 2162 2163 typedef struct _FILEDESCRIPTORW { 2164 DWORD dwFlags; 2165 CLSID clsid; 2166 SIZEL sizel; 2167 POINTL pointl; 2168 DWORD dwFileAttributes; 2169 FILETIME ftCreationTime; 2170 FILETIME ftLastAccessTime; 2171 FILETIME ftLastWriteTime; 2172 DWORD nFileSizeHigh; 2173 DWORD nFileSizeLow; 2174 WCHAR cFileName[MAX_PATH]; 2175 } FILEDESCRIPTORW, *LPFILEDESCRIPTORW; 2176 2177 DECL_WINELIB_TYPE_AW(FILEDESCRIPTOR) 2178 DECL_WINELIB_TYPE_AW(LPFILEDESCRIPTOR) 2179 2180 /* 2181 * CF_FILEGROUPDESCRIPTOR clipboard format 2182 */ 2183 typedef struct _FILEGROUPDESCRIPTORA { 2184 UINT cItems; 2185 FILEDESCRIPTORA fgd[1]; 2186 } FILEGROUPDESCRIPTORA, *LPFILEGROUPDESCRIPTORA; 2187 2188 typedef struct _FILEGROUPDESCRIPTORW { 2189 UINT cItems; 2190 FILEDESCRIPTORW fgd[1]; 2191 } FILEGROUPDESCRIPTORW, *LPFILEGROUPDESCRIPTORW; 2192 2193 DECL_WINELIB_TYPE_AW(FILEGROUPDESCRIPTOR) 2194 DECL_WINELIB_TYPE_AW(LPFILEGROUPDESCRIPTOR) 2195 2196 /**************************************************************************** 2197 * Cabinet functions 2198 */ 2199 2200 typedef struct { 2201 WORD cLength; 2202 WORD nVersion; 2203 BOOL fFullPathTitle:1; 2204 BOOL fSaveLocalView:1; 2205 BOOL fNotShell:1; 2206 BOOL fSimpleDefault:1; 2207 BOOL fDontShowDescBar:1; 2208 BOOL fNewWindowMode:1; 2209 BOOL fShowCompColor:1; 2210 BOOL fDontPrettyNames:1; 2211 BOOL fAdminsCreateCommonGroups:1; 2212 UINT fUnusedFlags:7; 2213 UINT :15; /* Required for proper binary layout with gcc */ 2214 UINT fMenuEnumFilter; 2215 } CABINETSTATE, *LPCABINETSTATE; 2216 2217 #define CABINETSTATE_VERSION 2 2218 2219 BOOL 2220 WINAPI 2221 ReadCabinetState( 2222 _Out_writes_bytes_(cLength) CABINETSTATE *, 2223 int cLength); 2224 2225 BOOL WINAPI WriteCabinetState(_In_ CABINETSTATE *); 2226 2227 /**************************************************************************** 2228 * Path Manipulation Routines 2229 */ 2230 2231 /* PathProcessCommand flags */ 2232 #define PPCF_ADDQUOTES 0x01 2233 #define PPCF_INCLUDEARGS 0x02 2234 #define PPCF_ADDARGUMENTS 0x03 2235 #define PPCF_NODIRECTORIES 0x10 2236 #define PPCF_DONTRESOLVE 0x20 2237 #define PPCF_FORCEQUALIFY 0x40 2238 #define PPCF_LONGESTPOSSIBLE 0x80 2239 2240 /* PathResolve flags */ 2241 #define PRF_VERIFYEXISTS 0x01 2242 #define PRF_EXECUTABLE 0x02 2243 #define PRF_TRYPROGRAMEXTENSIONS (PRF_EXECUTABLE | PRF_VERIFYEXISTS) 2244 #define PRF_FIRSTDIRDEF 0x04 2245 #define PRF_DONTFINDLNK 0x08 // Used when PRF_TRYPROGRAMEXTENSIONS is specified 2246 #if (NTDDI_VERSION >= NTDDI_WINXPSP2) 2247 #define PRF_REQUIREABSOLUTE 0x10 2248 #endif 2249 2250 VOID WINAPI PathGetShortPath(_Inout_updates_(MAX_PATH) LPWSTR pszPath); 2251 2252 LONG 2253 WINAPI 2254 PathProcessCommand( 2255 _In_ LPCWSTR, 2256 _Out_writes_(cchDest) LPWSTR, 2257 int cchDest, 2258 DWORD); 2259 2260 _Success_(return != 0) 2261 BOOL 2262 WINAPI 2263 PathYetAnotherMakeUniqueName( 2264 _Out_writes_(MAX_PATH) LPWSTR, 2265 _In_ LPCWSTR, 2266 _In_opt_ LPCWSTR, 2267 _In_opt_ LPCWSTR); 2268 2269 /**************************************************************************** 2270 * Drag And Drop Routines 2271 */ 2272 2273 /* DAD_AutoScroll sample structure */ 2274 #define NUM_POINTS 3 2275 typedef struct 2276 { 2277 int iNextSample; 2278 DWORD dwLastScroll; 2279 BOOL bFull; 2280 POINT pts[NUM_POINTS]; 2281 DWORD dwTimes[NUM_POINTS]; 2282 } AUTO_SCROLL_DATA; 2283 2284 BOOL WINAPI DAD_SetDragImage(HIMAGELIST,LPPOINT); 2285 BOOL WINAPI DAD_DragEnterEx(HWND,POINT); 2286 BOOL WINAPI DAD_DragEnterEx2(_In_ HWND, POINT, _In_opt_ IDataObject*); 2287 BOOL WINAPI DAD_DragMove(POINT); 2288 BOOL WINAPI DAD_DragLeave(void); 2289 BOOL WINAPI DAD_AutoScroll(HWND,AUTO_SCROLL_DATA*,const POINT*); 2290 2291 HRESULT 2292 WINAPI 2293 SHDoDragDrop( 2294 _In_opt_ HWND, 2295 _In_ IDataObject*, 2296 _In_opt_ IDropSource*, 2297 _In_ DWORD, 2298 _Out_ LPDWORD); 2299 2300 /**************************************************************************** 2301 * Internet shortcut properties 2302 */ 2303 2304 #define PID_IS_URL 2 2305 #define PID_IS_NAME 4 2306 #define PID_IS_WORKINGDIR 5 2307 #define PID_IS_HOTKEY 6 2308 #define PID_IS_SHOWCMD 7 2309 #define PID_IS_ICONINDEX 8 2310 #define PID_IS_ICONFILE 9 2311 #define PID_IS_WHATSNEW 10 2312 #define PID_IS_AUTHOR 11 2313 #define PID_IS_DESCRIPTION 12 2314 #define PID_IS_COMMENT 13 2315 2316 2317 PIDLIST_RELATIVE WINAPI ILAppendID(_In_opt_ PIDLIST_RELATIVE, _In_ LPCSHITEMID, BOOL); 2318 PIDLIST_RELATIVE WINAPI ILClone(_In_ PCUIDLIST_RELATIVE); 2319 PITEMID_CHILD WINAPI ILCloneFirst(_In_ PCUIDLIST_RELATIVE); 2320 PIDLIST_ABSOLUTE WINAPI ILCreateFromPathA(_In_ PCSTR); 2321 PIDLIST_ABSOLUTE WINAPI ILCreateFromPathW(_In_ PCWSTR); 2322 #define ILCreateFromPath WINELIB_NAME_AW(ILCreateFromPath) 2323 PIDLIST_ABSOLUTE WINAPI ILCombine(_In_opt_ PCIDLIST_ABSOLUTE, _In_opt_ PCUIDLIST_RELATIVE); 2324 PUIDLIST_RELATIVE WINAPI ILFindChild(_In_ PIDLIST_ABSOLUTE, _In_ PCIDLIST_ABSOLUTE); 2325 PUITEMID_CHILD WINAPI ILFindLastID(_In_ PCUIDLIST_RELATIVE); 2326 void WINAPI ILFree(_In_opt_ PIDLIST_RELATIVE); 2327 PUIDLIST_RELATIVE WINAPI ILGetNext(_In_opt_ PCUIDLIST_RELATIVE); 2328 UINT WINAPI ILGetSize(_In_opt_ PCUIDLIST_RELATIVE); 2329 BOOL WINAPI ILIsEqual(_In_ PCIDLIST_ABSOLUTE, _In_ PCIDLIST_ABSOLUTE); 2330 BOOL WINAPI ILIsParent(_In_ PCIDLIST_ABSOLUTE, _In_ PCIDLIST_ABSOLUTE, BOOL); 2331 HRESULT WINAPI ILLoadFromStream(_In_ LPSTREAM, _Inout_ PIDLIST_RELATIVE*); 2332 BOOL WINAPI ILRemoveLastID(_Inout_opt_ PUIDLIST_RELATIVE); 2333 HRESULT WINAPI ILSaveToStream(_In_ LPSTREAM, _In_ PCUIDLIST_RELATIVE); 2334 2335 static inline BOOL ILIsEmpty(_In_opt_ PCUIDLIST_RELATIVE pidl) 2336 { 2337 return !(pidl && pidl->mkid.cb); 2338 } 2339 2340 #include <poppack.h> 2341 2342 2343 /* menu merging */ 2344 #define MM_ADDSEPARATOR 0x00000001L 2345 #define MM_SUBMENUSHAVEIDS 0x00000002L 2346 #define MM_DONTREMOVESEPS 0x00000004L 2347 2348 UINT 2349 WINAPI 2350 Shell_MergeMenus( 2351 _In_ HMENU hmDst, 2352 _In_ HMENU hmSrc, 2353 UINT uInsert, 2354 UINT uIDAdjust, 2355 UINT uIDAdjustMax, 2356 ULONG uFlags); 2357 2358 2359 /**************************************************************************** 2360 * SHCreateDefaultContextMenu API 2361 */ 2362 2363 typedef struct 2364 { 2365 HWND hwnd; 2366 IContextMenuCB *pcmcb; 2367 PCIDLIST_ABSOLUTE pidlFolder; 2368 IShellFolder *psf; 2369 UINT cidl; 2370 PCUITEMID_CHILD_ARRAY apidl; 2371 IUnknown *punkAssociationInfo; 2372 UINT cKeys; 2373 const HKEY *aKeys; 2374 }DEFCONTEXTMENU; 2375 2376 HRESULT 2377 WINAPI 2378 SHCreateDefaultContextMenu( 2379 _In_ const DEFCONTEXTMENU *, 2380 _In_ REFIID, 2381 _Outptr_ void **ppv); 2382 2383 typedef HRESULT 2384 (CALLBACK * LPFNDFMCALLBACK)( 2385 _In_opt_ IShellFolder*, 2386 _In_opt_ HWND, 2387 _In_opt_ IDataObject*, 2388 UINT, 2389 WPARAM, 2390 LPARAM); 2391 2392 HRESULT 2393 WINAPI 2394 CDefFolderMenu_Create2( 2395 _In_opt_ PCIDLIST_ABSOLUTE, 2396 _In_opt_ HWND, 2397 UINT cidl, 2398 _In_reads_opt_(cidl) PCUITEMID_CHILD_ARRAY, 2399 _In_opt_ IShellFolder*, 2400 _In_opt_ LPFNDFMCALLBACK, 2401 UINT nKeys, 2402 _In_reads_opt_(nKeys) const HKEY *, 2403 _Outptr_ IContextMenu **); 2404 2405 #define DFM_MERGECONTEXTMENU 1 2406 #define DFM_INVOKECOMMAND 2 2407 #define DFM_INVOKECOMMANDEX 12 2408 #define DFM_GETDEFSTATICID 14 2409 2410 #define DFM_GETHELPTEXT 5 2411 #define DFM_WM_MEASUREITEM 6 2412 #define DFM_WM_DRAWITEM 7 2413 #define DFM_WM_INITMENUPOPUP 8 2414 #define DFM_VALIDATECMD 9 2415 #define DFM_MERGECONTEXTMENU_TOP 10 2416 #define DFM_GETHELPTEXTW 11 2417 #define DFM_MAPCOMMANDNAME 13 2418 #define DFM_GETVERBW 15 2419 #define DFM_GETVERBA 16 2420 #define DFM_MERGECONTEXTMENU_BOTTOM 17 2421 #define DFM_MODIFYQCMFLAGS 18 2422 2423 2424 #define DFM_CMD_DELETE ((UINT)-1) 2425 #define DFM_CMD_MOVE ((UINT)-2) 2426 #define DFM_CMD_COPY ((UINT)-3) 2427 #define DFM_CMD_LINK ((UINT)-4) 2428 #define DFM_CMD_PROPERTIES ((UINT)-5) 2429 #define DFM_CMD_NEWFOLDER ((UINT)-6) 2430 #define DFM_CMD_PASTE ((UINT)-7) 2431 #define DFM_CMD_VIEWLIST ((UINT)-8) 2432 #define DFM_CMD_VIEWDETAILS ((UINT)-9) 2433 #define DFM_CMD_PASTELINK ((UINT)-10) 2434 #define DFM_CMD_PASTESPECIAL ((UINT)-11) 2435 #define DFM_CMD_MODALPROP ((UINT)-12) 2436 #define DFM_CMD_RENAME ((UINT)-13) 2437 2438 /**************************************************************************** 2439 * SHCreateDefaultExtractIcon API 2440 */ 2441 2442 HRESULT WINAPI 2443 SHCreateDefaultExtractIcon( 2444 REFIID riid, 2445 void **ppv); 2446 /**************************************************************************** 2447 * SHCreateDataObject API 2448 */ 2449 2450 HRESULT WINAPI SHCreateDataObject( 2451 _In_opt_ PCIDLIST_ABSOLUTE pidlFolder, 2452 _In_ UINT cidl, 2453 _In_reads_opt_(cidl) PCUITEMID_CHILD_ARRAY apidl, 2454 _In_opt_ IDataObject *pdtInner, 2455 _In_ REFIID riid, 2456 _Outptr_ void **ppv); 2457 2458 /**************************************************************************** 2459 * CIDLData_CreateFromIDArray API 2460 */ 2461 2462 HRESULT WINAPI CIDLData_CreateFromIDArray( 2463 _In_ PCIDLIST_ABSOLUTE pidlFolder, 2464 _In_ UINT cidl, 2465 _In_reads_opt_(cidl) PCUIDLIST_RELATIVE_ARRAY apidl, 2466 _Outptr_ IDataObject **ppdtobj); 2467 2468 /**************************************************************************** 2469 * SHOpenWithDialog 2470 */ 2471 2472 enum tagOPEN_AS_INFO_FLAGS 2473 { 2474 OAIF_ALLOW_REGISTRATION = 1, 2475 OAIF_REGISTER_EXT = 2, 2476 OAIF_EXEC = 4, 2477 OAIF_FORCE_REGISTRATION = 8, 2478 #if (NTDDI_VERSION >= NTDDI_VISTA) 2479 OAIF_HIDE_REGISTRATION = 32, 2480 OAIF_URL_PROTOCOL = 64, 2481 #endif 2482 }; 2483 typedef int OPEN_AS_INFO_FLAGS; 2484 2485 2486 typedef struct tagOPENASINFO { 2487 LPCWSTR pcszFile; 2488 LPCWSTR pcszClass; 2489 OPEN_AS_INFO_FLAGS oaifInFlags; 2490 } OPENASINFO; 2491 2492 HRESULT 2493 WINAPI 2494 SHOpenWithDialog( 2495 _In_opt_ HWND hwndParent, 2496 _In_ const OPENASINFO *poainfo); 2497 2498 #define INTERFACE IShellIconOverlayIdentifier 2499 2500 DECLARE_INTERFACE_(IShellIconOverlayIdentifier, IUnknown) 2501 { 2502 STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE; 2503 STDMETHOD_(ULONG,AddRef) (THIS) PURE; 2504 STDMETHOD_(ULONG,Release) (THIS) PURE; 2505 2506 STDMETHOD (IsMemberOf)(THIS_ _In_ LPCWSTR pwszPath, DWORD dwAttrib) PURE; 2507 STDMETHOD (GetOverlayInfo)(THIS_ _Out_writes_(cchMax) LPWSTR pwszIconFile, int cchMax, _Out_ int * pIndex, _Out_ DWORD * pdwFlags) PURE; 2508 STDMETHOD (GetPriority)(THIS_ _Out_ int * pIPriority) PURE; 2509 }; 2510 2511 #if !defined(__cplusplus) || defined(CINTERFACE) 2512 /*** IUnknown methods ***/ 2513 #define IShellIconOverlayIdentifier_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) 2514 #define IShellIconOverlayIdentifier_AddRef(p) (p)->lpVtbl->AddRef(p) 2515 #define IShellIconOverlayIdentifier_Release(p) (p)->lpVtbl->Release(p) 2516 /*** IShellIconOverlayIdentifier methods ***/ 2517 #define IShellIconOverlayIdentifier_IsMemberOf(p,a,b) (p)->lpVtbl->IsMemberOf(p,a,b) 2518 #define IShellIconOverlayIdentifier_GetOverlayInfo(p,a,b,c,d) (p)->lpVtbl->GetOverlayInfo(p,a,b,c,d) 2519 #define IShellIconOverlayIdentifier_GetPriority(p,a) (p)->lpVtbl->GetPriority(p,a) 2520 #endif 2521 2522 #define ISIOI_ICONFILE 0x00000001 2523 #define ISIOI_ICONINDEX 0x00000002 2524 2525 #undef INTERFACE 2526 2527 /**************************************************************************** 2528 * Travel log 2529 */ 2530 2531 #define TLOG_BACK -1 2532 #define TLOG_FORE 1 2533 2534 #define TLMENUF_INCLUDECURRENT 0x00000001 2535 #define TLMENUF_CHECKCURRENT (TLMENUF_INCLUDECURRENT | 0x00000002) 2536 #define TLMENUF_BACK 0x00000010 // Default 2537 #define TLMENUF_FORE 0x00000020 2538 #define TLMENUF_BACKANDFORTH (TLMENUF_BACK | TLMENUF_FORE | TLMENUF_INCLUDECURRENT) 2539 2540 /***************************************************************************** 2541 * IDockingWindowSite interface 2542 */ 2543 #define INTERFACE IDockingWindowSite 2544 DECLARE_INTERFACE_(IDockingWindowSite, IOleWindow) 2545 { 2546 // *** IUnknown methods *** 2547 STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppv) PURE; 2548 STDMETHOD_(ULONG,AddRef)(THIS) PURE; 2549 STDMETHOD_(ULONG,Release)(THIS) PURE; 2550 2551 // *** IOleWindow methods *** 2552 STDMETHOD(GetWindow)(THIS_ HWND *lphwnd) PURE; 2553 STDMETHOD(ContextSensitiveHelp)(THIS_ BOOL fEnterMode) PURE; 2554 2555 // *** IDockingWindowSite methods *** 2556 STDMETHOD(GetBorderDW)(THIS_ _In_ IUnknown *punkObj, _Out_ LPRECT prcBorder) PURE; 2557 STDMETHOD(RequestBorderSpaceDW)(THIS_ _In_ IUnknown *punkObj, _In_ LPCBORDERWIDTHS pbw) PURE; 2558 STDMETHOD(SetBorderSpaceDW)(THIS_ _In_ IUnknown *punkObj, _In_ LPCBORDERWIDTHS pbw) PURE; 2559 }; 2560 #undef INTERFACE 2561 2562 #if !defined(__cplusplus) || defined(CINTERFACE) 2563 /*** IUnknown methods ***/ 2564 #define IDockingWindowSite_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) 2565 #define IDockingWindowSite_AddRef(p) (p)->lpVtbl->AddRef(p) 2566 #define IDockingWindowSite_Release(p) (p)->lpVtbl->Release(p) 2567 /*** IOleWindow methods ***/ 2568 #define IDockingWindowSite_GetWindow(p,a) (p)->lpVtbl->GetWindow(p,a) 2569 #define IDockingWindowSite_ContextSensitiveHelp(p,a) (p)->lpVtbl->ContextSensitiveHelp(p,a) 2570 /*** IDockingWindowSite methods ***/ 2571 #define IDockingWindowSite_GetBorderDW(p,a,b) (p)->lpVtbl->GetBorderDW(p,a,b) 2572 #define IDockingWindowSite_RequestBorderSpaceDW(p,a,b) (p)->lpVtbl->RequestBorderSpaceDW(p,a,b) 2573 #define IDockingWindowSite_SetBorderSpaceDW(p,a,b) (p)->lpVtbl->SetBorderSpaceDW(p,a,b) 2574 #endif 2575 2576 typedef void (CALLBACK *PFNASYNCICONTASKBALLBACK)(LPCITEMIDLIST pidl, LPVOID pvData, LPVOID pvHint, INT iIconIndex, INT iOpenIconIndex); 2577 2578 #define ISFB_MASK_STATE 0x00000001 2579 #define ISFB_MASK_IDLIST 0x00000010 2580 2581 #define ISFB_STATE_QLINKSMODE 0x00000020 2582 #define ISFB_STATE_NOSHOWTEXT 0x00000004 2583 2584 #include <pshpack8.h> 2585 2586 typedef struct { 2587 DWORD dwMask; 2588 DWORD dwStateMask; 2589 DWORD dwState; 2590 COLORREF crBkgnd; 2591 COLORREF crBtnLt; 2592 COLORREF crBtnDk; 2593 WORD wViewMode; 2594 WORD wAlign; 2595 IShellFolder * psf; 2596 PIDLIST_ABSOLUTE pidl; 2597 } BANDINFOSFB, *PBANDINFOSFB; 2598 2599 #include <poppack.h> 2600 2601 #undef INTERFACE 2602 #define INTERFACE IShellFolderBand 2603 2604 DECLARE_INTERFACE_(IShellFolderBand, IUnknown) 2605 { 2606 // *** IUnknown methods *** 2607 STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE; 2608 STDMETHOD_(ULONG,AddRef) (THIS) PURE; 2609 STDMETHOD_(ULONG,Release) (THIS) PURE; 2610 2611 // *** IShellFolderBand Methods *** 2612 STDMETHOD(InitializeSFB)(THIS_ IShellFolder *psf, PCIDLIST_ABSOLUTE pidl) PURE; 2613 STDMETHOD(SetBandInfoSFB)(THIS_ PBANDINFOSFB pbi) PURE; 2614 STDMETHOD(GetBandInfoSFB)(THIS_ PBANDINFOSFB pbi) PURE; 2615 }; 2616 #undef INTERFACE 2617 2618 2619 /***************************************************************************** 2620 * Control Panel functions 2621 */ 2622 LRESULT WINAPI CallCPLEntry16(HINSTANCE hMod, FARPROC pFunc, HWND dw3, UINT dw4, LPARAM dw5, LPARAM dw6); 2623 2624 #ifdef __cplusplus 2625 } /* extern "C" */ 2626 #endif /* defined(__cplusplus) */ 2627 2628 #endif /* __WINE_SHLOBJ_H */ 2629