source: Include/api_shell.sbp@ 153

Last change on this file since 153 was 141, checked in by イグトランス (egtra), 18 years ago

#50 API宣言の変更完了

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