[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"
|
---|
| 19 | Const _FuncName_Shell_NotifyIcon = "_FuncName_Shell_NotifyIconW"
|
---|
| 20 | Const _FuncName_SHEmptyRecycleBin = "_FuncName_SHEmptyRecycleBinW"
|
---|
[141] | 21 | Const _FuncName_SHFileOperation = "SHFileOperationW"
|
---|
[160] | 22 | Const _FuncName_SHGetFileInfo = "_FuncName_SHGetFileInfoW"
|
---|
[141] | 23 | Const _FuncName_SHGetPathFromIDList = "SHGetPathFromIDListW"
|
---|
[160] | 24 | Const _FuncName_SHGetSpecialFolderPath = "_FuncName_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"
|
---|
| 37 | Const _FuncName_Shell_NotifyIcon = "_FuncName_Shell_NotifyIconA"
|
---|
| 38 | Const _FuncName_SHEmptyRecycleBin = "_FuncName_SHEmptyRecycleBinA"
|
---|
[141] | 39 | Const _FuncName_SHFileOperation = "SHFileOperationA"
|
---|
[160] | 40 | Const _FuncName_SHGetFileInfo = "_FuncName_SHGetFileInfoA"
|
---|
[141] | 41 | Const _FuncName_SHGetPathFromIDList = "SHGetPathFromIDListA"
|
---|
[160] | 42 | Const _FuncName_SHGetSpecialFolderPath = "_FuncName_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
|
---|
[1] | 334 | hWnd As HWND
|
---|
| 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
|
---|
| 344 | hWnd As HWND
|
---|
| 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
|
---|
| 376 | Declare Function SHGetSpecialFolderPath Lib "shell32" Alias _FuncName_SHGetSpecialFolderPath (hwndOwner As HWND, lpszPath As LPTSTR, nFolder As Long, fCreate As BOOL) As BOOL
|
---|
| 377 |
|
---|
| 378 | ' shlobj.h
|
---|
| 379 | Declare Function SHGetInstanceExplorer Lib "shell32" (ByRef ppunk As *IUnknown) As HRESULT
|
---|
| 380 |
|
---|
| 381 | Const CSIDL_PERSONAL = 5
|
---|
| 382 | Const CSIDL_FAVORITIES = 6
|
---|
| 383 |
|
---|
| 384 | Const SHGFI_ICON = &H000000100
|
---|
| 385 | Const SHGFI_DISPLAYNAME = &H000000200
|
---|
| 386 | Const SHGFI_TYPENAME = &H000000400
|
---|
| 387 | Const SHGFI_ATTRIBUTES = &H000000800
|
---|
| 388 | Const SHGFI_ICONLOCATION = &H000001000
|
---|
| 389 | Const SHGFI_EXETYPE = &H000002000
|
---|
| 390 | Const SHGFI_SYSICONINDEX = &H000004000
|
---|
| 391 | Const SHGFI_LINKOVERLAY = &H000008000
|
---|
| 392 | Const SHGFI_SELECTED = &H000010000
|
---|
| 393 | Const SHGFI_ATTR_SPECIFIED = &H000020000
|
---|
| 394 | Const SHGFI_LARGEICON = &H000000000
|
---|
| 395 | Const SHGFI_SMALLICON = &H000000001
|
---|
| 396 | Const SHGFI_OPENICON = &H000000002
|
---|
| 397 | Const SHGFI_SHELLICONSIZE = &H000000004
|
---|
| 398 | Const SHGFI_PIDL = &H000000008
|
---|
| 399 | Const SHGFI_USEFILEATTRIBUTES = &H000000010
|
---|
| 400 | Const SHGFI_ADDOVERLAYS = &H000000020
|
---|
| 401 | Const SHGFI_OVERLAYINDEX = &H000000040
|
---|
| 402 |
|
---|
| 403 | ' ShellApi.h
|
---|
| 404 | Type SHFILEINFO
|
---|
| 405 | hIcon As HICON
|
---|
| 406 | iIcon As Long
|
---|
| 407 | dwAttributes As DWord
|
---|
| 408 | szDisplayName[ELM(MAX_PATH)] As TCHAR
|
---|
| 409 | szTypeName[ELM(80)] As TCHAR
|
---|
| 410 | End Type
|
---|
| 411 |
|
---|
| 412 | ' shellapi.h
|
---|
| 413 | 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
|
---|
| 414 |
|
---|
| 415 | Type NOTIFYICONDATAW
|
---|
| 416 | cbSize As DWord
|
---|
| 417 | hWnd As HWND
|
---|
| 418 | uID As DWord
|
---|
| 419 | uFlags As DWord
|
---|
| 420 | uCallbackMessage As DWord
|
---|
| 421 | hIcon As HICON
|
---|
| 422 | szTip[ELM(64)] As WCHAR
|
---|
| 423 | dwState As DWord
|
---|
| 424 | dwStateMask As DWord
|
---|
| 425 | szInfo[ELM(256)] As WCHAR
|
---|
| 426 | 'Union
|
---|
| 427 | uTimeout As DWord
|
---|
| 428 | ' uVersion As DWord
|
---|
| 429 | 'End Union
|
---|
| 430 | szInfoTitle[ELM(64)] As WCHAR
|
---|
| 431 | dwInfoFlags As DWord
|
---|
| 432 | guidItem As GUID
|
---|
| 433 | End Type
|
---|
| 434 | Type NOTIFYICONDATAA
|
---|
| 435 | cbSize As DWord
|
---|
| 436 | hWnd As HWND
|
---|
| 437 | uID As DWord
|
---|
| 438 | uFlags As DWord
|
---|
| 439 | uCallbackMessage As DWord
|
---|
| 440 | hIcon As HICON
|
---|
| 441 | szTip[ELM(64)] As SByte
|
---|
| 442 | dwState As DWord
|
---|
| 443 | dwStateMask As DWord
|
---|
| 444 | szInfo[ELM(256)] As SByte
|
---|
| 445 | 'Union
|
---|
| 446 | uTimeout As DWord
|
---|
| 447 | ' uVersion As DWord
|
---|
| 448 | 'End Union
|
---|
| 449 | szInfoTitle[ELM(64)] As SByte
|
---|
| 450 | dwInfoFlags As DWord
|
---|
| 451 | guidItem As GUID
|
---|
| 452 | End Type
|
---|
| 453 | #ifdef UNICODE
|
---|
| 454 | TypeDef NOTIFYICONDATA = NOTIFYICONDATAW
|
---|
| 455 | #else
|
---|
| 456 | TypeDef NOTIFYICONDATA = NOTIFYICONDATAA
|
---|
| 457 | #endif
|
---|
| 458 | Declare Function Shell_NotifyIcon Lib "shell32" Alias _FuncName_Shell_NotifyIcon (dwMessage As DWORD, ByRef data As NOTIFYICONDATA) As BOOL
|
---|
| 459 |
|
---|
| 460 | Type STRRET 'shtypes.h
|
---|
| 461 | uType As DWord
|
---|
| 462 | 'Union
|
---|
| 463 | 'pOleStr As *WCHAR
|
---|
| 464 | 'uOffset As DWord
|
---|
| 465 | cStr[ELM(MAX_PATH)] As Byte
|
---|
| 466 | 'End Union
|
---|
| 467 | End Type
|
---|
| 468 |
|
---|
| 469 | ' shobjidl.h
|
---|
| 470 | Enum SLGP_FLAGS
|
---|
| 471 | SLGP_SHORTPATH = &h1
|
---|
| 472 | SLGP_UNCPRIORITY = &h2
|
---|
| 473 | SLGP_RAWPATH = &h4
|
---|
| 474 | SLGP_RELATIVEPRIORITY = &h8
|
---|
| 475 | End Enum
|
---|
| 476 |
|
---|
| 477 | Interface IShellLinkA 'shobjidl.h
|
---|
| 478 | Inherits IUnknown
|
---|
| 479 |
|
---|
| 480 | Function GetPath(
|
---|
| 481 | /* [size_is][out] */ pszFile As PSTR,
|
---|
| 482 | /* [in] */ cch As Long,
|
---|
| 483 | /* [full][out][in] */ pfd As *WIN32_FIND_DATAA,
|
---|
| 484 | /* [in] */ fFlags As DWord) As HRESULT
|
---|
| 485 | Function GetIDList(
|
---|
| 486 | /* [out] */ ByRef ppidl As LPITEMIDLIST) As HRESULT
|
---|
| 487 | Function SetIDList(
|
---|
| 488 | /* [in] */ pidl As LPCITEMIDLIST) As HRESULT
|
---|
| 489 | Function GetDescription(
|
---|
| 490 | /* [size_is][out] */ pszName As PSTR,
|
---|
| 491 | /* [in] */ cch As Long) As HRESULT
|
---|
| 492 | Function SetDescription(
|
---|
| 493 | /* [in] */ pszName As PCSTR) As HRESULT
|
---|
| 494 | Function GetWorkingDirectory(
|
---|
| 495 | /* [size_is][out] */ pszDir As PSTR,
|
---|
| 496 | /* [in] */ cch As Long) As HRESULT
|
---|
| 497 | Function SetWorkingDirectory(
|
---|
| 498 | /* [in] */ pszDir As PCSTR) As HRESULT
|
---|
| 499 | Function GetArguments(
|
---|
| 500 | /* [size_is][out] */ pszArgs As PSTR,
|
---|
| 501 | /* [in] */ cch As Long) As HRESULT
|
---|
| 502 | Function SetArguments(
|
---|
| 503 | /* [in] */ pszArgs As PCSTR) As HRESULT
|
---|
| 504 | Function GetHotkey(
|
---|
| 505 | /* [out] */ ByRef wHotkey As Word) As HRESULT
|
---|
| 506 | Function SetHotkey(
|
---|
| 507 | /* [in] */ wHotkey As Word) As HRESULT
|
---|
| 508 | Function GetShowCmd(
|
---|
| 509 | /* [out] */ ByRef piShowCmd As Long) As HRESULT
|
---|
| 510 | Function SetShowCmd(
|
---|
| 511 | /* [in] */ iShowCmd As Long) As HRESULT
|
---|
| 512 | Function GetIconLocation(
|
---|
| 513 | /* [size_is][out] */ pszIconPath As PSTR,
|
---|
| 514 | /* [in] */ cch As Long,
|
---|
| 515 | /* [out] */ ByRef iIcon As Long) As HRESULT
|
---|
| 516 | Function SetIconLocation(
|
---|
| 517 | /* [in] */ pszIconPath As PCSTR,
|
---|
| 518 | /* [in] */ iIcon As Long) As HRESULT
|
---|
| 519 | Function SetRelativePath(
|
---|
| 520 | /* [in] */ pszPathRel As PCSTR,
|
---|
| 521 | /* [in] */ dwReserved As DWord) As HRESULT
|
---|
| 522 | Function Resolve(
|
---|
| 523 | /* [in] */ hwnd As HWND,
|
---|
| 524 | /* [in] */ fFlags As DWord) As HRESULT
|
---|
| 525 | Function SetPath(
|
---|
| 526 | /* [in] */ pszFile As PCSTR) As HRESULT
|
---|
| 527 | End Interface
|
---|
| 528 |
|
---|
| 529 | Interface IShellLinkW 'shobjidl.h
|
---|
| 530 | Inherits IUnknown
|
---|
| 531 |
|
---|
| 532 | Function GetPath(
|
---|
| 533 | /* [size_is][out] */ pszFile As PWSTR,
|
---|
| 534 | /* [in] */ cch As Long,
|
---|
| 535 | /* [full][out][in] */ pfd As *WIN32_FIND_DATAW,
|
---|
| 536 | /* [in] */ fFlags As DWord) As HRESULT
|
---|
| 537 | Function GetIDList(
|
---|
| 538 | /* [out] */ ppidl As *LPITEMIDLIST) As HRESULT
|
---|
| 539 | Function SetIDList(
|
---|
| 540 | /* [in] */ pidl As LPCITEMIDLIST) As HRESULT
|
---|
| 541 | Function GetDescription(
|
---|
| 542 | /* [size_is][out] */ pszName As PWSTR,
|
---|
| 543 | /* [in] */ cch As Long) As HRESULT
|
---|
| 544 | Function SetDescription(
|
---|
| 545 | /* [in] */ pszName As PCWSTR) As HRESULT
|
---|
| 546 | Function GetWorkingDirectory(
|
---|
| 547 | /* [size_is][out] */ pszDir As PSTR,
|
---|
| 548 | /* [in] */ cch As Long) As HRESULT
|
---|
| 549 | Function SetWorkingDirectory(
|
---|
| 550 | /* [in] */ pszDir As PCWSTR) As HRESULT
|
---|
| 551 | Function GetArguments(
|
---|
| 552 | /* [size_is][out] */ pszArgs As PSTR,
|
---|
| 553 | /* [in] */ cch As Long) As HRESULT
|
---|
| 554 | Function SetArguments(
|
---|
| 555 | /* [in] */ pszArgs As PCWSTR) As HRESULT
|
---|
| 556 | Function GetHotkey(
|
---|
| 557 | /* [out] */ ByRef wHotkey As Word) As HRESULT
|
---|
| 558 | Function SetHotkey(
|
---|
| 559 | /* [in] */ wHotkey As Word) As HRESULT
|
---|
| 560 | Function GetShowCmd(
|
---|
| 561 | /* [out] */ ByRef piShowCmd As Long) As HRESULT
|
---|
| 562 | Function SetShowCmd(
|
---|
| 563 | /* [in] */ iShowCmd As Long) As HRESULT
|
---|
| 564 | Function GetIconLocation(
|
---|
| 565 | /* [size_is][out] */ pszIconPath As PWSTR,
|
---|
| 566 | /* [in] */ cch As Long,
|
---|
| 567 | /* [out] */ ByRef iIcon As Long) As HRESULT
|
---|
| 568 | Function SetIconLocation(
|
---|
| 569 | /* [in] */ pszIconPath As PCWSTR,
|
---|
| 570 | /* [in] */ iIcon As Long) As HRESULT
|
---|
| 571 | Function SetRelativePath(
|
---|
| 572 | /* [in] */ pszPathRel As PCWSTR,
|
---|
| 573 | /* [in] */ dwReserved As DWord) As HRESULT
|
---|
| 574 | Function Resolve(
|
---|
| 575 | /* [in] */ hwnd As HWND,
|
---|
| 576 | /* [in] */ fFlags As DWord) As HRESULT
|
---|
| 577 | Function SetPath(
|
---|
| 578 | /* [in] */ pszFile As PCWSTR) As HRESULT
|
---|
| 579 | End Interface
|
---|
| 580 |
|
---|
| 581 | #ifdef UNICODE
|
---|
| 582 | TypeDef IShellLink = IShellLinkW
|
---|
| 583 | #else
|
---|
| 584 | TypeDef IShellLink = IShellLinkA
|
---|
| 585 | #endif
|
---|
| 586 |
|
---|
| 587 | Enum SHCONT
|
---|
| 588 | SHCONTF_FOLDERS = &h0020
|
---|
| 589 | SHCONTF_NONFOLDERS = &h0040
|
---|
| 590 | SHCONTF_INCLUDEHIDDEN = &h0080
|
---|
| 591 | SHCONTF_INIT_ON_FIRST_NEXT = &h0100
|
---|
| 592 | SHCONTF_NETPRINTERSRCH = &h0200
|
---|
| 593 | SHCONTF_SHAREABLE = &h0400
|
---|
| 594 | SHCONTF_STORAGE = &h0800
|
---|
| 595 | End Enum
|
---|
| 596 |
|
---|
| 597 | Enum SHGNO
|
---|
| 598 | SHGDN_NORMAL = &h0000
|
---|
| 599 | SHGDN_INFOLDER = &h0001
|
---|
| 600 | SHGDN_FOREDITING = &h1000
|
---|
| 601 | SHGDN_FORADDRESSBAR = &h4000
|
---|
| 602 | SHGDN_FORPARSING = &h8000
|
---|
| 603 | End Enum
|
---|
| 604 |
|
---|
| 605 | TypeDef SHCONTF = DWord
|
---|
| 606 | TypeDef SFGAOF = DWord
|
---|
| 607 | TypeDef SHGDNF = DWord
|
---|
| 608 |
|
---|
| 609 | Dim IID_IShellFolder = [&h000214E6, 0, 0, [&hC0, 0, 0, 0, 0, 0, 0, &h46]] As IID
|
---|
| 610 | Interface IShellFolder 'shobjidl.h
|
---|
| 611 | Inherits IUnknown
|
---|
| 612 |
|
---|
| 613 | Function ParseDisplayName(
|
---|
| 614 | /* [in] */ hwnd As HWND,
|
---|
| 615 | /* [in] */ pbc As *IBindCtx,
|
---|
| 616 | /* [string][in] */ pszDisplayName As LPOLESTR,
|
---|
| 617 | /* [out] */ pchEaten As *DWord,
|
---|
| 618 | /* [out] */ ByRef pidl As *ITEMIDLIST,
|
---|
| 619 | /* [unique][out][in] */ pdwAttributes As *DWord) As HRESULT
|
---|
| 620 | Function EnumObjects(
|
---|
| 621 | /* [in] */ hwnd As HWND,
|
---|
| 622 | /* [in] */ grfFlags As SHCONTF,
|
---|
| 623 | /* [out] */ ByRef penumIDList As *IEnumIDList) As HRESULT
|
---|
| 624 | Function BindToObject(
|
---|
| 625 | /* [in] */ pidl As *ITEMIDLIST,
|
---|
| 626 | /* [in] */ pbc As *IBindCtx,
|
---|
| 627 | /* [in] */ ByRef riid As IID,
|
---|
| 628 | /* [iid_is][out] */ ppv As *VoidPtr) As HRESULT
|
---|
| 629 | Function BindToStorage(
|
---|
| 630 | /* [in] */ pidl As *ITEMIDLIST,
|
---|
| 631 | /* [in] */ pbc As *IBindCtx,
|
---|
| 632 | /* [in] */ ByRef riid As IID,
|
---|
| 633 | /* [iid_is][out] */ ppv As *VoidPtr) As HRESULT
|
---|
| 634 | Function CompareIDs(
|
---|
| 635 | /* [in] */ lParam As LPARAM,
|
---|
| 636 | /* [in] */ pidl1 As *ITEMIDLIST,
|
---|
| 637 | /* [in] */ pidl2 As *ITEMIDLIST) As HRESULT
|
---|
| 638 | Function CreateViewObject(
|
---|
| 639 | /* [in] */ hwndOwner As HWND,
|
---|
| 640 | /* [in] */ ByRef riid As IID,
|
---|
| 641 | /* [iid_is][out] */ ppv As *VoidPtr) As HRESULT
|
---|
| 642 | Function GetAttributesOf(
|
---|
| 643 | /* [in] */ cidl As DWord,
|
---|
| 644 | /* [size_is][in] */ apidl As *ITEMIDLIST,
|
---|
| 645 | /* [out][in] */ ByRef rgfInOut As SFGAOF) As HRESULT
|
---|
| 646 | Function GetUIObjectOf(
|
---|
| 647 | /* [in] */ hwndOwner As HWND,
|
---|
| 648 | /* [in] */ cidl As DWord,
|
---|
| 649 | /* [size_is][in] */ apidl As *ITEMIDLIST,
|
---|
| 650 | /* [in] */ ByRef riid As IID,
|
---|
| 651 | /* [unique][out][in] */ rgfReserved As *DWord,
|
---|
| 652 | /* [iid_is][out] */ ppv As *VoidPtr) As HRESULT
|
---|
| 653 | Function GetDisplayNameOf(
|
---|
| 654 | /* [in] */ pidl As *ITEMIDLIST,
|
---|
| 655 | /* [in] */ uFlags As SHGDNF,
|
---|
| 656 | /* [out] */ ByRef pName As STRRET) As HRESULT
|
---|
| 657 | Function SetNameOf(
|
---|
| 658 | /* [in] */ hwnd As HWND,
|
---|
| 659 | /* [in] */ pidl As *ITEMIDLIST,
|
---|
| 660 | /* [string][in] */ pszName As LPCWSTR,
|
---|
| 661 | /* [in] */ uFlags As SHGDNF,
|
---|
| 662 | /* [out] */ ByRef ppidlOut As LPITEMIDLIST) As HRESULT
|
---|
| 663 | End Interface
|
---|
| 664 |
|
---|
[1] | 665 | #endif '_INC_SHELL
|
---|