[1] | 1 | ' api_shell.sbp
|
---|
| 2 |
|
---|
| 3 |
|
---|
| 4 | #ifndef _INC_SHELL
|
---|
| 5 | #define _INC_SHELL
|
---|
| 6 |
|
---|
| 7 |
|
---|
| 8 | '-----------
|
---|
| 9 | ' Shell API
|
---|
| 10 |
|
---|
| 11 | Declare Function DoEnvironmentSubst Lib "shell32" Alias "DoEnvironmentSubstA" (
|
---|
| 12 | pszString As PSTR,
|
---|
| 13 | cchString As DWord
|
---|
| 14 | ) As DWord
|
---|
| 15 |
|
---|
| 16 | Declare Sub DragAcceptFiles Lib "shell32" (hWnd As HWND, bAccept As BOOL)
|
---|
| 17 | Declare Sub DragFinish Lib "shell32" (hDrop As HDROP)
|
---|
| 18 | Declare Function DragQueryFile Lib "shell32" Alias "DragQueryFileA" (hDrop As HDROP, iFile As Long, lpszFile As PSTR, cch As DWord) As DWord
|
---|
| 19 | Declare Function DragQueryPoint Lib "shell32" (hDrop As HDROP, ByRef lpPoint As POINTAPI) As Long
|
---|
| 20 | Declare Function ExtractAssociatedIcon Lib "shell32" Alias "ExtractAssociatedIconA" (hInst As HINSTANCE, lpIconPath As PSTR, lpiIcon As *Word) As HICON
|
---|
| 21 | Declare Function ExtractIcon Lib "shell32" Alias "ExtractIconA" (hInst As HINSTANCE, lpszExeFileName As PCSTR, nIconIndex As Long) As HICON
|
---|
| 22 | Declare Function ExtractIconEx Lib "shell32" Alias "ExtractIconExA" (lpszFile As PCSTR, nIconIndex As Long, phiconLarge As *DWord, phiconSmall As *DWord, nIcons As Long) As HICON
|
---|
| 23 |
|
---|
| 24 | Const ERROR_FILE_NOT_FOUND = 2
|
---|
| 25 | Const ERROR_PATH_NOT_FOUND = 3
|
---|
| 26 | Const ERROR_BAD_FORMAT = 11
|
---|
| 27 | Declare Function FindExecutable Lib "shell32" Alias "FindExecutableA" (
|
---|
| 28 | pFile As PCSTR,
|
---|
| 29 | pDirectory As PCSTR,
|
---|
| 30 | pResult As PCSTR
|
---|
| 31 | ) As Long
|
---|
| 32 |
|
---|
| 33 | Declare Function GUIDFromString Lib "shell32" Alias "GUIDFromStringA" (
|
---|
| 34 | ByVal psz As PCSTR,
|
---|
| 35 | ByRef guid As GUID
|
---|
| 36 | ) As BOOL
|
---|
| 37 |
|
---|
| 38 | ' intshcut.h
|
---|
| 39 | Declare Function InetIsOffline Lib "url" (dwFlags As DWord) As BOOL
|
---|
| 40 | ' intshcut.h
|
---|
| 41 | Declare Function MIMEAssociationDialog Lib "url" (
|
---|
| 42 | hwndParent As HWND,
|
---|
| 43 | dwInFlags As DWord,
|
---|
| 44 | pcszFile As PCSTR,
|
---|
| 45 | pcszMIMEContentType As PCSTR,
|
---|
| 46 | pszAppBuf As PSTR,
|
---|
| 47 | ucAppBufLen As DWord
|
---|
| 48 | ) As HRESULT
|
---|
| 49 |
|
---|
| 50 | Declare Sub SHAddToRecentDocs Lib "shell32" (ByVal uFlags As Long, ByVal pv As VoidPtr)
|
---|
| 51 |
|
---|
| 52 | Const ABM_NEW = &h00000000
|
---|
| 53 | Const ABM_REMOVE = &h00000001
|
---|
| 54 | Const ABM_QUERYPOS = &h00000002
|
---|
| 55 | Const ABM_SETPOS = &h00000003
|
---|
| 56 | Const ABM_GETSTATE = &h00000004
|
---|
| 57 | Const ABM_GETTASKBARPOS = &h00000005
|
---|
| 58 | Const ABM_ACTIVATE = &h00000006
|
---|
| 59 | Const ABM_GETAUTOHIDEBAR = &h00000007
|
---|
| 60 | Const ABM_SETAUTOHIDEBAR = &h00000008
|
---|
| 61 | Const ABM_WINDOWPOSCHANGED = &h0000009
|
---|
| 62 | Const ABM_SETSTATE = &h0000000a
|
---|
| 63 |
|
---|
| 64 | Const ABN_STATECHANGE = &h0000000
|
---|
| 65 | Const ABN_POSCHANGED = &h0000001
|
---|
| 66 | Const ABN_FULLSCREENAPP = &h0000002
|
---|
| 67 | Const ABN_WINDOWARRANGE = &h0000003
|
---|
| 68 |
|
---|
| 69 | Const ABS_AUTOHIDE = &h0000001
|
---|
| 70 | Const ABS_ALWAYSONTOP = &h0000002
|
---|
| 71 |
|
---|
| 72 | Const ABE_LEFT = 0
|
---|
| 73 | Const ABE_TOP = 1
|
---|
| 74 | Const ABE_RIGHT = 2
|
---|
| 75 | Const ABE_BOTTOM = 3
|
---|
| 76 |
|
---|
| 77 | Type APPBARDATA
|
---|
| 78 | cbSize As DWord
|
---|
| 79 | hWnd As HWND
|
---|
| 80 | uCallbackMessage As DWord
|
---|
| 81 | uEdge As DWord
|
---|
| 82 | rc As RECT
|
---|
| 83 | lParam As LPARAM
|
---|
| 84 | End Type
|
---|
| 85 |
|
---|
| 86 | Declare Function SHAppBarMessage Lib "shell32" (dwMessage As DWord, ByRef Data As APPBARDATA) As ULONG_PTR
|
---|
| 87 |
|
---|
| 88 | Const BIF_RETURNONLYFSDIRS = &H0001
|
---|
| 89 | Const BIF_DONTGOBELOWDOMAIN = &H0002
|
---|
| 90 | Const BIF_STATUSTEXT = &H0004
|
---|
| 91 | Const BIF_RETURNFSANCESTORS = &H0008
|
---|
| 92 | Const BIF_EDITBOX = &H0010
|
---|
| 93 | Const BIF_VALIDATE = &H0020
|
---|
| 94 | Const BIF_BROWSEFORCOMPUTER = &H1000
|
---|
| 95 | Const BIF_BROWSEFORPRINTER = &H2000
|
---|
| 96 | Const BIF_BROWSEINCLUDEFILES = &H4000
|
---|
| 97 |
|
---|
| 98 | Typedef BFFCALLBACK = *Function(hwnd As HWND, uMsg As DWord, lParam As LPARAM, lpData As LPARAM) As Long
|
---|
| 99 |
|
---|
| 100 | Type BROWSEINFO
|
---|
| 101 | hwndOwner As HWND
|
---|
| 102 | pidlRoot As VoidPtr
|
---|
| 103 | pszDisplayName As PSTR
|
---|
| 104 | lpszTitle As PCSTR
|
---|
| 105 | ulFlags As DWord
|
---|
| 106 | lpfn As BFFCALLBACK
|
---|
| 107 | lParam As LPARAM
|
---|
| 108 | iImage As Long
|
---|
| 109 | End Type
|
---|
| 110 |
|
---|
| 111 | Type SHITEMID
|
---|
| 112 | cb As Word
|
---|
| 113 | abID[ELM(1)] As Byte
|
---|
| 114 | End Type
|
---|
| 115 |
|
---|
| 116 | Type ITEMIDLIST
|
---|
| 117 | mkid As SHITEMID
|
---|
| 118 | End Type
|
---|
| 119 | Declare Function SHBrowseForFolder Lib "shell32" Alias "SHBrowseForFolderA" (ByRef lpbi As BROWSEINFO) As *ITEMIDLIST
|
---|
| 120 |
|
---|
| 121 | Const SHCNE_RENAMEITEM = &h00000001
|
---|
| 122 | Const SHCNE_CREATE = &h00000002
|
---|
| 123 | Const SHCNE_DELETE = &h00000004
|
---|
| 124 | Const SHCNE_MKDIR = &h00000008
|
---|
| 125 | Const SHCNE_RMDIR = &h00000010
|
---|
| 126 | Const SHCNE_MEDIAINSERTED = &h00000020
|
---|
| 127 | Const SHCNE_MEDIAREMOVED = &h00000040
|
---|
| 128 | Const SHCNE_DRIVEREMOVED = &h00000080
|
---|
| 129 | Const SHCNE_DRIVEADD = &h00000100
|
---|
| 130 | Const SHCNE_NETSHARE = &h00000200
|
---|
| 131 | Const SHCNE_NETUNSHARE = &h00000400
|
---|
| 132 | Const SHCNE_ATTRIBUTES = &h00000800
|
---|
| 133 | Const SHCNE_UPDATEDIR = &h00001000
|
---|
| 134 | Const SHCNE_UPDATEITEM = &h00002000
|
---|
| 135 | Const SHCNE_SERVERDISCONNECT = &h00004000
|
---|
| 136 | Const SHCNE_UPDATEIMAGE = &h00008000
|
---|
| 137 | Const SHCNE_DRIVEADDGUI = &h00010000
|
---|
| 138 | Const SHCNE_RENAMEFOLDER = &h00020000
|
---|
| 139 | Const SHCNE_FREESPACE = &h00040000
|
---|
| 140 |
|
---|
| 141 | #ifdef __UNDEFINED__ '#if _WIN32_IE >= 0x0400
|
---|
| 142 | Const SHCNE_EXTENDED_EVENT = &h04000000
|
---|
| 143 | #endif
|
---|
| 144 |
|
---|
| 145 | Const SHCNE_ASSOCCHANGED = &h08000000
|
---|
| 146 |
|
---|
| 147 | Const SHCNE_DISKEVENTS = &h0002381F
|
---|
| 148 | Const SHCNE_GLOBALEVENTS = &h0C0581E0
|
---|
| 149 | Const SHCNE_ALLEVENTS = &h7FFFFFFF
|
---|
| 150 | Const SHCNE_INTERRUPT = &h80000000
|
---|
| 151 |
|
---|
| 152 | #ifdef __UNDEFINED__ '#if _WIN32_IE >= 0x0400
|
---|
| 153 | Const SHCNEE_ORDERCHANGED = 2
|
---|
| 154 | Const SHCNEE_MSI_CHANGE = 4
|
---|
| 155 | Const SHCNEE_MSI_UNINSTALL = 5
|
---|
| 156 | #endif
|
---|
| 157 |
|
---|
| 158 | Const SHCNF_IDLIST = &h0000
|
---|
| 159 | Const SHCNF_PATHA = &h0001
|
---|
| 160 | Const SHCNF_PRINTERA = &h0002
|
---|
| 161 | Const SHCNF_DWORD = &h0003
|
---|
| 162 | Const SHCNF_PATHW = &h0005
|
---|
| 163 | Const SHCNF_PRINTERW = &h0006
|
---|
| 164 | Const SHCNF_TYPE = &h00FF
|
---|
| 165 | Const SHCNF_FLUSH = &h1000
|
---|
| 166 | Const SHCNF_FLUSHNOWAIT = &h2000
|
---|
| 167 |
|
---|
| 168 | #ifdef UNICODE
|
---|
| 169 | Const SHCNF_PATH = SHCNF_PATHW
|
---|
| 170 | Const SHCNF_PRINTER = SHCNF_PRINTERW
|
---|
| 171 | #else
|
---|
| 172 | Const SHCNF_PATH = SHCNF_PATHA
|
---|
| 173 | Const SHCNF_PRINTER = SHCNF_PRINTERA
|
---|
| 174 | #endif
|
---|
| 175 |
|
---|
| 176 | ' ShlObj.h
|
---|
| 177 | Declare Sub SHChangeNotify Lib "shell32" (wEventId As Long, uFlags As DWord, dwItem1 As VoidPtr, dwItem2 As VoidPtr)
|
---|
| 178 |
|
---|
| 179 | ' ShellApi.h
|
---|
| 180 | Declare Function ShellAbout Lib "shell32" Alias "ShellAboutA" (hWnd As HWND, szApp As PCSTR, szOtherStuff As PCSTR, hIcon As HICON) As Long
|
---|
| 181 |
|
---|
| 182 | Const SE_ERR_FNF = 2
|
---|
| 183 | Const SE_ERR_PNF = 3
|
---|
| 184 | Const SE_ERR_ACCESSDENIED = 5
|
---|
| 185 | Const SE_ERR_OOM = 8
|
---|
| 186 | Const SE_ERR_DLLNOTFOUND = 32
|
---|
| 187 | Const SE_ERR_SHARE = 26
|
---|
| 188 | Const SE_ERR_ASSOCINCOMPLETE = 27
|
---|
| 189 | Const SE_ERR_DDETIMEOUT = 28
|
---|
| 190 | Const SE_ERR_DDEFAIL = 29
|
---|
| 191 | Const SE_ERR_DDEBUSY = 30
|
---|
| 192 | Const SE_ERR_NOASSOC = 31
|
---|
| 193 | ' ShellApi.h
|
---|
| 194 | Declare Function ShellExecute Lib "shell32" Alias "ShellExecuteA" (hWnd As HWND, lpOperation As PCSTR, lpFile As PCSTR, lpParameters As PCSTR, lpDirectory As PCSTR, nShowCmd As Long) As HINSTANCE
|
---|
| 195 |
|
---|
| 196 | Const FO_MOVE = &H0001
|
---|
| 197 | Const FO_COPY = &H0002
|
---|
| 198 | Const FO_DELETE = &H0003
|
---|
| 199 | Const FO_RENAME = &H0004
|
---|
| 200 | Const FOF_MULTIDESTFILES = &H0001
|
---|
| 201 | Const FOF_CONFIRMMOUSE = &H0002
|
---|
| 202 | Const FOF_SILENT = &H0004
|
---|
| 203 | Const FOF_RENAMEONCOLLISION = &H0008
|
---|
| 204 | Const FOF_NOCONFIRMATION = &H0010
|
---|
| 205 | Const FOF_WANTMAPPINGHANDLE = &H0020
|
---|
| 206 | Const FOF_ALLOWUNDO = &H0040
|
---|
| 207 | Const FOF_FILESONLY = &H0080
|
---|
| 208 | Const FOF_SIMPLEPROGRESS = &H0100
|
---|
| 209 | Const FOF_NOCONFIRMMKDIR = &H0200
|
---|
| 210 | Const FOF_NOERRORUI = &H0400
|
---|
| 211 | Const FOF_NOCOPYSECURITYATTRIBS = &H0800
|
---|
| 212 | Type SHFILEOPSTRUCT
|
---|
| 213 | hWnd As HWND
|
---|
| 214 | wFunc As DWord
|
---|
| 215 | pFrom As PCSTR
|
---|
| 216 | pTo As PCSTR
|
---|
| 217 | fFlags As Word
|
---|
| 218 | fAnyOperationsAborted As BOOL
|
---|
| 219 | hNameMappings As VoidPtr
|
---|
| 220 | lpszProgressTitle As PCSTR
|
---|
| 221 | End Type
|
---|
| 222 | ' ShellApi.h
|
---|
| 223 | Declare Function SHFileOperation Lib "shell32" Alias "SHFileOperationA" (ByRef lpFileOp As SHFILEOPSTRUCT) As Long
|
---|
| 224 |
|
---|
| 225 | ' ShellApi.h
|
---|
| 226 | Declare Sub SHFreeNameMappings Lib "shell32" (hNameMappings As HANDLE)
|
---|
| 227 |
|
---|
| 228 | 'SHGetDataFromIDList
|
---|
| 229 |
|
---|
| 230 | Declare Function SHGetPathFromIDList Lib "shell32" Alias "SHGetPathFromIDListA" (pidl As *ITEMIDLIST, pszPath As PSTR) As Long
|
---|
| 231 |
|
---|
| 232 | #endif '_INC_SHELL
|
---|