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