Changeset 160 for Include/api_shell.sbp


Ignore:
Timestamp:
Mar 13, 2007, 1:13:06 AM (17 years ago)
Author:
イグトランス (egtra)
Message:

API宣言の追加(主にフォーラムに投稿されたものより)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Include/api_shell.sbp

    r141 r160  
    1616Const _FuncName_ShellAbout = "ShellAboutW"
    1717Const _FuncName_ShellExecute = "ShellExecuteW"
     18Const _FuncName_ShellExecuteEx = "ShellExecuteExW"
     19Const _FuncName_Shell_NotifyIcon = "_FuncName_Shell_NotifyIconW"
     20Const _FuncName_SHEmptyRecycleBin = "_FuncName_SHEmptyRecycleBinW"
    1821Const _FuncName_SHFileOperation = "SHFileOperationW"
     22Const _FuncName_SHGetFileInfo = "_FuncName_SHGetFileInfoW"
    1923Const _FuncName_SHGetPathFromIDList = "SHGetPathFromIDListW"
     24Const _FuncName_SHGetSpecialFolderPath = "_FuncName_SHGetSpecialFolderPathW"
    2025#else
    2126Const _FuncName_DoEnvironmentSubst = "DoEnvironmentSubstA"
     
    2934Const _FuncName_ShellAbout = "ShellAboutA"
    3035Const _FuncName_ShellExecute = "ShellExecuteA"
     36Const _FuncName_ShellExecuteEx = "ShellExecuteExA"
     37Const _FuncName_Shell_NotifyIcon = "_FuncName_Shell_NotifyIconA"
     38Const _FuncName_SHEmptyRecycleBin = "_FuncName_SHEmptyRecycleBinA"
    3139Const _FuncName_SHFileOperation = "SHFileOperationA"
     40Const _FuncName_SHGetFileInfo = "_FuncName_SHGetFileInfoA"
    3241Const _FuncName_SHGetPathFromIDList = "SHGetPathFromIDListA"
    33 #endif
     42Const _FuncName_SHGetSpecialFolderPath = "_FuncName_SHGetSpecialFolderPathA"
     43#endif
     44
     45Interface IEnumIDList
     46End Interface
    3447
    3548'-----------
    3649' Shell API
    3750
     51' shellapi.h
    3852Declare Function DoEnvironmentSubst Lib "shell32" Alias _FuncName_DoEnvironmentSubst (
    39     pszString As PSTR,
     53    pszString As PTSTR,
    4054    cchString As DWord
    4155) As DWord
    4256
     57' shellapi.h
    4358Declare Sub DragAcceptFiles Lib "shell32" (hWnd As HWND, bAccept As BOOL)
    4459Declare Sub DragFinish Lib "shell32" (hDrop As HDROP)
     
    4661Declare Function DragQueryPoint Lib "shell32" (hDrop As HDROP, ByRef lpPoint As POINTAPI) As Long
    4762Declare Function ExtractAssociatedIcon Lib "shell32" Alias _FuncName_ExtractAssociatedIcon (hInst As HINSTANCE, lpIconPath As LPTSTR, lpiIcon As *Word) As HICON
     63' Shellapi.h
    4864Declare Function ExtractIcon Lib "shell32" Alias _FuncName_ExtractIcon (hInst As HINSTANCE, lpszExeFileName As LPCTSTR, nIconIndex As Long) As HICON
    4965Declare Function ExtractIconEx Lib "shell32" Alias _FuncName_ExtractIconEx (lpszFile As PCSTR, nIconIndex As Long, phiconLarge As *DWord, phiconSmall As *DWord, nIcons As Long) As HICON
    5066
     67' shellapi.h
    5168Declare Function FindExecutable Lib "shell32" Alias _FuncName_FindExecutable (
    52     pFile As PCTSTR,
    53     pDirectory As PCTSTR,
    54     pResult As PCTSTR
     69    lpFile As LPCTSTR,
     70    lpDirectory As LPCTSTR,
     71    lpResult As LPCTSTR
    5572) As Long
    5673
     
    7289) As HRESULT
    7390
     91' shlobj.h
    7492Declare Sub SHAddToRecentDocs Lib "shell32" (ByVal uFlags As Long, ByVal pv As VoidPtr)
    7593
     
    108126End Type
    109127
     128' shellapi.h
    110129Declare Function SHAppBarMessage Lib "shell32" (dwMessage As DWord, ByRef Data As APPBARDATA) As ULONG_PTR
    111130
     
    148167#endif
    149168
    150 Type SHITEMID
     169Type SHITEMID 'shtypes.h
    151170    cb As Word
    152171    abID[ELM(1)] As Byte
    153172End Type
    154173
    155 Type ITEMIDLIST
     174Type ITEMIDLIST 'shtypes.h
    156175    mkid As SHITEMID
    157176End Type
     177
     178typedef LPITEMIDLIST = /*__unaligned*/ *ITEMIDLIST
     179typedef LPCITEMIDLIST = /*__unaligned const*/ *ITEMIDLIST
     180
     181'shlobj.h
    158182Declare Function SHBrowseForFolder Lib "shell32" Alias _FuncName_SHBrowseForFolder (ByRef bi As BROWSEINFO) As *ITEMIDLIST
    159183
     
    232256' ShellApi.h
    233257Declare 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
     259Const SEE_MASK_CLASSNAME      = &H0001
     260Const SEE_MASK_CLASSKEY       = &H0003
     261Const SEE_MASK_IDLIST         = &H0004
     262Const SEE_MASK_INVOKEIDLIST   = &H000C
     263Const SEE_MASK_ICON           = &H0010
     264Const SEE_MASK_HOTKEY         = &H0020
     265Const SEE_MASK_NOCLOSEPROCESS = &H0040
     266Const SEE_MASK_CONNECTNETDRV  = &H0080
     267Const SEE_MASK_FLAG_DDEWAIT   = &H0100
     268Const SEE_MASK_DOENVSUBST     = &H0200
     269Const SEE_MASK_FLAG_NO_UI     = &H0400
     270
     271Type 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
     287End Type
     288Type 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
     304End Type
     305#ifdef UNICODE
     306TypeDef SHELLEXECUTEINFO = SHELLEXECUTEINFOW
     307#else
     308TypeDef SHELLEXECUTEINFO = SHELLEXECUTEINFOA
     309#endif
     310TypeDef LPSHELLEXECUTEINFO = *SHELLEXECUTEINFO
     311Declare Function ShellExecuteEx Lib "shell32" Alias _FuncName_ShellExecuteEx (ByRef ExecInfo As SHELLEXECUTEINFO) As BOOL
    234312
    235313Const FO_MOVE =   &H0001
     
    283361'SHGetDataFromIDList
    284362
     363'shlobj.h
     364Declare Function SHGetDesktopFolder Lib "shell32" (ByRef pshf As *IShellFolder) As HRESULT
     365
    285366Declare Function SHGetPathFromIDList Lib "shell32" Alias _FuncName_SHGetPathFromIDList (pidl As *ITEMIDLIST, pszPath As PTSTR) As Long
    286367
     368' ShellApi.h
     369Declare Function SHEmptyRecycleBin Lib"shell32" Alias _FuncName_SHEmptyRecycleBin (hwnd As HWND, pszRootPath As LPCTSTR, dwFlags As DWord) As HRESULT
     370
     371' ShlObj.h
     372Declare 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
     375Declare Function SHGetInstanceExplorer Lib "shell32" (ByRef ppunk As *IUnknown) As HRESULT
     376
     377Const CSIDL_PERSONAL = 5
     378Const CSIDL_FAVORITIES = 6
     379
     380Const SHGFI_ICON              = &H000000100
     381Const SHGFI_DISPLAYNAME       = &H000000200
     382Const SHGFI_TYPENAME          = &H000000400
     383Const SHGFI_ATTRIBUTES        = &H000000800
     384Const SHGFI_ICONLOCATION      = &H000001000
     385Const SHGFI_EXETYPE           = &H000002000
     386Const SHGFI_SYSICONINDEX      = &H000004000
     387Const SHGFI_LINKOVERLAY       = &H000008000
     388Const SHGFI_SELECTED          = &H000010000
     389Const SHGFI_ATTR_SPECIFIED    = &H000020000
     390Const SHGFI_LARGEICON         = &H000000000
     391Const SHGFI_SMALLICON         = &H000000001
     392Const SHGFI_OPENICON          = &H000000002
     393Const SHGFI_SHELLICONSIZE     = &H000000004
     394Const SHGFI_PIDL              = &H000000008
     395Const SHGFI_USEFILEATTRIBUTES = &H000000010
     396Const SHGFI_ADDOVERLAYS       = &H000000020
     397Const SHGFI_OVERLAYINDEX      = &H000000040
     398
     399' ShellApi.h
     400Type 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
     406End Type
     407
     408' shellapi.h
     409Declare 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
     411Type 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
     429End Type
     430Type 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
     448End Type
     449#ifdef UNICODE
     450TypeDef NOTIFYICONDATA = NOTIFYICONDATAW
     451#else
     452TypeDef NOTIFYICONDATA = NOTIFYICONDATAA
     453#endif
     454Declare Function Shell_NotifyIcon Lib "shell32" Alias _FuncName_Shell_NotifyIcon (dwMessage As DWORD, ByRef data As NOTIFYICONDATA) As BOOL
     455
     456Type 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
     463End Type
     464
     465' shobjidl.h
     466Enum SLGP_FLAGS
     467    SLGP_SHORTPATH = &h1
     468    SLGP_UNCPRIORITY = &h2
     469    SLGP_RAWPATH = &h4
     470    SLGP_RELATIVEPRIORITY = &h8
     471End Enum
     472
     473Interface 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
     523End Interface
     524
     525Interface 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
     575End Interface
     576
     577#ifdef UNICODE
     578TypeDef IShellLink = IShellLinkW
     579#else
     580TypeDef IShellLink = IShellLinkA
     581#endif
     582
     583Enum 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
     591End Enum
     592
     593Enum SHGNO
     594    SHGDN_NORMAL = &h0000
     595    SHGDN_INFOLDER = &h0001
     596    SHGDN_FOREDITING = &h1000
     597    SHGDN_FORADDRESSBAR = &h4000
     598    SHGDN_FORPARSING = &h8000
     599End Enum
     600
     601TypeDef SHCONTF = DWord
     602TypeDef SFGAOF = DWord
     603TypeDef SHGDNF = DWord
     604
     605Dim IID_IShellFolder = [&h000214E6, 0, 0, [&hC0, 0, 0, 0, 0, 0, 0, &h46]] As IID
     606Interface 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
     659End Interface
     660
    287661#endif '_INC_SHELL
Note: See TracChangeset for help on using the changeset viewer.