[1] | 1 | ' api_shell.sbp
|
---|
| 2 |
|
---|
| 3 |
|
---|
| 4 | #ifndef _INC_SHELL
|
---|
| 5 | #define _INC_SHELL
|
---|
| 6 |
|
---|
[141] | 7 | #ifdef UNICODE
|
---|
| 8 | Const _FuncName_DoEnvironmentSubst = "DoEnvironmentSubstW"
|
---|
| 9 | Const _FuncName_DragQueryFile = "DragQueryFileW"
|
---|
| 10 | Const _FuncName_ExtractAssociatedIcon = "ExtractAssociatedIconW"
|
---|
| 11 | Const _FuncName_ExtractIcon = "ExtractIconW"
|
---|
| 12 | Const _FuncName_ExtractIconEx = "ExtractIconExW"
|
---|
| 13 | Const _FuncName_FindExecutable = "FindExecutableW"
|
---|
| 14 | Const _FuncName_GUIDFromString = "GUIDFromStringW"
|
---|
| 15 | Const _FuncName_SHBrowseForFolder = "SHBrowseForFolderW"
|
---|
| 16 | Const _FuncName_ShellAbout = "ShellAboutW"
|
---|
| 17 | Const _FuncName_ShellExecute = "ShellExecuteW"
|
---|
[160] | 18 | Const _FuncName_ShellExecuteEx = "ShellExecuteExW"
|
---|
[268] | 19 | Const _FuncName_Shell_NotifyIcon = "NotifyIconW"
|
---|
| 20 | Const _FuncName_SHEmptyRecycleBin = "SHEmptyRecycleBinW"
|
---|
[141] | 21 | Const _FuncName_SHFileOperation = "SHFileOperationW"
|
---|
[268] | 22 | Const _FuncName_SHGetFileInfo = "SHGetFileInfoW"
|
---|
[141] | 23 | Const _FuncName_SHGetPathFromIDList = "SHGetPathFromIDListW"
|
---|
[268] | 24 | Const _FuncName_SHGetSpecialFolderPath = "SHGetSpecialFolderPathW"
|
---|
[141] | 25 | #else
|
---|
| 26 | Const _FuncName_DoEnvironmentSubst = "DoEnvironmentSubstA"
|
---|
| 27 | Const _FuncName_DragQueryFile = "DragQueryFileA"
|
---|
| 28 | Const _FuncName_ExtractAssociatedIcon = "ExtractAssociatedIconA"
|
---|
| 29 | Const _FuncName_ExtractIcon = "ExtractIconA"
|
---|
| 30 | Const _FuncName_ExtractIconEx = "ExtractIconExA"
|
---|
| 31 | Const _FuncName_FindExecutable = "FindExecutableA"
|
---|
| 32 | Const _FuncName_GUIDFromString = "GUIDFromStringA"
|
---|
| 33 | Const _FuncName_SHBrowseForFolder = "SHBrowseForFolderA"
|
---|
| 34 | Const _FuncName_ShellAbout = "ShellAboutA"
|
---|
| 35 | Const _FuncName_ShellExecute = "ShellExecuteA"
|
---|
[160] | 36 | Const _FuncName_ShellExecuteEx = "ShellExecuteExA"
|
---|
[268] | 37 | Const _FuncName_Shell_NotifyIcon = "Shell_NotifyIconA"
|
---|
| 38 | Const _FuncName_SHEmptyRecycleBin = "SHEmptyRecycleBinA"
|
---|
[141] | 39 | Const _FuncName_SHFileOperation = "SHFileOperationA"
|
---|
[268] | 40 | Const _FuncName_SHGetFileInfo = "SHGetFileInfoA"
|
---|
[141] | 41 | Const _FuncName_SHGetPathFromIDList = "SHGetPathFromIDListA"
|
---|
[268] | 42 | Const _FuncName_SHGetSpecialFolderPath = "SHGetSpecialFolderPathA"
|
---|
[141] | 43 | #endif
|
---|
[1] | 44 |
|
---|
[170] | 45 | Type _System_DeclareHandle_HDROP:unused As DWord:End Type
|
---|
| 46 | TypeDef HDROP = *_System_DeclareHandle_HDROP
|
---|
| 47 |
|
---|
[160] | 48 | Interface IEnumIDList
|
---|
[170] | 49 | Inherits IUnknown
|
---|
[160] | 50 | End Interface
|
---|
| 51 |
|
---|
[1] | 52 | '-----------
|
---|
| 53 | ' Shell API
|
---|
| 54 |
|
---|
[160] | 55 | ' shellapi.h
|
---|
[141] | 56 | Declare Function DoEnvironmentSubst Lib "shell32" Alias _FuncName_DoEnvironmentSubst (
|
---|
[160] | 57 | pszString As PTSTR,
|
---|
[35] | 58 | cchString As DWord
|
---|
[1] | 59 | ) As DWord
|
---|
| 60 |
|
---|
[160] | 61 | ' shellapi.h
|
---|
[1] | 62 | Declare Sub DragAcceptFiles Lib "shell32" (hWnd As HWND, bAccept As BOOL)
|
---|
| 63 | Declare Sub DragFinish Lib "shell32" (hDrop As HDROP)
|
---|
[141] | 64 | Declare Function DragQueryFile Lib "shell32" Alias _FuncName_DragQueryFile (hDrop As HDROP, iFile As Long, lpszFile As LPTSTR, cch As DWord) As DWord
|
---|
[1] | 65 | Declare Function DragQueryPoint Lib "shell32" (hDrop As HDROP, ByRef lpPoint As POINTAPI) As Long
|
---|
[141] | 66 | Declare Function ExtractAssociatedIcon Lib "shell32" Alias _FuncName_ExtractAssociatedIcon (hInst As HINSTANCE, lpIconPath As LPTSTR, lpiIcon As *Word) As HICON
|
---|
[160] | 67 | ' Shellapi.h
|
---|
[141] | 68 | Declare Function ExtractIcon Lib "shell32" Alias _FuncName_ExtractIcon (hInst As HINSTANCE, lpszExeFileName As LPCTSTR, nIconIndex As Long) As HICON
|
---|
| 69 | 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
|
---|
[1] | 70 |
|
---|
[160] | 71 | ' shellapi.h
|
---|
[141] | 72 | Declare Function FindExecutable Lib "shell32" Alias _FuncName_FindExecutable (
|
---|
[160] | 73 | lpFile As LPCTSTR,
|
---|
| 74 | lpDirectory As LPCTSTR,
|
---|
| 75 | lpResult As LPCTSTR
|
---|
[1] | 76 | ) As Long
|
---|
| 77 |
|
---|
[141] | 78 | Declare Function GUIDFromString Lib "shell32" Alias _FuncName_GUIDFromString (
|
---|
| 79 | ByVal psz As PCTSTR,
|
---|
[1] | 80 | ByRef guid As GUID
|
---|
| 81 | ) As BOOL
|
---|
| 82 |
|
---|
| 83 | ' intshcut.h
|
---|
| 84 | Declare Function InetIsOffline Lib "url" (dwFlags As DWord) As BOOL
|
---|
| 85 | ' intshcut.h
|
---|
| 86 | Declare Function MIMEAssociationDialog Lib "url" (
|
---|
| 87 | hwndParent As HWND,
|
---|
[141] | 88 | dwInFlags As DWord,
|
---|
| 89 | pcszFile As PCTSTR,
|
---|
| 90 | pcszMIMEContentType As PCTSTR,
|
---|
| 91 | pszAppBuf As PTSTR,
|
---|
| 92 | ucAppBufLen As DWord
|
---|
[1] | 93 | ) As HRESULT
|
---|
| 94 |
|
---|
[160] | 95 | ' shlobj.h
|
---|
[1] | 96 | Declare Sub SHAddToRecentDocs Lib "shell32" (ByVal uFlags As Long, ByVal pv As VoidPtr)
|
---|
| 97 |
|
---|
| 98 | Const ABM_NEW = &h00000000
|
---|
| 99 | Const ABM_REMOVE = &h00000001
|
---|
| 100 | Const ABM_QUERYPOS = &h00000002
|
---|
| 101 | Const ABM_SETPOS = &h00000003
|
---|
| 102 | Const ABM_GETSTATE = &h00000004
|
---|
| 103 | Const ABM_GETTASKBARPOS = &h00000005
|
---|
| 104 | Const ABM_ACTIVATE = &h00000006
|
---|
| 105 | Const ABM_GETAUTOHIDEBAR = &h00000007
|
---|
| 106 | Const ABM_SETAUTOHIDEBAR = &h00000008
|
---|
| 107 | Const ABM_WINDOWPOSCHANGED = &h0000009
|
---|
| 108 | Const ABM_SETSTATE = &h0000000a
|
---|
| 109 |
|
---|
| 110 | Const ABN_STATECHANGE = &h0000000
|
---|
| 111 | Const ABN_POSCHANGED = &h0000001
|
---|
| 112 | Const ABN_FULLSCREENAPP = &h0000002
|
---|
| 113 | Const ABN_WINDOWARRANGE = &h0000003
|
---|
| 114 |
|
---|
| 115 | Const ABS_AUTOHIDE = &h0000001
|
---|
| 116 | Const ABS_ALWAYSONTOP = &h0000002
|
---|
| 117 |
|
---|
| 118 | Const ABE_LEFT = 0
|
---|
| 119 | Const ABE_TOP = 1
|
---|
| 120 | Const ABE_RIGHT = 2
|
---|
| 121 | Const ABE_BOTTOM = 3
|
---|
| 122 |
|
---|
| 123 | Type APPBARDATA
|
---|
| 124 | cbSize As DWord
|
---|
| 125 | hWnd As HWND
|
---|
| 126 | uCallbackMessage As DWord
|
---|
| 127 | uEdge As DWord
|
---|
| 128 | rc As RECT
|
---|
| 129 | lParam As LPARAM
|
---|
| 130 | End Type
|
---|
| 131 |
|
---|
[160] | 132 | ' shellapi.h
|
---|
[1] | 133 | Declare Function SHAppBarMessage Lib "shell32" (dwMessage As DWord, ByRef Data As APPBARDATA) As ULONG_PTR
|
---|
| 134 |
|
---|
| 135 | Const BIF_RETURNONLYFSDIRS = &H0001
|
---|
| 136 | Const BIF_DONTGOBELOWDOMAIN = &H0002
|
---|
| 137 | Const BIF_STATUSTEXT = &H0004
|
---|
| 138 | Const BIF_RETURNFSANCESTORS = &H0008
|
---|
| 139 | Const BIF_EDITBOX = &H0010
|
---|
| 140 | Const BIF_VALIDATE = &H0020
|
---|
| 141 | Const BIF_BROWSEFORCOMPUTER = &H1000
|
---|
| 142 | Const BIF_BROWSEFORPRINTER = &H2000
|
---|
| 143 | Const BIF_BROWSEINCLUDEFILES = &H4000
|
---|
| 144 |
|
---|
| 145 | Typedef BFFCALLBACK = *Function(hwnd As HWND, uMsg As DWord, lParam As LPARAM, lpData As LPARAM) As Long
|
---|
| 146 |
|
---|
[141] | 147 | Type BROWSEINFOW
|
---|
[1] | 148 | hwndOwner As HWND
|
---|
| 149 | pidlRoot As VoidPtr
|
---|
[141] | 150 | pszDisplayName As LPWSTR
|
---|
| 151 | lpszTitle As LPCWSTR
|
---|
[1] | 152 | ulFlags As DWord
|
---|
| 153 | lpfn As BFFCALLBACK
|
---|
| 154 | lParam As LPARAM
|
---|
| 155 | iImage As Long
|
---|
| 156 | End Type
|
---|
[141] | 157 | Type BROWSEINFOA
|
---|
| 158 | hwndOwner As HWND
|
---|
| 159 | pidlRoot As VoidPtr
|
---|
| 160 | pszDisplayName As LPSTR
|
---|
| 161 | lpszTitle As LPCSTR
|
---|
| 162 | ulFlags As DWord
|
---|
| 163 | lpfn As BFFCALLBACK
|
---|
| 164 | lParam As LPARAM
|
---|
| 165 | iImage As Long
|
---|
| 166 | End Type
|
---|
| 167 | #ifdef UNICODE
|
---|
| 168 | TypeDef BROWSEINFO = BROWSEINFOW
|
---|
| 169 | #else
|
---|
| 170 | TypeDef BROWSEINFO = BROWSEINFOA
|
---|
| 171 | #endif
|
---|
[1] | 172 |
|
---|
[160] | 173 | Type SHITEMID 'shtypes.h
|
---|
[35] | 174 | cb As Word
|
---|
| 175 | abID[ELM(1)] As Byte
|
---|
[1] | 176 | End Type
|
---|
| 177 |
|
---|
[160] | 178 | Type ITEMIDLIST 'shtypes.h
|
---|
[1] | 179 | mkid As SHITEMID
|
---|
| 180 | End Type
|
---|
[160] | 181 |
|
---|
| 182 | typedef LPITEMIDLIST = /*__unaligned*/ *ITEMIDLIST
|
---|
| 183 | typedef LPCITEMIDLIST = /*__unaligned const*/ *ITEMIDLIST
|
---|
| 184 |
|
---|
| 185 | 'shlobj.h
|
---|
[141] | 186 | Declare Function SHBrowseForFolder Lib "shell32" Alias _FuncName_SHBrowseForFolder (ByRef bi As BROWSEINFO) As *ITEMIDLIST
|
---|
[1] | 187 |
|
---|
| 188 | Const SHCNE_RENAMEITEM = &h00000001
|
---|
| 189 | Const SHCNE_CREATE = &h00000002
|
---|
| 190 | Const SHCNE_DELETE = &h00000004
|
---|
| 191 | Const SHCNE_MKDIR = &h00000008
|
---|
| 192 | Const SHCNE_RMDIR = &h00000010
|
---|
| 193 | Const SHCNE_MEDIAINSERTED = &h00000020
|
---|
| 194 | Const SHCNE_MEDIAREMOVED = &h00000040
|
---|
| 195 | Const SHCNE_DRIVEREMOVED = &h00000080
|
---|
| 196 | Const SHCNE_DRIVEADD = &h00000100
|
---|
| 197 | Const SHCNE_NETSHARE = &h00000200
|
---|
| 198 | Const SHCNE_NETUNSHARE = &h00000400
|
---|
| 199 | Const SHCNE_ATTRIBUTES = &h00000800
|
---|
| 200 | Const SHCNE_UPDATEDIR = &h00001000
|
---|
| 201 | Const SHCNE_UPDATEITEM = &h00002000
|
---|
| 202 | Const SHCNE_SERVERDISCONNECT = &h00004000
|
---|
| 203 | Const SHCNE_UPDATEIMAGE = &h00008000
|
---|
| 204 | Const SHCNE_DRIVEADDGUI = &h00010000
|
---|
| 205 | Const SHCNE_RENAMEFOLDER = &h00020000
|
---|
| 206 | Const SHCNE_FREESPACE = &h00040000
|
---|
| 207 |
|
---|
| 208 | #ifdef __UNDEFINED__ '#if _WIN32_IE >= 0x0400
|
---|
| 209 | Const SHCNE_EXTENDED_EVENT = &h04000000
|
---|
| 210 | #endif
|
---|
| 211 |
|
---|
| 212 | Const SHCNE_ASSOCCHANGED = &h08000000
|
---|
| 213 |
|
---|
| 214 | Const SHCNE_DISKEVENTS = &h0002381F
|
---|
| 215 | Const SHCNE_GLOBALEVENTS = &h0C0581E0
|
---|
| 216 | Const SHCNE_ALLEVENTS = &h7FFFFFFF
|
---|
| 217 | Const SHCNE_INTERRUPT = &h80000000
|
---|
| 218 |
|
---|
| 219 | #ifdef __UNDEFINED__ '#if _WIN32_IE >= 0x0400
|
---|
| 220 | Const SHCNEE_ORDERCHANGED = 2
|
---|
| 221 | Const SHCNEE_MSI_CHANGE = 4
|
---|
| 222 | Const SHCNEE_MSI_UNINSTALL = 5
|
---|
| 223 | #endif
|
---|
| 224 |
|
---|
| 225 | Const SHCNF_IDLIST = &h0000
|
---|
| 226 | Const SHCNF_PATHA = &h0001
|
---|
| 227 | Const SHCNF_PRINTERA = &h0002
|
---|
| 228 | Const SHCNF_DWORD = &h0003
|
---|
| 229 | Const SHCNF_PATHW = &h0005
|
---|
| 230 | Const SHCNF_PRINTERW = &h0006
|
---|
| 231 | Const SHCNF_TYPE = &h00FF
|
---|
| 232 | Const SHCNF_FLUSH = &h1000
|
---|
| 233 | Const SHCNF_FLUSHNOWAIT = &h2000
|
---|
| 234 |
|
---|
| 235 | #ifdef UNICODE
|
---|
| 236 | Const SHCNF_PATH = SHCNF_PATHW
|
---|
| 237 | Const SHCNF_PRINTER = SHCNF_PRINTERW
|
---|
| 238 | #else
|
---|
| 239 | Const SHCNF_PATH = SHCNF_PATHA
|
---|
| 240 | Const SHCNF_PRINTER = SHCNF_PRINTERA
|
---|
| 241 | #endif
|
---|
| 242 |
|
---|
| 243 | ' ShlObj.h
|
---|
| 244 | Declare Sub SHChangeNotify Lib "shell32" (wEventId As Long, uFlags As DWord, dwItem1 As VoidPtr, dwItem2 As VoidPtr)
|
---|
| 245 |
|
---|
| 246 | ' ShellApi.h
|
---|
[141] | 247 | Declare Function ShellAbout Lib "shell32" Alias _FuncName_ShellAbout (hWnd As HWND, szApp As PCTSTR, szOtherStuff As PCTSTR, hIcon As HICON) As Long
|
---|
[1] | 248 |
|
---|
| 249 | Const SE_ERR_FNF = 2
|
---|
| 250 | Const SE_ERR_PNF = 3
|
---|
| 251 | Const SE_ERR_ACCESSDENIED = 5
|
---|
| 252 | Const SE_ERR_OOM = 8
|
---|
| 253 | Const SE_ERR_DLLNOTFOUND = 32
|
---|
| 254 | Const SE_ERR_SHARE = 26
|
---|
| 255 | Const SE_ERR_ASSOCINCOMPLETE = 27
|
---|
| 256 | Const SE_ERR_DDETIMEOUT = 28
|
---|
| 257 | Const SE_ERR_DDEFAIL = 29
|
---|
| 258 | Const SE_ERR_DDEBUSY = 30
|
---|
| 259 | Const SE_ERR_NOASSOC = 31
|
---|
| 260 | ' ShellApi.h
|
---|
[141] | 261 | 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
|
---|
[1] | 262 |
|
---|
[160] | 263 | Const SEE_MASK_CLASSNAME = &H0001
|
---|
| 264 | Const SEE_MASK_CLASSKEY = &H0003
|
---|
| 265 | Const SEE_MASK_IDLIST = &H0004
|
---|
| 266 | Const SEE_MASK_INVOKEIDLIST = &H000C
|
---|
| 267 | Const SEE_MASK_ICON = &H0010
|
---|
| 268 | Const SEE_MASK_HOTKEY = &H0020
|
---|
| 269 | Const SEE_MASK_NOCLOSEPROCESS = &H0040
|
---|
| 270 | Const SEE_MASK_CONNECTNETDRV = &H0080
|
---|
| 271 | Const SEE_MASK_FLAG_DDEWAIT = &H0100
|
---|
| 272 | Const SEE_MASK_DOENVSUBST = &H0200
|
---|
| 273 | Const SEE_MASK_FLAG_NO_UI = &H0400
|
---|
| 274 |
|
---|
| 275 | Type SHELLEXECUTEINFOA
|
---|
| 276 | cbSize As DWord
|
---|
| 277 | fMask As DWord
|
---|
| 278 | hwnd As HWND
|
---|
| 279 | lpVerb As LPCSTR
|
---|
| 280 | lpFile As LPCSTR
|
---|
| 281 | lpParameters As LPCSTR
|
---|
| 282 | lpDirectory As LPCSTR
|
---|
| 283 | nShow As Long
|
---|
| 284 | hInstApp As HINSTANCE
|
---|
| 285 | lpIDList As LPVOID
|
---|
| 286 | lpClass As LPCSTR
|
---|
| 287 | hkeyClass As HKEY
|
---|
| 288 | dwHotKey As DWord
|
---|
| 289 | hIcon As HANDLE
|
---|
| 290 | hProcess As HANDLE
|
---|
| 291 | End Type
|
---|
| 292 | Type SHELLEXECUTEINFOW
|
---|
| 293 | cbSize As DWord
|
---|
| 294 | fMask As DWord
|
---|
| 295 | hwnd As HWND
|
---|
| 296 | lpVerb As LPCWSTR
|
---|
| 297 | lpFile As LPCWSTR
|
---|
| 298 | lpParameters As LPCWSTR
|
---|
| 299 | lpDirectory As LPCWSTR
|
---|
| 300 | nShow As Long
|
---|
| 301 | hInstApp As HINSTANCE
|
---|
| 302 | lpIDList As LPVOID
|
---|
| 303 | lpClass As LPCWSTR
|
---|
| 304 | hkeyClass As HKEY
|
---|
| 305 | dwHotKey As DWord
|
---|
| 306 | hIcon As HANDLE
|
---|
| 307 | hProcess As HANDLE
|
---|
| 308 | End Type
|
---|
| 309 | #ifdef UNICODE
|
---|
| 310 | TypeDef SHELLEXECUTEINFO = SHELLEXECUTEINFOW
|
---|
| 311 | #else
|
---|
| 312 | TypeDef SHELLEXECUTEINFO = SHELLEXECUTEINFOA
|
---|
| 313 | #endif
|
---|
| 314 | TypeDef LPSHELLEXECUTEINFO = *SHELLEXECUTEINFO
|
---|
| 315 | Declare Function ShellExecuteEx Lib "shell32" Alias _FuncName_ShellExecuteEx (ByRef ExecInfo As SHELLEXECUTEINFO) As BOOL
|
---|
| 316 |
|
---|
[1] | 317 | Const FO_MOVE = &H0001
|
---|
| 318 | Const FO_COPY = &H0002
|
---|
| 319 | Const FO_DELETE = &H0003
|
---|
| 320 | Const FO_RENAME = &H0004
|
---|
| 321 | Const FOF_MULTIDESTFILES = &H0001
|
---|
| 322 | Const FOF_CONFIRMMOUSE = &H0002
|
---|
| 323 | Const FOF_SILENT = &H0004
|
---|
| 324 | Const FOF_RENAMEONCOLLISION = &H0008
|
---|
| 325 | Const FOF_NOCONFIRMATION = &H0010
|
---|
| 326 | Const FOF_WANTMAPPINGHANDLE = &H0020
|
---|
| 327 | Const FOF_ALLOWUNDO = &H0040
|
---|
| 328 | Const FOF_FILESONLY = &H0080
|
---|
| 329 | Const FOF_SIMPLEPROGRESS = &H0100
|
---|
| 330 | Const FOF_NOCONFIRMMKDIR = &H0200
|
---|
| 331 | Const FOF_NOERRORUI = &H0400
|
---|
| 332 | Const FOF_NOCOPYSECURITYATTRIBS = &H0800
|
---|
[141] | 333 | Type SHFILEOPSTRUCTW
|
---|
[271] | 334 | hwnd As HWND
|
---|
[1] | 335 | wFunc As DWord
|
---|
[141] | 336 | pFrom As PCWSTR
|
---|
| 337 | pTo As PCWSTR
|
---|
| 338 | fFlags As Word
|
---|
| 339 | fAnyOperationsAborted As BOOL
|
---|
| 340 | hNameMappings As VoidPtr
|
---|
| 341 | lpszProgressTitle As LPCWSTR
|
---|
| 342 | End Type
|
---|
| 343 | Type SHFILEOPSTRUCTA
|
---|
[271] | 344 | hwnd As HWND
|
---|
[141] | 345 | wFunc As DWord
|
---|
[1] | 346 | pFrom As PCSTR
|
---|
| 347 | pTo As PCSTR
|
---|
| 348 | fFlags As Word
|
---|
| 349 | fAnyOperationsAborted As BOOL
|
---|
| 350 | hNameMappings As VoidPtr
|
---|
[141] | 351 | lpszProgressTitle As LPCSTR
|
---|
[1] | 352 | End Type
|
---|
[141] | 353 | #ifdef UNICODE
|
---|
| 354 | TypeDef SHFILEOPSTRUCT = SHFILEOPSTRUCTW
|
---|
| 355 | #else
|
---|
| 356 | TypeDef SHFILEOPSTRUCT = SHFILEOPSTRUCTA
|
---|
| 357 | #endif
|
---|
| 358 |
|
---|
[1] | 359 | ' ShellApi.h
|
---|
[141] | 360 | Declare Function SHFileOperation Lib "shell32" Alias _FuncName_SHFileOperation (ByRef FileOp As SHFILEOPSTRUCT) As Long
|
---|
[1] | 361 |
|
---|
| 362 | ' ShellApi.h
|
---|
| 363 | Declare Sub SHFreeNameMappings Lib "shell32" (hNameMappings As HANDLE)
|
---|
| 364 |
|
---|
| 365 | 'SHGetDataFromIDList
|
---|
| 366 |
|
---|
[160] | 367 | 'shlobj.h
|
---|
| 368 | Declare Function SHGetDesktopFolder Lib "shell32" (ByRef pshf As *IShellFolder) As HRESULT
|
---|
| 369 |
|
---|
[141] | 370 | Declare Function SHGetPathFromIDList Lib "shell32" Alias _FuncName_SHGetPathFromIDList (pidl As *ITEMIDLIST, pszPath As PTSTR) As Long
|
---|
[1] | 371 |
|
---|
[160] | 372 | ' ShellApi.h
|
---|
| 373 | Declare Function SHEmptyRecycleBin Lib"shell32" Alias _FuncName_SHEmptyRecycleBin (hwnd As HWND, pszRootPath As LPCTSTR, dwFlags As DWord) As HRESULT
|
---|
| 374 |
|
---|
| 375 | ' ShlObj.h
|
---|
[258] | 376 |
|
---|
| 377 | '要IE4
|
---|
[160] | 378 | Declare Function SHGetSpecialFolderPath Lib "shell32" Alias _FuncName_SHGetSpecialFolderPath (hwndOwner As HWND, lpszPath As LPTSTR, nFolder As Long, fCreate As BOOL) As BOOL
|
---|
| 379 |
|
---|
| 380 | ' shlobj.h
|
---|
| 381 | Declare Function SHGetInstanceExplorer Lib "shell32" (ByRef ppunk As *IUnknown) As HRESULT
|
---|
| 382 |
|
---|
[258] | 383 | 'shlobj.h
|
---|
| 384 | Declare Function SHGetSpecialFolderLocation Lib "shell32" (hwndOwner As HWND, nFolder As Long, ByRef pidl As LPITEMIDLIST) As HRESULT
|
---|
[160] | 385 |
|
---|
[258] | 386 | 'shlobj.h
|
---|
| 387 | '要Win2k/Me
|
---|
| 388 | 'Declare Function SHGetFolderLocation Lib "shell32" (hwndOwner As HWND, nFolder As Long, hToken As HANDLE, dwReserved As DWord, ByRef pidl As LPITEMIDLIST) As HRESULT
|
---|
| 389 |
|
---|
| 390 | Const CSIDL_DESKTOP = &h0000
|
---|
| 391 | Const CSIDL_INTERNET = &h0001
|
---|
| 392 | Const CSIDL_PROGRAMS = &h0002
|
---|
| 393 | Const CSIDL_CONTROLS = &h0003
|
---|
| 394 | Const CSIDL_PRINTERS = &h0004
|
---|
| 395 | Const CSIDL_PERSONAL = &h0005
|
---|
| 396 | Const CSIDL_FAVORITES = &h0006
|
---|
| 397 | Const CSIDL_STARTUP = &h0007
|
---|
| 398 | Const CSIDL_RECENT = &h0008
|
---|
| 399 | Const CSIDL_SENDTO = &h0009
|
---|
| 400 | Const CSIDL_BITBUCKET = &h000a
|
---|
| 401 | Const CSIDL_STARTMENU = &h000b
|
---|
| 402 | Const CSIDL_MYMUSIC = &h000d
|
---|
| 403 | Const CSIDL_DESKTOPDIRECTORY = &h0010
|
---|
| 404 | Const CSIDL_DRIVES = &h0011
|
---|
| 405 | Const CSIDL_NETWORK = &h0012
|
---|
| 406 | Const CSIDL_NETHOOD = &h0013
|
---|
| 407 | Const CSIDL_FONTS = &h0014
|
---|
| 408 | Const CSIDL_TEMPLATES = &h0015
|
---|
| 409 | Const CSIDL_COMMON_STARTMENU = &h0016
|
---|
| 410 | Const CSIDL_COMMON_PROGRAMS = &h0017
|
---|
| 411 | Const CSIDL_COMMON_STARTUP = &h0018
|
---|
| 412 | Const CSIDL_COMMON_DESKTOPDIRECTORY = &h0019
|
---|
| 413 | Const CSIDL_APPDATA = &h001a
|
---|
| 414 | Const CSIDL_PRINTHOOD = &h001b
|
---|
| 415 | Const CSIDL_LOCAL_APPDATA = &h001c
|
---|
| 416 | Const CSIDL_ALTSTARTUP = &h001d
|
---|
| 417 | Const CSIDL_COMMON_ALTSTARTUP = &h001e
|
---|
| 418 | Const CSIDL_COMMON_FAVORITES = &h001f
|
---|
| 419 | Const CSIDL_INTERNET_CACHE = &h0020
|
---|
| 420 | Const CSIDL_COOKIES = &h0021
|
---|
| 421 | Const CSIDL_HISTORY = &h0022
|
---|
| 422 | Const CSIDL_COMMON_APPDATA = &h0023
|
---|
| 423 | Const CSIDL_WINDOWS = &h0024
|
---|
| 424 | Const CSIDL_SYSTEM = &h0025
|
---|
| 425 | Const CSIDL_PROGRAM_FILES = &h0026
|
---|
| 426 | Const CSIDL_MYPICTURES = &h0027
|
---|
| 427 | Const CSIDL_PROFILE = &h0028
|
---|
| 428 | Const CSIDL_PROGRAM_FILES_COMMON = &h002b
|
---|
| 429 | Const CSIDL_COMMON_TEMPLATES = &h002d
|
---|
| 430 | Const CSIDL_COMMON_DOCUMENTS = &h002e
|
---|
| 431 | Const CSIDL_COMMON_ADMINTOOLS = &h002f
|
---|
| 432 | Const CSIDL_ADMINTOOLS = &h0030
|
---|
| 433 |
|
---|
[160] | 434 | Const SHGFI_ICON = &H000000100
|
---|
| 435 | Const SHGFI_DISPLAYNAME = &H000000200
|
---|
| 436 | Const SHGFI_TYPENAME = &H000000400
|
---|
| 437 | Const SHGFI_ATTRIBUTES = &H000000800
|
---|
| 438 | Const SHGFI_ICONLOCATION = &H000001000
|
---|
| 439 | Const SHGFI_EXETYPE = &H000002000
|
---|
| 440 | Const SHGFI_SYSICONINDEX = &H000004000
|
---|
| 441 | Const SHGFI_LINKOVERLAY = &H000008000
|
---|
| 442 | Const SHGFI_SELECTED = &H000010000
|
---|
| 443 | Const SHGFI_ATTR_SPECIFIED = &H000020000
|
---|
| 444 | Const SHGFI_LARGEICON = &H000000000
|
---|
| 445 | Const SHGFI_SMALLICON = &H000000001
|
---|
| 446 | Const SHGFI_OPENICON = &H000000002
|
---|
| 447 | Const SHGFI_SHELLICONSIZE = &H000000004
|
---|
| 448 | Const SHGFI_PIDL = &H000000008
|
---|
| 449 | Const SHGFI_USEFILEATTRIBUTES = &H000000010
|
---|
| 450 | Const SHGFI_ADDOVERLAYS = &H000000020
|
---|
| 451 | Const SHGFI_OVERLAYINDEX = &H000000040
|
---|
| 452 |
|
---|
| 453 | ' ShellApi.h
|
---|
| 454 | Type SHFILEINFO
|
---|
| 455 | hIcon As HICON
|
---|
| 456 | iIcon As Long
|
---|
| 457 | dwAttributes As DWord
|
---|
| 458 | szDisplayName[ELM(MAX_PATH)] As TCHAR
|
---|
| 459 | szTypeName[ELM(80)] As TCHAR
|
---|
| 460 | End Type
|
---|
| 461 |
|
---|
| 462 | ' shellapi.h
|
---|
| 463 | 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
|
---|
| 464 |
|
---|
| 465 | Type NOTIFYICONDATAW
|
---|
| 466 | cbSize As DWord
|
---|
| 467 | hWnd As HWND
|
---|
| 468 | uID As DWord
|
---|
| 469 | uFlags As DWord
|
---|
| 470 | uCallbackMessage As DWord
|
---|
| 471 | hIcon As HICON
|
---|
| 472 | szTip[ELM(64)] As WCHAR
|
---|
| 473 | dwState As DWord
|
---|
| 474 | dwStateMask As DWord
|
---|
| 475 | szInfo[ELM(256)] As WCHAR
|
---|
| 476 | 'Union
|
---|
| 477 | uTimeout As DWord
|
---|
| 478 | ' uVersion As DWord
|
---|
| 479 | 'End Union
|
---|
| 480 | szInfoTitle[ELM(64)] As WCHAR
|
---|
| 481 | dwInfoFlags As DWord
|
---|
| 482 | guidItem As GUID
|
---|
| 483 | End Type
|
---|
| 484 | Type NOTIFYICONDATAA
|
---|
| 485 | cbSize As DWord
|
---|
| 486 | hWnd As HWND
|
---|
| 487 | uID As DWord
|
---|
| 488 | uFlags As DWord
|
---|
| 489 | uCallbackMessage As DWord
|
---|
| 490 | hIcon As HICON
|
---|
| 491 | szTip[ELM(64)] As SByte
|
---|
| 492 | dwState As DWord
|
---|
| 493 | dwStateMask As DWord
|
---|
| 494 | szInfo[ELM(256)] As SByte
|
---|
| 495 | 'Union
|
---|
| 496 | uTimeout As DWord
|
---|
| 497 | ' uVersion As DWord
|
---|
| 498 | 'End Union
|
---|
| 499 | szInfoTitle[ELM(64)] As SByte
|
---|
| 500 | dwInfoFlags As DWord
|
---|
| 501 | guidItem As GUID
|
---|
| 502 | End Type
|
---|
| 503 | #ifdef UNICODE
|
---|
| 504 | TypeDef NOTIFYICONDATA = NOTIFYICONDATAW
|
---|
| 505 | #else
|
---|
| 506 | TypeDef NOTIFYICONDATA = NOTIFYICONDATAA
|
---|
| 507 | #endif
|
---|
| 508 | Declare Function Shell_NotifyIcon Lib "shell32" Alias _FuncName_Shell_NotifyIcon (dwMessage As DWORD, ByRef data As NOTIFYICONDATA) As BOOL
|
---|
| 509 |
|
---|
| 510 | Type STRRET 'shtypes.h
|
---|
| 511 | uType As DWord
|
---|
| 512 | 'Union
|
---|
| 513 | 'pOleStr As *WCHAR
|
---|
| 514 | 'uOffset As DWord
|
---|
| 515 | cStr[ELM(MAX_PATH)] As Byte
|
---|
| 516 | 'End Union
|
---|
| 517 | End Type
|
---|
| 518 |
|
---|
| 519 | ' shobjidl.h
|
---|
| 520 | Enum SLGP_FLAGS
|
---|
| 521 | SLGP_SHORTPATH = &h1
|
---|
| 522 | SLGP_UNCPRIORITY = &h2
|
---|
| 523 | SLGP_RAWPATH = &h4
|
---|
| 524 | SLGP_RELATIVEPRIORITY = &h8
|
---|
| 525 | End Enum
|
---|
| 526 |
|
---|
| 527 | Interface IShellLinkA 'shobjidl.h
|
---|
| 528 | Inherits IUnknown
|
---|
| 529 |
|
---|
| 530 | Function GetPath(
|
---|
| 531 | /* [size_is][out] */ pszFile As PSTR,
|
---|
| 532 | /* [in] */ cch As Long,
|
---|
| 533 | /* [full][out][in] */ pfd As *WIN32_FIND_DATAA,
|
---|
| 534 | /* [in] */ fFlags As DWord) As HRESULT
|
---|
| 535 | Function GetIDList(
|
---|
| 536 | /* [out] */ ByRef ppidl As LPITEMIDLIST) As HRESULT
|
---|
| 537 | Function SetIDList(
|
---|
| 538 | /* [in] */ pidl As LPCITEMIDLIST) As HRESULT
|
---|
| 539 | Function GetDescription(
|
---|
| 540 | /* [size_is][out] */ pszName As PSTR,
|
---|
| 541 | /* [in] */ cch As Long) As HRESULT
|
---|
| 542 | Function SetDescription(
|
---|
| 543 | /* [in] */ pszName As PCSTR) As HRESULT
|
---|
| 544 | Function GetWorkingDirectory(
|
---|
| 545 | /* [size_is][out] */ pszDir As PSTR,
|
---|
| 546 | /* [in] */ cch As Long) As HRESULT
|
---|
| 547 | Function SetWorkingDirectory(
|
---|
| 548 | /* [in] */ pszDir As PCSTR) As HRESULT
|
---|
| 549 | Function GetArguments(
|
---|
| 550 | /* [size_is][out] */ pszArgs As PSTR,
|
---|
| 551 | /* [in] */ cch As Long) As HRESULT
|
---|
| 552 | Function SetArguments(
|
---|
| 553 | /* [in] */ pszArgs As PCSTR) As HRESULT
|
---|
| 554 | Function GetHotkey(
|
---|
| 555 | /* [out] */ ByRef wHotkey As Word) As HRESULT
|
---|
| 556 | Function SetHotkey(
|
---|
| 557 | /* [in] */ wHotkey As Word) As HRESULT
|
---|
| 558 | Function GetShowCmd(
|
---|
| 559 | /* [out] */ ByRef piShowCmd As Long) As HRESULT
|
---|
| 560 | Function SetShowCmd(
|
---|
| 561 | /* [in] */ iShowCmd As Long) As HRESULT
|
---|
| 562 | Function GetIconLocation(
|
---|
| 563 | /* [size_is][out] */ pszIconPath As PSTR,
|
---|
| 564 | /* [in] */ cch As Long,
|
---|
| 565 | /* [out] */ ByRef iIcon As Long) As HRESULT
|
---|
| 566 | Function SetIconLocation(
|
---|
| 567 | /* [in] */ pszIconPath As PCSTR,
|
---|
| 568 | /* [in] */ iIcon As Long) As HRESULT
|
---|
| 569 | Function SetRelativePath(
|
---|
| 570 | /* [in] */ pszPathRel As PCSTR,
|
---|
| 571 | /* [in] */ dwReserved As DWord) As HRESULT
|
---|
| 572 | Function Resolve(
|
---|
| 573 | /* [in] */ hwnd As HWND,
|
---|
| 574 | /* [in] */ fFlags As DWord) As HRESULT
|
---|
| 575 | Function SetPath(
|
---|
| 576 | /* [in] */ pszFile As PCSTR) As HRESULT
|
---|
| 577 | End Interface
|
---|
| 578 |
|
---|
| 579 | Interface IShellLinkW 'shobjidl.h
|
---|
| 580 | Inherits IUnknown
|
---|
| 581 |
|
---|
| 582 | Function GetPath(
|
---|
| 583 | /* [size_is][out] */ pszFile As PWSTR,
|
---|
| 584 | /* [in] */ cch As Long,
|
---|
| 585 | /* [full][out][in] */ pfd As *WIN32_FIND_DATAW,
|
---|
| 586 | /* [in] */ fFlags As DWord) As HRESULT
|
---|
| 587 | Function GetIDList(
|
---|
| 588 | /* [out] */ ppidl As *LPITEMIDLIST) As HRESULT
|
---|
| 589 | Function SetIDList(
|
---|
| 590 | /* [in] */ pidl As LPCITEMIDLIST) As HRESULT
|
---|
| 591 | Function GetDescription(
|
---|
| 592 | /* [size_is][out] */ pszName As PWSTR,
|
---|
| 593 | /* [in] */ cch As Long) As HRESULT
|
---|
| 594 | Function SetDescription(
|
---|
| 595 | /* [in] */ pszName As PCWSTR) As HRESULT
|
---|
| 596 | Function GetWorkingDirectory(
|
---|
| 597 | /* [size_is][out] */ pszDir As PSTR,
|
---|
| 598 | /* [in] */ cch As Long) As HRESULT
|
---|
| 599 | Function SetWorkingDirectory(
|
---|
| 600 | /* [in] */ pszDir As PCWSTR) As HRESULT
|
---|
| 601 | Function GetArguments(
|
---|
| 602 | /* [size_is][out] */ pszArgs As PSTR,
|
---|
| 603 | /* [in] */ cch As Long) As HRESULT
|
---|
| 604 | Function SetArguments(
|
---|
| 605 | /* [in] */ pszArgs As PCWSTR) As HRESULT
|
---|
| 606 | Function GetHotkey(
|
---|
| 607 | /* [out] */ ByRef wHotkey As Word) As HRESULT
|
---|
| 608 | Function SetHotkey(
|
---|
| 609 | /* [in] */ wHotkey As Word) As HRESULT
|
---|
| 610 | Function GetShowCmd(
|
---|
| 611 | /* [out] */ ByRef piShowCmd As Long) As HRESULT
|
---|
| 612 | Function SetShowCmd(
|
---|
| 613 | /* [in] */ iShowCmd As Long) As HRESULT
|
---|
| 614 | Function GetIconLocation(
|
---|
| 615 | /* [size_is][out] */ pszIconPath As PWSTR,
|
---|
| 616 | /* [in] */ cch As Long,
|
---|
| 617 | /* [out] */ ByRef iIcon As Long) As HRESULT
|
---|
| 618 | Function SetIconLocation(
|
---|
| 619 | /* [in] */ pszIconPath As PCWSTR,
|
---|
| 620 | /* [in] */ iIcon As Long) As HRESULT
|
---|
| 621 | Function SetRelativePath(
|
---|
| 622 | /* [in] */ pszPathRel As PCWSTR,
|
---|
| 623 | /* [in] */ dwReserved As DWord) As HRESULT
|
---|
| 624 | Function Resolve(
|
---|
| 625 | /* [in] */ hwnd As HWND,
|
---|
| 626 | /* [in] */ fFlags As DWord) As HRESULT
|
---|
| 627 | Function SetPath(
|
---|
| 628 | /* [in] */ pszFile As PCWSTR) As HRESULT
|
---|
| 629 | End Interface
|
---|
| 630 |
|
---|
| 631 | #ifdef UNICODE
|
---|
| 632 | TypeDef IShellLink = IShellLinkW
|
---|
| 633 | #else
|
---|
| 634 | TypeDef IShellLink = IShellLinkA
|
---|
| 635 | #endif
|
---|
| 636 |
|
---|
| 637 | Enum SHCONT
|
---|
| 638 | SHCONTF_FOLDERS = &h0020
|
---|
| 639 | SHCONTF_NONFOLDERS = &h0040
|
---|
| 640 | SHCONTF_INCLUDEHIDDEN = &h0080
|
---|
| 641 | SHCONTF_INIT_ON_FIRST_NEXT = &h0100
|
---|
| 642 | SHCONTF_NETPRINTERSRCH = &h0200
|
---|
| 643 | SHCONTF_SHAREABLE = &h0400
|
---|
| 644 | SHCONTF_STORAGE = &h0800
|
---|
| 645 | End Enum
|
---|
| 646 |
|
---|
| 647 | Enum SHGNO
|
---|
| 648 | SHGDN_NORMAL = &h0000
|
---|
| 649 | SHGDN_INFOLDER = &h0001
|
---|
| 650 | SHGDN_FOREDITING = &h1000
|
---|
| 651 | SHGDN_FORADDRESSBAR = &h4000
|
---|
| 652 | SHGDN_FORPARSING = &h8000
|
---|
| 653 | End Enum
|
---|
| 654 |
|
---|
| 655 | TypeDef SHCONTF = DWord
|
---|
| 656 | TypeDef SFGAOF = DWord
|
---|
| 657 | TypeDef SHGDNF = DWord
|
---|
| 658 |
|
---|
| 659 | Dim IID_IShellFolder = [&h000214E6, 0, 0, [&hC0, 0, 0, 0, 0, 0, 0, &h46]] As IID
|
---|
| 660 | Interface IShellFolder 'shobjidl.h
|
---|
| 661 | Inherits IUnknown
|
---|
| 662 |
|
---|
| 663 | Function ParseDisplayName(
|
---|
| 664 | /* [in] */ hwnd As HWND,
|
---|
| 665 | /* [in] */ pbc As *IBindCtx,
|
---|
| 666 | /* [string][in] */ pszDisplayName As LPOLESTR,
|
---|
| 667 | /* [out] */ pchEaten As *DWord,
|
---|
| 668 | /* [out] */ ByRef pidl As *ITEMIDLIST,
|
---|
| 669 | /* [unique][out][in] */ pdwAttributes As *DWord) As HRESULT
|
---|
| 670 | Function EnumObjects(
|
---|
| 671 | /* [in] */ hwnd As HWND,
|
---|
| 672 | /* [in] */ grfFlags As SHCONTF,
|
---|
| 673 | /* [out] */ ByRef penumIDList As *IEnumIDList) As HRESULT
|
---|
| 674 | Function BindToObject(
|
---|
| 675 | /* [in] */ pidl As *ITEMIDLIST,
|
---|
| 676 | /* [in] */ pbc As *IBindCtx,
|
---|
| 677 | /* [in] */ ByRef riid As IID,
|
---|
| 678 | /* [iid_is][out] */ ppv As *VoidPtr) As HRESULT
|
---|
| 679 | Function BindToStorage(
|
---|
| 680 | /* [in] */ pidl As *ITEMIDLIST,
|
---|
| 681 | /* [in] */ pbc As *IBindCtx,
|
---|
| 682 | /* [in] */ ByRef riid As IID,
|
---|
| 683 | /* [iid_is][out] */ ppv As *VoidPtr) As HRESULT
|
---|
| 684 | Function CompareIDs(
|
---|
| 685 | /* [in] */ lParam As LPARAM,
|
---|
| 686 | /* [in] */ pidl1 As *ITEMIDLIST,
|
---|
| 687 | /* [in] */ pidl2 As *ITEMIDLIST) As HRESULT
|
---|
| 688 | Function CreateViewObject(
|
---|
| 689 | /* [in] */ hwndOwner As HWND,
|
---|
| 690 | /* [in] */ ByRef riid As IID,
|
---|
| 691 | /* [iid_is][out] */ ppv As *VoidPtr) As HRESULT
|
---|
| 692 | Function GetAttributesOf(
|
---|
| 693 | /* [in] */ cidl As DWord,
|
---|
| 694 | /* [size_is][in] */ apidl As *ITEMIDLIST,
|
---|
| 695 | /* [out][in] */ ByRef rgfInOut As SFGAOF) As HRESULT
|
---|
| 696 | Function GetUIObjectOf(
|
---|
| 697 | /* [in] */ hwndOwner As HWND,
|
---|
| 698 | /* [in] */ cidl As DWord,
|
---|
| 699 | /* [size_is][in] */ apidl As *ITEMIDLIST,
|
---|
| 700 | /* [in] */ ByRef riid As IID,
|
---|
| 701 | /* [unique][out][in] */ rgfReserved As *DWord,
|
---|
| 702 | /* [iid_is][out] */ ppv As *VoidPtr) As HRESULT
|
---|
| 703 | Function GetDisplayNameOf(
|
---|
| 704 | /* [in] */ pidl As *ITEMIDLIST,
|
---|
| 705 | /* [in] */ uFlags As SHGDNF,
|
---|
| 706 | /* [out] */ ByRef pName As STRRET) As HRESULT
|
---|
| 707 | Function SetNameOf(
|
---|
| 708 | /* [in] */ hwnd As HWND,
|
---|
| 709 | /* [in] */ pidl As *ITEMIDLIST,
|
---|
| 710 | /* [string][in] */ pszName As LPCWSTR,
|
---|
| 711 | /* [in] */ uFlags As SHGDNF,
|
---|
| 712 | /* [out] */ ByRef ppidlOut As LPITEMIDLIST) As HRESULT
|
---|
| 713 | End Interface
|
---|
| 714 |
|
---|
[1] | 715 | #endif '_INC_SHELL
|
---|