source: Include/api_shell.sbp@ 1

Last change on this file since 1 was 1, checked in by (none), 17 years ago
File size: 7.5 KB
Line 
1' api_shell.sbp
2
3
4#ifndef _INC_SHELL
5#define _INC_SHELL
6
7
8'-----------
9' Shell API
10
11Declare Function DoEnvironmentSubst Lib "shell32" Alias "DoEnvironmentSubstA" (
12 pszString As PSTR,
13 cchString As DWord
14) As DWord
15
16Declare Sub DragAcceptFiles Lib "shell32" (hWnd As HWND, bAccept As BOOL)
17Declare Sub DragFinish Lib "shell32" (hDrop As HDROP)
18Declare Function DragQueryFile Lib "shell32" Alias "DragQueryFileA" (hDrop As HDROP, iFile As Long, lpszFile As PSTR, cch As DWord) As DWord
19Declare Function DragQueryPoint Lib "shell32" (hDrop As HDROP, ByRef lpPoint As POINTAPI) As Long
20Declare Function ExtractAssociatedIcon Lib "shell32" Alias "ExtractAssociatedIconA" (hInst As HINSTANCE, lpIconPath As PSTR, lpiIcon As *Word) As HICON
21Declare Function ExtractIcon Lib "shell32" Alias "ExtractIconA" (hInst As HINSTANCE, lpszExeFileName As PCSTR, nIconIndex As Long) As HICON
22Declare Function ExtractIconEx Lib "shell32" Alias "ExtractIconExA" (lpszFile As PCSTR, nIconIndex As Long, phiconLarge As *DWord, phiconSmall As *DWord, nIcons As Long) As HICON
23
24Const ERROR_FILE_NOT_FOUND = 2
25Const ERROR_PATH_NOT_FOUND = 3
26Const ERROR_BAD_FORMAT = 11
27Declare Function FindExecutable Lib "shell32" Alias "FindExecutableA" (
28 pFile As PCSTR,
29 pDirectory As PCSTR,
30 pResult As PCSTR
31) As Long
32
33Declare Function GUIDFromString Lib "shell32" Alias "GUIDFromStringA" (
34 ByVal psz As PCSTR,
35 ByRef guid As GUID
36) As BOOL
37
38' intshcut.h
39Declare Function InetIsOffline Lib "url" (dwFlags As DWord) As BOOL
40' intshcut.h
41Declare Function MIMEAssociationDialog Lib "url" (
42 hwndParent As HWND,
43 dwInFlags As DWord,
44 pcszFile As PCSTR,
45 pcszMIMEContentType As PCSTR,
46 pszAppBuf As PSTR,
47 ucAppBufLen As DWord
48) As HRESULT
49
50Declare Sub SHAddToRecentDocs Lib "shell32" (ByVal uFlags As Long, ByVal pv As VoidPtr)
51
52Const ABM_NEW = &h00000000
53Const ABM_REMOVE = &h00000001
54Const ABM_QUERYPOS = &h00000002
55Const ABM_SETPOS = &h00000003
56Const ABM_GETSTATE = &h00000004
57Const ABM_GETTASKBARPOS = &h00000005
58Const ABM_ACTIVATE = &h00000006
59Const ABM_GETAUTOHIDEBAR = &h00000007
60Const ABM_SETAUTOHIDEBAR = &h00000008
61Const ABM_WINDOWPOSCHANGED = &h0000009
62Const ABM_SETSTATE = &h0000000a
63
64Const ABN_STATECHANGE = &h0000000
65Const ABN_POSCHANGED = &h0000001
66Const ABN_FULLSCREENAPP = &h0000002
67Const ABN_WINDOWARRANGE = &h0000003
68
69Const ABS_AUTOHIDE = &h0000001
70Const ABS_ALWAYSONTOP = &h0000002
71
72Const ABE_LEFT = 0
73Const ABE_TOP = 1
74Const ABE_RIGHT = 2
75Const ABE_BOTTOM = 3
76
77Type APPBARDATA
78 cbSize As DWord
79 hWnd As HWND
80 uCallbackMessage As DWord
81 uEdge As DWord
82 rc As RECT
83 lParam As LPARAM
84End Type
85
86Declare Function SHAppBarMessage Lib "shell32" (dwMessage As DWord, ByRef Data As APPBARDATA) As ULONG_PTR
87
88Const BIF_RETURNONLYFSDIRS = &H0001
89Const BIF_DONTGOBELOWDOMAIN = &H0002
90Const BIF_STATUSTEXT = &H0004
91Const BIF_RETURNFSANCESTORS = &H0008
92Const BIF_EDITBOX = &H0010
93Const BIF_VALIDATE = &H0020
94Const BIF_BROWSEFORCOMPUTER = &H1000
95Const BIF_BROWSEFORPRINTER = &H2000
96Const BIF_BROWSEINCLUDEFILES = &H4000
97
98Typedef BFFCALLBACK = *Function(hwnd As HWND, uMsg As DWord, lParam As LPARAM, lpData As LPARAM) As Long
99
100Type BROWSEINFO
101 hwndOwner As HWND
102 pidlRoot As VoidPtr
103 pszDisplayName As PSTR
104 lpszTitle As PCSTR
105 ulFlags As DWord
106 lpfn As BFFCALLBACK
107 lParam As LPARAM
108 iImage As Long
109End Type
110
111Type SHITEMID
112 cb As Word
113 abID[ELM(1)] As Byte
114End Type
115
116Type ITEMIDLIST
117 mkid As SHITEMID
118End Type
119Declare Function SHBrowseForFolder Lib "shell32" Alias "SHBrowseForFolderA" (ByRef lpbi As BROWSEINFO) As *ITEMIDLIST
120
121Const SHCNE_RENAMEITEM = &h00000001
122Const SHCNE_CREATE = &h00000002
123Const SHCNE_DELETE = &h00000004
124Const SHCNE_MKDIR = &h00000008
125Const SHCNE_RMDIR = &h00000010
126Const SHCNE_MEDIAINSERTED = &h00000020
127Const SHCNE_MEDIAREMOVED = &h00000040
128Const SHCNE_DRIVEREMOVED = &h00000080
129Const SHCNE_DRIVEADD = &h00000100
130Const SHCNE_NETSHARE = &h00000200
131Const SHCNE_NETUNSHARE = &h00000400
132Const SHCNE_ATTRIBUTES = &h00000800
133Const SHCNE_UPDATEDIR = &h00001000
134Const SHCNE_UPDATEITEM = &h00002000
135Const SHCNE_SERVERDISCONNECT = &h00004000
136Const SHCNE_UPDATEIMAGE = &h00008000
137Const SHCNE_DRIVEADDGUI = &h00010000
138Const SHCNE_RENAMEFOLDER = &h00020000
139Const SHCNE_FREESPACE = &h00040000
140
141#ifdef __UNDEFINED__ '#if _WIN32_IE >= 0x0400
142Const SHCNE_EXTENDED_EVENT = &h04000000
143#endif
144
145Const SHCNE_ASSOCCHANGED = &h08000000
146
147Const SHCNE_DISKEVENTS = &h0002381F
148Const SHCNE_GLOBALEVENTS = &h0C0581E0
149Const SHCNE_ALLEVENTS = &h7FFFFFFF
150Const SHCNE_INTERRUPT = &h80000000
151
152#ifdef __UNDEFINED__ '#if _WIN32_IE >= 0x0400
153Const SHCNEE_ORDERCHANGED = 2
154Const SHCNEE_MSI_CHANGE = 4
155Const SHCNEE_MSI_UNINSTALL = 5
156#endif
157
158Const SHCNF_IDLIST = &h0000
159Const SHCNF_PATHA = &h0001
160Const SHCNF_PRINTERA = &h0002
161Const SHCNF_DWORD = &h0003
162Const SHCNF_PATHW = &h0005
163Const SHCNF_PRINTERW = &h0006
164Const SHCNF_TYPE = &h00FF
165Const SHCNF_FLUSH = &h1000
166Const SHCNF_FLUSHNOWAIT = &h2000
167
168#ifdef UNICODE
169Const SHCNF_PATH = SHCNF_PATHW
170Const SHCNF_PRINTER = SHCNF_PRINTERW
171#else
172Const SHCNF_PATH = SHCNF_PATHA
173Const SHCNF_PRINTER = SHCNF_PRINTERA
174#endif
175
176' ShlObj.h
177Declare Sub SHChangeNotify Lib "shell32" (wEventId As Long, uFlags As DWord, dwItem1 As VoidPtr, dwItem2 As VoidPtr)
178
179' ShellApi.h
180Declare Function ShellAbout Lib "shell32" Alias "ShellAboutA" (hWnd As HWND, szApp As PCSTR, szOtherStuff As PCSTR, hIcon As HICON) As Long
181
182Const SE_ERR_FNF = 2
183Const SE_ERR_PNF = 3
184Const SE_ERR_ACCESSDENIED = 5
185Const SE_ERR_OOM = 8
186Const SE_ERR_DLLNOTFOUND = 32
187Const SE_ERR_SHARE = 26
188Const SE_ERR_ASSOCINCOMPLETE = 27
189Const SE_ERR_DDETIMEOUT = 28
190Const SE_ERR_DDEFAIL = 29
191Const SE_ERR_DDEBUSY = 30
192Const SE_ERR_NOASSOC = 31
193' ShellApi.h
194Declare Function ShellExecute Lib "shell32" Alias "ShellExecuteA" (hWnd As HWND, lpOperation As PCSTR, lpFile As PCSTR, lpParameters As PCSTR, lpDirectory As PCSTR, nShowCmd As Long) As HINSTANCE
195
196Const FO_MOVE = &H0001
197Const FO_COPY = &H0002
198Const FO_DELETE = &H0003
199Const FO_RENAME = &H0004
200Const FOF_MULTIDESTFILES = &H0001
201Const FOF_CONFIRMMOUSE = &H0002
202Const FOF_SILENT = &H0004
203Const FOF_RENAMEONCOLLISION = &H0008
204Const FOF_NOCONFIRMATION = &H0010
205Const FOF_WANTMAPPINGHANDLE = &H0020
206Const FOF_ALLOWUNDO = &H0040
207Const FOF_FILESONLY = &H0080
208Const FOF_SIMPLEPROGRESS = &H0100
209Const FOF_NOCONFIRMMKDIR = &H0200
210Const FOF_NOERRORUI = &H0400
211Const FOF_NOCOPYSECURITYATTRIBS = &H0800
212Type SHFILEOPSTRUCT
213 hWnd As HWND
214 wFunc As DWord
215 pFrom As PCSTR
216 pTo As PCSTR
217 fFlags As Word
218 fAnyOperationsAborted As BOOL
219 hNameMappings As VoidPtr
220 lpszProgressTitle As PCSTR
221End Type
222' ShellApi.h
223Declare Function SHFileOperation Lib "shell32" Alias "SHFileOperationA" (ByRef lpFileOp As SHFILEOPSTRUCT) As Long
224
225' ShellApi.h
226Declare Sub SHFreeNameMappings Lib "shell32" (hNameMappings As HANDLE)
227
228'SHGetDataFromIDList
229
230Declare Function SHGetPathFromIDList Lib "shell32" Alias "SHGetPathFromIDListA" (pidl As *ITEMIDLIST, pszPath As PSTR) As Long
231
232#endif '_INC_SHELL
Note: See TracBrowser for help on using the repository browser.