source: trunk/Include/api_shell.sbp@ 343

Last change on this file since 343 was 300, checked in by dai, 17 years ago

trunkディレクトリを作成。bin、Include、TestCaseをtrunkに移動した。
標準ライブラリのビルドバッチを追加。

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