Changeset 160 for Include/api_shell.sbp
- Timestamp:
- Mar 13, 2007, 1:13:06 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/api_shell.sbp
r141 r160 16 16 Const _FuncName_ShellAbout = "ShellAboutW" 17 17 Const _FuncName_ShellExecute = "ShellExecuteW" 18 Const _FuncName_ShellExecuteEx = "ShellExecuteExW" 19 Const _FuncName_Shell_NotifyIcon = "_FuncName_Shell_NotifyIconW" 20 Const _FuncName_SHEmptyRecycleBin = "_FuncName_SHEmptyRecycleBinW" 18 21 Const _FuncName_SHFileOperation = "SHFileOperationW" 22 Const _FuncName_SHGetFileInfo = "_FuncName_SHGetFileInfoW" 19 23 Const _FuncName_SHGetPathFromIDList = "SHGetPathFromIDListW" 24 Const _FuncName_SHGetSpecialFolderPath = "_FuncName_SHGetSpecialFolderPathW" 20 25 #else 21 26 Const _FuncName_DoEnvironmentSubst = "DoEnvironmentSubstA" … … 29 34 Const _FuncName_ShellAbout = "ShellAboutA" 30 35 Const _FuncName_ShellExecute = "ShellExecuteA" 36 Const _FuncName_ShellExecuteEx = "ShellExecuteExA" 37 Const _FuncName_Shell_NotifyIcon = "_FuncName_Shell_NotifyIconA" 38 Const _FuncName_SHEmptyRecycleBin = "_FuncName_SHEmptyRecycleBinA" 31 39 Const _FuncName_SHFileOperation = "SHFileOperationA" 40 Const _FuncName_SHGetFileInfo = "_FuncName_SHGetFileInfoA" 32 41 Const _FuncName_SHGetPathFromIDList = "SHGetPathFromIDListA" 33 #endif 42 Const _FuncName_SHGetSpecialFolderPath = "_FuncName_SHGetSpecialFolderPathA" 43 #endif 44 45 Interface IEnumIDList 46 End Interface 34 47 35 48 '----------- 36 49 ' Shell API 37 50 51 ' shellapi.h 38 52 Declare Function DoEnvironmentSubst Lib "shell32" Alias _FuncName_DoEnvironmentSubst ( 39 pszString As P STR,53 pszString As PTSTR, 40 54 cchString As DWord 41 55 ) As DWord 42 56 57 ' shellapi.h 43 58 Declare Sub DragAcceptFiles Lib "shell32" (hWnd As HWND, bAccept As BOOL) 44 59 Declare Sub DragFinish Lib "shell32" (hDrop As HDROP) … … 46 61 Declare Function DragQueryPoint Lib "shell32" (hDrop As HDROP, ByRef lpPoint As POINTAPI) As Long 47 62 Declare Function ExtractAssociatedIcon Lib "shell32" Alias _FuncName_ExtractAssociatedIcon (hInst As HINSTANCE, lpIconPath As LPTSTR, lpiIcon As *Word) As HICON 63 ' Shellapi.h 48 64 Declare Function ExtractIcon Lib "shell32" Alias _FuncName_ExtractIcon (hInst As HINSTANCE, lpszExeFileName As LPCTSTR, nIconIndex As Long) As HICON 49 65 Declare Function ExtractIconEx Lib "shell32" Alias _FuncName_ExtractIconEx (lpszFile As PCSTR, nIconIndex As Long, phiconLarge As *DWord, phiconSmall As *DWord, nIcons As Long) As HICON 50 66 67 ' shellapi.h 51 68 Declare Function FindExecutable Lib "shell32" Alias _FuncName_FindExecutable ( 52 pFile AsPCTSTR,53 pDirectory AsPCTSTR,54 pResult AsPCTSTR69 lpFile As LPCTSTR, 70 lpDirectory As LPCTSTR, 71 lpResult As LPCTSTR 55 72 ) As Long 56 73 … … 72 89 ) As HRESULT 73 90 91 ' shlobj.h 74 92 Declare Sub SHAddToRecentDocs Lib "shell32" (ByVal uFlags As Long, ByVal pv As VoidPtr) 75 93 … … 108 126 End Type 109 127 128 ' shellapi.h 110 129 Declare Function SHAppBarMessage Lib "shell32" (dwMessage As DWord, ByRef Data As APPBARDATA) As ULONG_PTR 111 130 … … 148 167 #endif 149 168 150 Type SHITEMID 169 Type SHITEMID 'shtypes.h 151 170 cb As Word 152 171 abID[ELM(1)] As Byte 153 172 End Type 154 173 155 Type ITEMIDLIST 174 Type ITEMIDLIST 'shtypes.h 156 175 mkid As SHITEMID 157 176 End Type 177 178 typedef LPITEMIDLIST = /*__unaligned*/ *ITEMIDLIST 179 typedef LPCITEMIDLIST = /*__unaligned const*/ *ITEMIDLIST 180 181 'shlobj.h 158 182 Declare Function SHBrowseForFolder Lib "shell32" Alias _FuncName_SHBrowseForFolder (ByRef bi As BROWSEINFO) As *ITEMIDLIST 159 183 … … 232 256 ' ShellApi.h 233 257 Declare Function ShellExecute Lib "shell32" Alias _FuncName_ShellExecute (hWnd As HWND, lpOperation As LPCTSTR, lpFile As LPCTSTR, lpParameters As LPCTSTR, lpDirectory As LPCTSTR, nShowCmd As Long) As HINSTANCE 258 259 Const SEE_MASK_CLASSNAME = &H0001 260 Const SEE_MASK_CLASSKEY = &H0003 261 Const SEE_MASK_IDLIST = &H0004 262 Const SEE_MASK_INVOKEIDLIST = &H000C 263 Const SEE_MASK_ICON = &H0010 264 Const SEE_MASK_HOTKEY = &H0020 265 Const SEE_MASK_NOCLOSEPROCESS = &H0040 266 Const SEE_MASK_CONNECTNETDRV = &H0080 267 Const SEE_MASK_FLAG_DDEWAIT = &H0100 268 Const SEE_MASK_DOENVSUBST = &H0200 269 Const SEE_MASK_FLAG_NO_UI = &H0400 270 271 Type SHELLEXECUTEINFOA 272 cbSize As DWord 273 fMask As DWord 274 hwnd As HWND 275 lpVerb As LPCSTR 276 lpFile As LPCSTR 277 lpParameters As LPCSTR 278 lpDirectory As LPCSTR 279 nShow As Long 280 hInstApp As HINSTANCE 281 lpIDList As LPVOID 282 lpClass As LPCSTR 283 hkeyClass As HKEY 284 dwHotKey As DWord 285 hIcon As HANDLE 286 hProcess As HANDLE 287 End Type 288 Type SHELLEXECUTEINFOW 289 cbSize As DWord 290 fMask As DWord 291 hwnd As HWND 292 lpVerb As LPCWSTR 293 lpFile As LPCWSTR 294 lpParameters As LPCWSTR 295 lpDirectory As LPCWSTR 296 nShow As Long 297 hInstApp As HINSTANCE 298 lpIDList As LPVOID 299 lpClass As LPCWSTR 300 hkeyClass As HKEY 301 dwHotKey As DWord 302 hIcon As HANDLE 303 hProcess As HANDLE 304 End Type 305 #ifdef UNICODE 306 TypeDef SHELLEXECUTEINFO = SHELLEXECUTEINFOW 307 #else 308 TypeDef SHELLEXECUTEINFO = SHELLEXECUTEINFOA 309 #endif 310 TypeDef LPSHELLEXECUTEINFO = *SHELLEXECUTEINFO 311 Declare Function ShellExecuteEx Lib "shell32" Alias _FuncName_ShellExecuteEx (ByRef ExecInfo As SHELLEXECUTEINFO) As BOOL 234 312 235 313 Const FO_MOVE = &H0001 … … 283 361 'SHGetDataFromIDList 284 362 363 'shlobj.h 364 Declare Function SHGetDesktopFolder Lib "shell32" (ByRef pshf As *IShellFolder) As HRESULT 365 285 366 Declare Function SHGetPathFromIDList Lib "shell32" Alias _FuncName_SHGetPathFromIDList (pidl As *ITEMIDLIST, pszPath As PTSTR) As Long 286 367 368 ' ShellApi.h 369 Declare Function SHEmptyRecycleBin Lib"shell32" Alias _FuncName_SHEmptyRecycleBin (hwnd As HWND, pszRootPath As LPCTSTR, dwFlags As DWord) As HRESULT 370 371 ' ShlObj.h 372 Declare Function SHGetSpecialFolderPath Lib "shell32" Alias _FuncName_SHGetSpecialFolderPath (hwndOwner As HWND, lpszPath As LPTSTR, nFolder As Long, fCreate As BOOL) As BOOL 373 374 ' shlobj.h 375 Declare Function SHGetInstanceExplorer Lib "shell32" (ByRef ppunk As *IUnknown) As HRESULT 376 377 Const CSIDL_PERSONAL = 5 378 Const CSIDL_FAVORITIES = 6 379 380 Const SHGFI_ICON = &H000000100 381 Const SHGFI_DISPLAYNAME = &H000000200 382 Const SHGFI_TYPENAME = &H000000400 383 Const SHGFI_ATTRIBUTES = &H000000800 384 Const SHGFI_ICONLOCATION = &H000001000 385 Const SHGFI_EXETYPE = &H000002000 386 Const SHGFI_SYSICONINDEX = &H000004000 387 Const SHGFI_LINKOVERLAY = &H000008000 388 Const SHGFI_SELECTED = &H000010000 389 Const SHGFI_ATTR_SPECIFIED = &H000020000 390 Const SHGFI_LARGEICON = &H000000000 391 Const SHGFI_SMALLICON = &H000000001 392 Const SHGFI_OPENICON = &H000000002 393 Const SHGFI_SHELLICONSIZE = &H000000004 394 Const SHGFI_PIDL = &H000000008 395 Const SHGFI_USEFILEATTRIBUTES = &H000000010 396 Const SHGFI_ADDOVERLAYS = &H000000020 397 Const SHGFI_OVERLAYINDEX = &H000000040 398 399 ' ShellApi.h 400 Type SHFILEINFO 401 hIcon As HICON 402 iIcon As Long 403 dwAttributes As DWord 404 szDisplayName[ELM(MAX_PATH)] As TCHAR 405 szTypeName[ELM(80)] As TCHAR 406 End Type 407 408 ' shellapi.h 409 Declare Function SHGetFileInfo Lib "shell32" Alias _FuncName_SHGetFileInfo (pszPath As LPCTSTR, dwFileAttributes As DWord, ByRef sfi As SHFILEINFO, cbFileInfo As DWord, uFlags As DWord) As ULONG_PTR 410 411 Type NOTIFYICONDATAW 412 cbSize As DWord 413 hWnd As HWND 414 uID As DWord 415 uFlags As DWord 416 uCallbackMessage As DWord 417 hIcon As HICON 418 szTip[ELM(64)] As WCHAR 419 dwState As DWord 420 dwStateMask As DWord 421 szInfo[ELM(256)] As WCHAR 422 'Union 423 uTimeout As DWord 424 ' uVersion As DWord 425 'End Union 426 szInfoTitle[ELM(64)] As WCHAR 427 dwInfoFlags As DWord 428 guidItem As GUID 429 End Type 430 Type NOTIFYICONDATAA 431 cbSize As DWord 432 hWnd As HWND 433 uID As DWord 434 uFlags As DWord 435 uCallbackMessage As DWord 436 hIcon As HICON 437 szTip[ELM(64)] As SByte 438 dwState As DWord 439 dwStateMask As DWord 440 szInfo[ELM(256)] As SByte 441 'Union 442 uTimeout As DWord 443 ' uVersion As DWord 444 'End Union 445 szInfoTitle[ELM(64)] As SByte 446 dwInfoFlags As DWord 447 guidItem As GUID 448 End Type 449 #ifdef UNICODE 450 TypeDef NOTIFYICONDATA = NOTIFYICONDATAW 451 #else 452 TypeDef NOTIFYICONDATA = NOTIFYICONDATAA 453 #endif 454 Declare Function Shell_NotifyIcon Lib "shell32" Alias _FuncName_Shell_NotifyIcon (dwMessage As DWORD, ByRef data As NOTIFYICONDATA) As BOOL 455 456 Type STRRET 'shtypes.h 457 uType As DWord 458 'Union 459 'pOleStr As *WCHAR 460 'uOffset As DWord 461 cStr[ELM(MAX_PATH)] As Byte 462 'End Union 463 End Type 464 465 ' shobjidl.h 466 Enum SLGP_FLAGS 467 SLGP_SHORTPATH = &h1 468 SLGP_UNCPRIORITY = &h2 469 SLGP_RAWPATH = &h4 470 SLGP_RELATIVEPRIORITY = &h8 471 End Enum 472 473 Interface IShellLinkA 'shobjidl.h 474 Inherits IUnknown 475 476 Function GetPath( 477 /* [size_is][out] */ pszFile As PSTR, 478 /* [in] */ cch As Long, 479 /* [full][out][in] */ pfd As *WIN32_FIND_DATAA, 480 /* [in] */ fFlags As DWord) As HRESULT 481 Function GetIDList( 482 /* [out] */ ByRef ppidl As LPITEMIDLIST) As HRESULT 483 Function SetIDList( 484 /* [in] */ pidl As LPCITEMIDLIST) As HRESULT 485 Function GetDescription( 486 /* [size_is][out] */ pszName As PSTR, 487 /* [in] */ cch As Long) As HRESULT 488 Function SetDescription( 489 /* [in] */ pszName As PCSTR) As HRESULT 490 Function GetWorkingDirectory( 491 /* [size_is][out] */ pszDir As PSTR, 492 /* [in] */ cch As Long) As HRESULT 493 Function SetWorkingDirectory( 494 /* [in] */ pszDir As PCSTR) As HRESULT 495 Function GetArguments( 496 /* [size_is][out] */ pszArgs As PSTR, 497 /* [in] */ cch As Long) As HRESULT 498 Function SetArguments( 499 /* [in] */ pszArgs As PCSTR) As HRESULT 500 Function GetHotkey( 501 /* [out] */ ByRef wHotkey As Word) As HRESULT 502 Function SetHotkey( 503 /* [in] */ wHotkey As Word) As HRESULT 504 Function GetShowCmd( 505 /* [out] */ ByRef piShowCmd As Long) As HRESULT 506 Function SetShowCmd( 507 /* [in] */ iShowCmd As Long) As HRESULT 508 Function GetIconLocation( 509 /* [size_is][out] */ pszIconPath As PSTR, 510 /* [in] */ cch As Long, 511 /* [out] */ ByRef iIcon As Long) As HRESULT 512 Function SetIconLocation( 513 /* [in] */ pszIconPath As PCSTR, 514 /* [in] */ iIcon As Long) As HRESULT 515 Function SetRelativePath( 516 /* [in] */ pszPathRel As PCSTR, 517 /* [in] */ dwReserved As DWord) As HRESULT 518 Function Resolve( 519 /* [in] */ hwnd As HWND, 520 /* [in] */ fFlags As DWord) As HRESULT 521 Function SetPath( 522 /* [in] */ pszFile As PCSTR) As HRESULT 523 End Interface 524 525 Interface IShellLinkW 'shobjidl.h 526 Inherits IUnknown 527 528 Function GetPath( 529 /* [size_is][out] */ pszFile As PWSTR, 530 /* [in] */ cch As Long, 531 /* [full][out][in] */ pfd As *WIN32_FIND_DATAW, 532 /* [in] */ fFlags As DWord) As HRESULT 533 Function GetIDList( 534 /* [out] */ ppidl As *LPITEMIDLIST) As HRESULT 535 Function SetIDList( 536 /* [in] */ pidl As LPCITEMIDLIST) As HRESULT 537 Function GetDescription( 538 /* [size_is][out] */ pszName As PWSTR, 539 /* [in] */ cch As Long) As HRESULT 540 Function SetDescription( 541 /* [in] */ pszName As PCWSTR) As HRESULT 542 Function GetWorkingDirectory( 543 /* [size_is][out] */ pszDir As PSTR, 544 /* [in] */ cch As Long) As HRESULT 545 Function SetWorkingDirectory( 546 /* [in] */ pszDir As PCWSTR) As HRESULT 547 Function GetArguments( 548 /* [size_is][out] */ pszArgs As PSTR, 549 /* [in] */ cch As Long) As HRESULT 550 Function SetArguments( 551 /* [in] */ pszArgs As PCWSTR) As HRESULT 552 Function GetHotkey( 553 /* [out] */ ByRef wHotkey As Word) As HRESULT 554 Function SetHotkey( 555 /* [in] */ wHotkey As Word) As HRESULT 556 Function GetShowCmd( 557 /* [out] */ ByRef piShowCmd As Long) As HRESULT 558 Function SetShowCmd( 559 /* [in] */ iShowCmd As Long) As HRESULT 560 Function GetIconLocation( 561 /* [size_is][out] */ pszIconPath As PWSTR, 562 /* [in] */ cch As Long, 563 /* [out] */ ByRef iIcon As Long) As HRESULT 564 Function SetIconLocation( 565 /* [in] */ pszIconPath As PCWSTR, 566 /* [in] */ iIcon As Long) As HRESULT 567 Function SetRelativePath( 568 /* [in] */ pszPathRel As PCWSTR, 569 /* [in] */ dwReserved As DWord) As HRESULT 570 Function Resolve( 571 /* [in] */ hwnd As HWND, 572 /* [in] */ fFlags As DWord) As HRESULT 573 Function SetPath( 574 /* [in] */ pszFile As PCWSTR) As HRESULT 575 End Interface 576 577 #ifdef UNICODE 578 TypeDef IShellLink = IShellLinkW 579 #else 580 TypeDef IShellLink = IShellLinkA 581 #endif 582 583 Enum SHCONT 584 SHCONTF_FOLDERS = &h0020 585 SHCONTF_NONFOLDERS = &h0040 586 SHCONTF_INCLUDEHIDDEN = &h0080 587 SHCONTF_INIT_ON_FIRST_NEXT = &h0100 588 SHCONTF_NETPRINTERSRCH = &h0200 589 SHCONTF_SHAREABLE = &h0400 590 SHCONTF_STORAGE = &h0800 591 End Enum 592 593 Enum SHGNO 594 SHGDN_NORMAL = &h0000 595 SHGDN_INFOLDER = &h0001 596 SHGDN_FOREDITING = &h1000 597 SHGDN_FORADDRESSBAR = &h4000 598 SHGDN_FORPARSING = &h8000 599 End Enum 600 601 TypeDef SHCONTF = DWord 602 TypeDef SFGAOF = DWord 603 TypeDef SHGDNF = DWord 604 605 Dim IID_IShellFolder = [&h000214E6, 0, 0, [&hC0, 0, 0, 0, 0, 0, 0, &h46]] As IID 606 Interface IShellFolder 'shobjidl.h 607 Inherits IUnknown 608 609 Function ParseDisplayName( 610 /* [in] */ hwnd As HWND, 611 /* [in] */ pbc As *IBindCtx, 612 /* [string][in] */ pszDisplayName As LPOLESTR, 613 /* [out] */ pchEaten As *DWord, 614 /* [out] */ ByRef pidl As *ITEMIDLIST, 615 /* [unique][out][in] */ pdwAttributes As *DWord) As HRESULT 616 Function EnumObjects( 617 /* [in] */ hwnd As HWND, 618 /* [in] */ grfFlags As SHCONTF, 619 /* [out] */ ByRef penumIDList As *IEnumIDList) As HRESULT 620 Function BindToObject( 621 /* [in] */ pidl As *ITEMIDLIST, 622 /* [in] */ pbc As *IBindCtx, 623 /* [in] */ ByRef riid As IID, 624 /* [iid_is][out] */ ppv As *VoidPtr) As HRESULT 625 Function BindToStorage( 626 /* [in] */ pidl As *ITEMIDLIST, 627 /* [in] */ pbc As *IBindCtx, 628 /* [in] */ ByRef riid As IID, 629 /* [iid_is][out] */ ppv As *VoidPtr) As HRESULT 630 Function CompareIDs( 631 /* [in] */ lParam As LPARAM, 632 /* [in] */ pidl1 As *ITEMIDLIST, 633 /* [in] */ pidl2 As *ITEMIDLIST) As HRESULT 634 Function CreateViewObject( 635 /* [in] */ hwndOwner As HWND, 636 /* [in] */ ByRef riid As IID, 637 /* [iid_is][out] */ ppv As *VoidPtr) As HRESULT 638 Function GetAttributesOf( 639 /* [in] */ cidl As DWord, 640 /* [size_is][in] */ apidl As *ITEMIDLIST, 641 /* [out][in] */ ByRef rgfInOut As SFGAOF) As HRESULT 642 Function GetUIObjectOf( 643 /* [in] */ hwndOwner As HWND, 644 /* [in] */ cidl As DWord, 645 /* [size_is][in] */ apidl As *ITEMIDLIST, 646 /* [in] */ ByRef riid As IID, 647 /* [unique][out][in] */ rgfReserved As *DWord, 648 /* [iid_is][out] */ ppv As *VoidPtr) As HRESULT 649 Function GetDisplayNameOf( 650 /* [in] */ pidl As *ITEMIDLIST, 651 /* [in] */ uFlags As SHGDNF, 652 /* [out] */ ByRef pName As STRRET) As HRESULT 653 Function SetNameOf( 654 /* [in] */ hwnd As HWND, 655 /* [in] */ pidl As *ITEMIDLIST, 656 /* [string][in] */ pszName As LPCWSTR, 657 /* [in] */ uFlags As SHGDNF, 658 /* [out] */ ByRef ppidlOut As LPITEMIDLIST) As HRESULT 659 End Interface 660 287 661 #endif '_INC_SHELL
Note:
See TracChangeset
for help on using the changeset viewer.