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