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