source: trunk/ab5.0/ablib/src/api_shell.sbp @ 560

Last change on this file since 560 was 521, checked in by イグトランス (egtra), 15 years ago

表記揺れ、ミスなど修正

File size: 22.3 KB
Line 
1' api_shell.sbp
2
3#ifdef UNICODE
4Const _FuncName_DoEnvironmentSubst = "DoEnvironmentSubstW"
5Const _FuncName_DragQueryFile = "DragQueryFileW"
6Const _FuncName_ExtractAssociatedIcon = "ExtractAssociatedIconW"
7Const _FuncName_ExtractIcon = "ExtractIconW"
8Const _FuncName_ExtractIconEx = "ExtractIconExW"
9Const _FuncName_FindExecutable = "FindExecutableW"
10Const _FuncName_GUIDFromString = "GUIDFromStringW"
11Const _FuncName_SHBrowseForFolder = "SHBrowseForFolderW"
12Const _FuncName_ShellAbout = "ShellAboutW"
13Const _FuncName_ShellExecute = "ShellExecuteW"
14Const _FuncName_ShellExecuteEx = "ShellExecuteExW"
15Const _FuncName_Shell_NotifyIcon = "NotifyIconW"
16Const _FuncName_SHEmptyRecycleBin = "SHEmptyRecycleBinW"
17Const _FuncName_SHFileOperation = "SHFileOperationW"
18Const _FuncName_SHGetFileInfo = "SHGetFileInfoW"
19Const _FuncName_SHGetPathFromIDList = "SHGetPathFromIDListW"
20Const _FuncName_SHGetSpecialFolderPath = "SHGetSpecialFolderPathW"
21#else
22Const _FuncName_DoEnvironmentSubst = "DoEnvironmentSubstA"
23Const _FuncName_DragQueryFile = "DragQueryFileA"
24Const _FuncName_ExtractAssociatedIcon = "ExtractAssociatedIconA"
25Const _FuncName_ExtractIcon = "ExtractIconA"
26Const _FuncName_ExtractIconEx = "ExtractIconExA"
27Const _FuncName_FindExecutable = "FindExecutableA"
28Const _FuncName_GUIDFromString = "GUIDFromStringA"
29Const _FuncName_SHBrowseForFolder = "SHBrowseForFolderA"
30Const _FuncName_ShellAbout = "ShellAboutA"
31Const _FuncName_ShellExecute = "ShellExecuteA"
32Const _FuncName_ShellExecuteEx = "ShellExecuteExA"
33Const _FuncName_Shell_NotifyIcon = "Shell_NotifyIconA"
34Const _FuncName_SHEmptyRecycleBin = "SHEmptyRecycleBinA"
35Const _FuncName_SHFileOperation = "SHFileOperationA"
36Const _FuncName_SHGetFileInfo = "SHGetFileInfoA"
37Const _FuncName_SHGetPathFromIDList = "SHGetPathFromIDListA"
38Const _FuncName_SHGetSpecialFolderPath = "SHGetSpecialFolderPathA"
39#endif
40
41Type _System_DeclareHandle_HDROP:unused As DWord:End Type
42TypeDef HDROP     = *_System_DeclareHandle_HDROP
43
44Interface IEnumIDList
45    Inherits IUnknown
46End Interface
47
48'-----------
49' Shell API
50
51' shellapi.h
52Declare Function DoEnvironmentSubst Lib "shell32" Alias _FuncName_DoEnvironmentSubst (
53    pszString As PTSTR,
54    cchString As DWord
55) As DWord
56
57' shellapi.h
58Declare Sub DragAcceptFiles Lib "shell32" (hWnd As HWND, bAccept As BOOL)
59Declare Sub DragFinish Lib "shell32" (hDrop As HDROP)
60Declare Function DragQueryFile Lib "shell32" Alias _FuncName_DragQueryFile (hDrop As HDROP, iFile As Long, lpszFile As LPTSTR, cch As DWord) As DWord
61Declare Function DragQueryPoint Lib "shell32" (hDrop As HDROP, ByRef lpPoint As POINTAPI) As Long
62Declare Function ExtractAssociatedIcon Lib "shell32" Alias _FuncName_ExtractAssociatedIcon (hInst As HINSTANCE, lpIconPath As LPTSTR, lpiIcon As *Word) As HICON
63' Shellapi.h
64Declare Function ExtractIcon Lib "shell32" Alias _FuncName_ExtractIcon (hInst As HINSTANCE, lpszExeFileName As LPCTSTR, nIconIndex As Long) As HICON
65Declare 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
68Declare Function FindExecutable Lib "shell32" Alias _FuncName_FindExecutable (
69    lpFile As LPCTSTR,
70    lpDirectory As LPCTSTR,
71    lpResult As LPCTSTR
72) As Long
73
74Declare Function GUIDFromString Lib "shell32" Alias _FuncName_GUIDFromString (
75    ByVal psz As PCTSTR,
76    ByRef guid As GUID
77) As BOOL
78
79' intshcut.h
80Declare Function InetIsOffline Lib "url" (dwFlags As DWord) As BOOL
81' intshcut.h
82Declare 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
92Declare Sub SHAddToRecentDocs Lib "shell32" (ByVal uFlags As Long, ByVal pv As VoidPtr)
93
94Const ABM_NEW = &h00000000
95Const ABM_REMOVE = &h00000001
96Const ABM_QUERYPOS = &h00000002
97Const ABM_SETPOS = &h00000003
98Const ABM_GETSTATE = &h00000004
99Const ABM_GETTASKBARPOS = &h00000005
100Const ABM_ACTIVATE = &h00000006
101Const ABM_GETAUTOHIDEBAR = &h00000007
102Const ABM_SETAUTOHIDEBAR = &h00000008
103Const ABM_WINDOWPOSCHANGED = &h0000009
104Const ABM_SETSTATE = &h0000000a
105
106Const ABN_STATECHANGE = &h0000000
107Const ABN_POSCHANGED = &h0000001
108Const ABN_FULLSCREENAPP = &h0000002
109Const ABN_WINDOWARRANGE = &h0000003
110
111Const ABS_AUTOHIDE = &h0000001
112Const ABS_ALWAYSONTOP = &h0000002
113
114Const ABE_LEFT = 0
115Const ABE_TOP = 1
116Const ABE_RIGHT = 2
117Const ABE_BOTTOM = 3
118
119Type 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
126End Type
127
128' shellapi.h
129Declare Function SHAppBarMessage Lib "shell32" (dwMessage As DWord, ByRef Data As APPBARDATA) As ULONG_PTR
130
131Const BIF_RETURNONLYFSDIRS =   &H0001
132Const BIF_DONTGOBELOWDOMAIN =  &H0002
133Const BIF_STATUSTEXT =         &H0004
134Const BIF_RETURNFSANCESTORS =  &H0008
135Const BIF_EDITBOX =            &H0010
136Const BIF_VALIDATE =           &H0020
137Const BIF_BROWSEFORCOMPUTER =  &H1000
138Const BIF_BROWSEFORPRINTER =   &H2000
139Const BIF_BROWSEINCLUDEFILES = &H4000
140
141Typedef BFFCALLBACK = *Function(hwnd As HWND, uMsg As DWord, lParam As LPARAM, lpData As LPARAM) As Long
142
143Type 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
152End Type
153Type 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
162End Type
163#ifdef UNICODE
164TypeDef BROWSEINFO = BROWSEINFOW
165#else
166TypeDef BROWSEINFO = BROWSEINFOA
167#endif
168
169Type SHITEMID 'shtypes.h
170    cb As Word
171    abID[ELM(1)] As Byte
172End Type
173
174Type ITEMIDLIST 'shtypes.h
175    mkid As SHITEMID
176End Type
177
178typedef LPITEMIDLIST = /*__unaligned*/ *ITEMIDLIST
179typedef LPCITEMIDLIST = /*__unaligned const*/ *ITEMIDLIST
180
181'shlobj.h
182Declare Function SHBrowseForFolder Lib "shell32" Alias _FuncName_SHBrowseForFolder (ByRef bi As BROWSEINFO) As *ITEMIDLIST
183
184Const SHCNE_RENAMEITEM          = &h00000001
185Const SHCNE_CREATE              = &h00000002
186Const SHCNE_DELETE              = &h00000004
187Const SHCNE_MKDIR               = &h00000008
188Const SHCNE_RMDIR               = &h00000010
189Const SHCNE_MEDIAINSERTED       = &h00000020
190Const SHCNE_MEDIAREMOVED        = &h00000040
191Const SHCNE_DRIVEREMOVED        = &h00000080
192Const SHCNE_DRIVEADD            = &h00000100
193Const SHCNE_NETSHARE            = &h00000200
194Const SHCNE_NETUNSHARE          = &h00000400
195Const SHCNE_ATTRIBUTES          = &h00000800
196Const SHCNE_UPDATEDIR           = &h00001000
197Const SHCNE_UPDATEITEM          = &h00002000
198Const SHCNE_SERVERDISCONNECT    = &h00004000
199Const SHCNE_UPDATEIMAGE         = &h00008000
200Const SHCNE_DRIVEADDGUI         = &h00010000
201Const SHCNE_RENAMEFOLDER        = &h00020000
202Const SHCNE_FREESPACE           = &h00040000
203
204#ifdef __UNDEFINED__ '#if _WIN32_IE >= 0x0400
205Const SHCNE_EXTENDED_EVENT      = &h04000000
206#endif
207
208Const SHCNE_ASSOCCHANGED        = &h08000000
209
210Const SHCNE_DISKEVENTS          = &h0002381F
211Const SHCNE_GLOBALEVENTS        = &h0C0581E0
212Const SHCNE_ALLEVENTS           = &h7FFFFFFF
213Const SHCNE_INTERRUPT           = &h80000000
214
215#ifdef __UNDEFINED__ '#if _WIN32_IE >= 0x0400
216Const SHCNEE_ORDERCHANGED = 2
217Const SHCNEE_MSI_CHANGE = 4
218Const SHCNEE_MSI_UNINSTALL = 5
219#endif
220
221Const SHCNF_IDLIST      = &h0000
222Const SHCNF_PATHA       = &h0001
223Const SHCNF_PRINTERA    = &h0002
224Const SHCNF_DWORD       = &h0003
225Const SHCNF_PATHW       = &h0005
226Const SHCNF_PRINTERW    = &h0006
227Const SHCNF_TYPE        = &h00FF
228Const SHCNF_FLUSH       = &h1000
229Const SHCNF_FLUSHNOWAIT = &h2000
230
231#ifdef UNICODE
232Const SHCNF_PATH     = SHCNF_PATHW
233Const SHCNF_PRINTER  = SHCNF_PRINTERW
234#else
235Const SHCNF_PATH     = SHCNF_PATHA
236Const SHCNF_PRINTER  = SHCNF_PRINTERA
237#endif
238
239' ShlObj.h
240Declare Sub SHChangeNotify Lib "shell32" (wEventId As Long, uFlags As DWord, dwItem1 As VoidPtr, dwItem2 As VoidPtr)
241
242' ShellApi.h
243Declare Function ShellAbout Lib "shell32" Alias _FuncName_ShellAbout (hWnd As HWND, szApp As PCTSTR, szOtherStuff As PCTSTR, hIcon As HICON) As Long
244
245Const SE_ERR_FNF =             2
246Const SE_ERR_PNF =             3
247Const SE_ERR_ACCESSDENIED =    5
248Const SE_ERR_OOM =             8
249Const SE_ERR_DLLNOTFOUND =     32
250Const SE_ERR_SHARE =           26
251Const SE_ERR_ASSOCINCOMPLETE = 27
252Const SE_ERR_DDETIMEOUT =      28
253Const SE_ERR_DDEFAIL =         29
254Const SE_ERR_DDEBUSY =         30
255Const SE_ERR_NOASSOC =         31
256' ShellApi.h
257Declare 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
259Const SEE_MASK_CLASSNAME      = &H0001
260Const SEE_MASK_CLASSKEY       = &H0003
261Const SEE_MASK_IDLIST         = &H0004
262Const SEE_MASK_INVOKEIDLIST   = &H000C
263Const SEE_MASK_ICON           = &H0010
264Const SEE_MASK_HOTKEY         = &H0020
265Const SEE_MASK_NOCLOSEPROCESS = &H0040
266Const SEE_MASK_CONNECTNETDRV  = &H0080
267Const SEE_MASK_FLAG_DDEWAIT   = &H0100
268Const SEE_MASK_DOENVSUBST     = &H0200
269Const SEE_MASK_FLAG_NO_UI     = &H0400
270
271Type 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
287End Type
288Type 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
304End Type
305#ifdef UNICODE
306TypeDef SHELLEXECUTEINFO = SHELLEXECUTEINFOW
307#else
308TypeDef SHELLEXECUTEINFO = SHELLEXECUTEINFOA
309#endif
310TypeDef LPSHELLEXECUTEINFO = *SHELLEXECUTEINFO
311Declare Function ShellExecuteEx Lib "shell32" Alias _FuncName_ShellExecuteEx (ByRef ExecInfo As SHELLEXECUTEINFO) As BOOL
312
313Const FO_MOVE =   &H0001
314Const FO_COPY =   &H0002
315Const FO_DELETE = &H0003
316Const FO_RENAME = &H0004
317Const FOF_MULTIDESTFILES =        &H0001
318Const FOF_CONFIRMMOUSE =          &H0002
319Const FOF_SILENT =                &H0004
320Const FOF_RENAMEONCOLLISION =     &H0008
321Const FOF_NOCONFIRMATION =        &H0010
322Const FOF_WANTMAPPINGHANDLE =     &H0020
323Const FOF_ALLOWUNDO =             &H0040
324Const FOF_FILESONLY =             &H0080
325Const FOF_SIMPLEPROGRESS =        &H0100
326Const FOF_NOCONFIRMMKDIR =        &H0200
327Const FOF_NOERRORUI =             &H0400
328Const FOF_NOCOPYSECURITYATTRIBS = &H0800
329Type 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
338End Type
339Type 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
348End Type
349#ifdef UNICODE
350TypeDef SHFILEOPSTRUCT = SHFILEOPSTRUCTW
351#else
352TypeDef SHFILEOPSTRUCT = SHFILEOPSTRUCTA
353#endif
354
355' ShellApi.h
356Declare Function SHFileOperation Lib "shell32" Alias _FuncName_SHFileOperation (ByRef FileOp As SHFILEOPSTRUCT) As Long
357
358' ShellApi.h
359Declare Sub SHFreeNameMappings Lib "shell32" (hNameMappings As HANDLE)
360
361'SHGetDataFromIDList
362
363'shlobj.h
364Declare Function SHGetDesktopFolder Lib "shell32" (ByRef pshf As *IShellFolder) As HRESULT
365
366Declare Function SHGetPathFromIDList Lib "shell32" Alias _FuncName_SHGetPathFromIDList (pidl As *ITEMIDLIST, pszPath As PTSTR) As Long
367
368' ShellApi.h
369Declare 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
374Declare 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
377Declare Function SHGetInstanceExplorer Lib "shell32" (ByRef ppunk As *IUnknown) As HRESULT
378
379'shlobj.h
380Declare 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
386Const CSIDL_DESKTOP = &h0000
387Const CSIDL_INTERNET = &h0001
388Const CSIDL_PROGRAMS = &h0002
389Const CSIDL_CONTROLS = &h0003
390Const CSIDL_PRINTERS = &h0004
391Const CSIDL_PERSONAL = &h0005
392Const CSIDL_FAVORITES = &h0006
393Const CSIDL_STARTUP = &h0007
394Const CSIDL_RECENT = &h0008
395Const CSIDL_SENDTO = &h0009
396Const CSIDL_BITBUCKET = &h000a
397Const CSIDL_STARTMENU = &h000b
398Const CSIDL_MYMUSIC = &h000d
399Const CSIDL_DESKTOPDIRECTORY = &h0010
400Const CSIDL_DRIVES = &h0011
401Const CSIDL_NETWORK = &h0012
402Const CSIDL_NETHOOD = &h0013
403Const CSIDL_FONTS = &h0014
404Const CSIDL_TEMPLATES = &h0015
405Const CSIDL_COMMON_STARTMENU = &h0016
406Const CSIDL_COMMON_PROGRAMS = &h0017
407Const CSIDL_COMMON_STARTUP = &h0018
408Const CSIDL_COMMON_DESKTOPDIRECTORY = &h0019
409Const CSIDL_APPDATA = &h001a
410Const CSIDL_PRINTHOOD = &h001b
411Const CSIDL_LOCAL_APPDATA = &h001c
412Const CSIDL_ALTSTARTUP = &h001d
413Const CSIDL_COMMON_ALTSTARTUP = &h001e
414Const CSIDL_COMMON_FAVORITES = &h001f
415Const CSIDL_INTERNET_CACHE = &h0020
416Const CSIDL_COOKIES = &h0021
417Const CSIDL_HISTORY = &h0022
418Const CSIDL_COMMON_APPDATA = &h0023
419Const CSIDL_WINDOWS = &h0024
420Const CSIDL_SYSTEM = &h0025
421Const CSIDL_PROGRAM_FILES = &h0026
422Const CSIDL_MYPICTURES = &h0027
423Const CSIDL_PROFILE = &h0028
424Const CSIDL_PROGRAM_FILES_COMMON = &h002b
425Const CSIDL_COMMON_TEMPLATES = &h002d
426Const CSIDL_COMMON_DOCUMENTS = &h002e
427Const CSIDL_COMMON_ADMINTOOLS = &h002f
428Const CSIDL_ADMINTOOLS = &h0030
429
430Const SHGFI_ICON              = &H000000100
431Const SHGFI_DISPLAYNAME       = &H000000200
432Const SHGFI_TYPENAME          = &H000000400
433Const SHGFI_ATTRIBUTES        = &H000000800
434Const SHGFI_ICONLOCATION      = &H000001000
435Const SHGFI_EXETYPE           = &H000002000
436Const SHGFI_SYSICONINDEX      = &H000004000
437Const SHGFI_LINKOVERLAY       = &H000008000
438Const SHGFI_SELECTED          = &H000010000
439Const SHGFI_ATTR_SPECIFIED    = &H000020000
440Const SHGFI_LARGEICON         = &H000000000
441Const SHGFI_SMALLICON         = &H000000001
442Const SHGFI_OPENICON          = &H000000002
443Const SHGFI_SHELLICONSIZE     = &H000000004
444Const SHGFI_PIDL              = &H000000008
445Const SHGFI_USEFILEATTRIBUTES = &H000000010
446Const SHGFI_ADDOVERLAYS       = &H000000020
447Const SHGFI_OVERLAYINDEX      = &H000000040
448
449' ShellApi.h
450Type 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
456End Type
457
458' shellapi.h
459Declare 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
461Type 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
479End Type
480Type 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
498End Type
499#ifdef UNICODE
500TypeDef NOTIFYICONDATA = NOTIFYICONDATAW
501#else
502TypeDef NOTIFYICONDATA = NOTIFYICONDATAA
503#endif
504Declare Function Shell_NotifyIcon Lib "shell32" Alias _FuncName_Shell_NotifyIcon (dwMessage As DWORD, ByRef data As NOTIFYICONDATA) As BOOL
505
506Type 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
513End Type
514
515' shobjidl.h
516Enum SLGP_FLAGS
517    SLGP_SHORTPATH = &h1
518    SLGP_UNCPRIORITY = &h2
519    SLGP_RAWPATH = &h4
520    SLGP_RELATIVEPRIORITY = &h8
521End Enum
522
523Interface 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
573End Interface
574
575Interface 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
625End Interface
626
627#ifdef UNICODE
628TypeDef IShellLink = IShellLinkW
629#else
630TypeDef IShellLink = IShellLinkA
631#endif
632
633Enum 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
641End Enum
642
643Enum SHGNO
644    SHGDN_NORMAL = &h0000
645    SHGDN_INFOLDER = &h0001
646    SHGDN_FOREDITING = &h1000
647    SHGDN_FORADDRESSBAR = &h4000
648    SHGDN_FORPARSING = &h8000
649End Enum
650
651TypeDef SHCONTF = DWord
652TypeDef SFGAOF = DWord
653TypeDef SHGDNF = DWord
654
655Dim IID_IShellFolder = [&h000214E6, 0, 0, [&hC0, 0, 0, 0, 0, 0, 0, &h46]] As IID
656Interface 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
709End Interface
Note: See TracBrowser for help on using the repository browser.