1 | #ifndef _SHELLAPI_H
|
---|
2 | #define _SHELLAPI_H
|
---|
3 | #if __GNUC__ >= 3
|
---|
4 | #pragma GCC system_header
|
---|
5 | #endif
|
---|
6 |
|
---|
7 | #ifdef __cplusplus
|
---|
8 | extern "C" {
|
---|
9 | #endif
|
---|
10 | #define WINSHELLAPI DECLSPEC_IMPORT
|
---|
11 | #define ABE_LEFT 0
|
---|
12 | #define ABE_TOP 1
|
---|
13 | #define ABE_RIGHT 2
|
---|
14 | #define ABE_BOTTOM 3
|
---|
15 | #define ABS_AUTOHIDE 1
|
---|
16 | #define ABS_ALWAYSONTOP 2
|
---|
17 | #define SEE_MASK_CLASSNAME 0x1
|
---|
18 | #define SEE_MASK_CLASSKEY 0x3
|
---|
19 | #define SEE_MASK_IDLIST 0x4
|
---|
20 | #define SEE_MASK_INVOKEIDLIST 0xc
|
---|
21 | #define SEE_MASK_ICON 0x10
|
---|
22 | #define SEE_MASK_HOTKEY 0x20
|
---|
23 | #define SEE_MASK_NOCLOSEPROCESS 0x40
|
---|
24 | #define SEE_MASK_CONNECTNETDRV 0x80
|
---|
25 | #define SEE_MASK_FLAG_DDEWAIT 0x100
|
---|
26 | #define SEE_MASK_DOENVSUBST 0x200
|
---|
27 | #define SEE_MASK_FLAG_NO_UI 0x400
|
---|
28 | #define SEE_MASK_NO_CONSOLE 0x8000
|
---|
29 | #define SEE_MASK_UNICODE 0x10000
|
---|
30 | #define SEE_MASK_ASYNCOK 0x100000
|
---|
31 | #define SEE_MASK_HMONITOR 0x200000
|
---|
32 | #if (_WIN32_IE >= 0x0600)
|
---|
33 | #define SEE_MASK_NOZONECHECKS 0x800000
|
---|
34 | #define SEE_MASK_FLAG_LOG_USAGE 0x4000000
|
---|
35 | #endif
|
---|
36 | #define ABM_NEW 0
|
---|
37 | #define ABM_REMOVE 1
|
---|
38 | #define ABM_QUERYPOS 2
|
---|
39 | #define ABM_SETPOS 3
|
---|
40 | #define ABM_GETSTATE 4
|
---|
41 | #define ABM_GETTASKBARPOS 5
|
---|
42 | #define ABM_ACTIVATE 6
|
---|
43 | #define ABM_GETAUTOHIDEBAR 7
|
---|
44 | #define ABM_SETAUTOHIDEBAR 8
|
---|
45 | #define ABM_WINDOWPOSCHANGED 9
|
---|
46 | #define ABN_STATECHANGE 0
|
---|
47 | #define ABN_POSCHANGED 1
|
---|
48 | #define ABN_FULLSCREENAPP 2
|
---|
49 | #define ABN_WINDOWARRANGE 3
|
---|
50 | #define NIM_ADD 0
|
---|
51 | #define NIM_MODIFY 1
|
---|
52 | #define NIM_DELETE 2
|
---|
53 | #if (_WIN32_IE >= 0x0500)
|
---|
54 | #define NOTIFYICON_VERSION 3
|
---|
55 | #if (_WIN32_WINNT >= 0x600)
|
---|
56 | #define NOTIFYICON_VERSION_4 4
|
---|
57 | #endif
|
---|
58 | #define NIM_SETFOCUS 3
|
---|
59 | #define NIM_SETVERSION 4
|
---|
60 | #define NIN_POPUPOPEN WM_USER+6
|
---|
61 | #define NIN_POPUPCLOSE WM_USER+7
|
---|
62 | #endif
|
---|
63 | #define NIF_MESSAGE 0x00000001
|
---|
64 | #define NIF_ICON 0x00000002
|
---|
65 | #define NIF_TIP 0x00000004
|
---|
66 | #define NIF_STATE 0x00000008
|
---|
67 | #if (_WIN32_IE >= 0x0500)
|
---|
68 | #define NIF_INFO 0x00000010
|
---|
69 | #endif
|
---|
70 | #if (_WIN32_IE >= 0x0600)
|
---|
71 | #define NIF_GUID 0x00000020
|
---|
72 | #endif
|
---|
73 | #if (_WIN32_IE >= 0x0500)
|
---|
74 | #define NIIF_NONE 0x00000000
|
---|
75 | #define NIIF_INFO 0x00000001
|
---|
76 | #define NIIF_WARNING 0x00000002
|
---|
77 | #define NIIF_ERROR 0x00000003
|
---|
78 | #endif
|
---|
79 | #if (_WIN32_IE >= 0x0600)
|
---|
80 | #define NIIF_ICON_MASK 0x0000000F
|
---|
81 | #define NIIF_NOSOUND 0x00000010
|
---|
82 | #endif
|
---|
83 | #if (_WIN32_IE >= 0x0500)
|
---|
84 | #define NIS_HIDDEN 0x00000001
|
---|
85 | #define NIS_SHAREDICON 0x00000002
|
---|
86 | #endif
|
---|
87 | #define SE_ERR_FNF 2
|
---|
88 | #define SE_ERR_PNF 3
|
---|
89 | #define SE_ERR_ACCESSDENIED 5
|
---|
90 | #define SE_ERR_OOM 8
|
---|
91 | #define SE_ERR_DLLNOTFOUND 32
|
---|
92 | #define SE_ERR_SHARE 26
|
---|
93 | #define SE_ERR_ASSOCINCOMPLETE 27
|
---|
94 | #define SE_ERR_DDETIMEOUT 28
|
---|
95 | #define SE_ERR_DDEFAIL 29
|
---|
96 | #define SE_ERR_DDEBUSY 30
|
---|
97 | #define SE_ERR_NOASSOC 31
|
---|
98 | #define FO_MOVE 1
|
---|
99 | #define FO_COPY 2
|
---|
100 | #define FO_DELETE 3
|
---|
101 | #define FO_RENAME 4
|
---|
102 | #define FOF_MULTIDESTFILES 1
|
---|
103 | #define FOF_CONFIRMMOUSE 2
|
---|
104 | #define FOF_SILENT 4
|
---|
105 | #define FOF_RENAMEONCOLLISION 8
|
---|
106 | #define FOF_NOCONFIRMATION 16
|
---|
107 | #define FOF_WANTMAPPINGHANDLE 32
|
---|
108 | #define FOF_ALLOWUNDO 64
|
---|
109 | #define FOF_FILESONLY 128
|
---|
110 | #define FOF_SIMPLEPROGRESS 256
|
---|
111 | #define FOF_NOCONFIRMMKDIR 512
|
---|
112 | #define FOF_NOERRORUI 1024
|
---|
113 | #define FOF_NOCOPYSECURITYATTRIBS 2048
|
---|
114 | #define PO_DELETE 19
|
---|
115 | #define PO_RENAME 20
|
---|
116 | #define PO_PORTCHANGE 32
|
---|
117 | #define PO_REN_PORT 52
|
---|
118 | #define SHGFI_ICON 256
|
---|
119 | #define SHGFI_DISPLAYNAME 512
|
---|
120 | #define SHGFI_TYPENAME 1024
|
---|
121 | #define SHGFI_ATTRIBUTES 2048
|
---|
122 | #define SHGFI_ICONLOCATION 4096
|
---|
123 | #define SHGFI_EXETYPE 8192
|
---|
124 | #define SHGFI_SYSICONINDEX 16384
|
---|
125 | #define SHGFI_LINKOVERLAY 32768
|
---|
126 | #define SHGFI_SELECTED 65536
|
---|
127 | #define SHGFI_ATTR_SPECIFIED 131072
|
---|
128 | #define SHGFI_LARGEICON 0
|
---|
129 | #define SHGFI_SMALLICON 1
|
---|
130 | #define SHGFI_OPENICON 2
|
---|
131 | #define SHGFI_SHELLICONSIZE 4
|
---|
132 | #define SHGFI_PIDL 8
|
---|
133 | #define SHGFI_USEFILEATTRIBUTES 16
|
---|
134 | #define SHERB_NOCONFIRMATION 1
|
---|
135 | #define SHERB_NOPROGRESSUI 2
|
---|
136 | #define SHERB_NOSOUND 4
|
---|
137 | #ifdef UNICODE
|
---|
138 | #define NOTIFYICONDATA_V2_SIZE 936
|
---|
139 | #define NOTIFYICONDATA_V1_SIZE 152
|
---|
140 | #else
|
---|
141 | #define NOTIFYICONDATA_V2_SIZE 488
|
---|
142 | #define NOTIFYICONDATA_V1_SIZE 88
|
---|
143 | #endif
|
---|
144 |
|
---|
145 | typedef WORD FILEOP_FLAGS;
|
---|
146 | typedef WORD PRINTEROP_FLAGS;
|
---|
147 | #include <pshpack2.h>
|
---|
148 | typedef struct _AppBarData {
|
---|
149 | DWORD cbSize;
|
---|
150 | HWND hWnd;
|
---|
151 | UINT uCallbackMessage;
|
---|
152 | UINT uEdge;
|
---|
153 | RECT rc;
|
---|
154 | LPARAM lParam;
|
---|
155 | } APPBARDATA,*PAPPBARDATA;
|
---|
156 | DECLARE_HANDLE(HDROP);
|
---|
157 |
|
---|
158 | typedef struct _NOTIFYICONDATAA {
|
---|
159 | DWORD cbSize;
|
---|
160 | HWND hWnd;
|
---|
161 | UINT uID;
|
---|
162 | UINT uFlags;
|
---|
163 | UINT uCallbackMessage;
|
---|
164 | HICON hIcon;
|
---|
165 | #if _WIN32_IE >= 0x0500
|
---|
166 | CHAR szTip[128];
|
---|
167 | DWORD dwState;
|
---|
168 | DWORD dwStateMask;
|
---|
169 | CHAR szInfo[256];
|
---|
170 | _ANONYMOUS_UNION union {
|
---|
171 | UINT uTimeout;
|
---|
172 | UINT uVersion;
|
---|
173 | } DUMMYUNIONNAME;
|
---|
174 | CHAR szInfoTitle[64];
|
---|
175 | DWORD dwInfoFlags;
|
---|
176 | #else
|
---|
177 | CHAR szTip[64];
|
---|
178 | #endif
|
---|
179 | #if _WIN32_IE >= 0x600
|
---|
180 | GUID guidItem;
|
---|
181 | #endif
|
---|
182 | #if _WIN32_WINNT >= 0x600
|
---|
183 | HICON hBalloonIcon;
|
---|
184 | #endif
|
---|
185 | } NOTIFYICONDATAA,*PNOTIFYICONDATAA;
|
---|
186 |
|
---|
187 | typedef struct _NOTIFYICONDATAW {
|
---|
188 | DWORD cbSize;
|
---|
189 | HWND hWnd;
|
---|
190 | UINT uID;
|
---|
191 | UINT uFlags;
|
---|
192 | UINT uCallbackMessage;
|
---|
193 | HICON hIcon;
|
---|
194 | #if _WIN32_IE >= 0x0500
|
---|
195 | WCHAR szTip[128];
|
---|
196 | DWORD dwState;
|
---|
197 | DWORD dwStateMask;
|
---|
198 | WCHAR szInfo[256];
|
---|
199 | _ANONYMOUS_UNION union {
|
---|
200 | UINT uTimeout;
|
---|
201 | UINT uVersion;
|
---|
202 | } DUMMYUNIONNAME;
|
---|
203 | WCHAR szInfoTitle[64];
|
---|
204 | DWORD dwInfoFlags;
|
---|
205 | #else
|
---|
206 | WCHAR szTip[64];
|
---|
207 | #endif
|
---|
208 | #if _WIN32_IE >= 0x600
|
---|
209 | GUID guidItem;
|
---|
210 | #endif
|
---|
211 | #if _WIN32_WINNT >= 0x600
|
---|
212 | HICON hBalloonIcon;
|
---|
213 | #endif
|
---|
214 | } NOTIFYICONDATAW,*PNOTIFYICONDATAW;
|
---|
215 |
|
---|
216 | typedef struct _SHELLEXECUTEINFOA {
|
---|
217 | DWORD cbSize;
|
---|
218 | ULONG fMask;
|
---|
219 | HWND hwnd;
|
---|
220 | LPCSTR lpVerb;
|
---|
221 | LPCSTR lpFile;
|
---|
222 | LPCSTR lpParameters;
|
---|
223 | LPCSTR lpDirectory;
|
---|
224 | int nShow;
|
---|
225 | HINSTANCE hInstApp;
|
---|
226 | PVOID lpIDList;
|
---|
227 | LPCSTR lpClass;
|
---|
228 | HKEY hkeyClass;
|
---|
229 | DWORD dwHotKey;
|
---|
230 | HANDLE hIcon;
|
---|
231 | HANDLE hProcess;
|
---|
232 | } SHELLEXECUTEINFOA,*LPSHELLEXECUTEINFOA;
|
---|
233 | typedef struct _SHELLEXECUTEINFOW {
|
---|
234 | DWORD cbSize;
|
---|
235 | ULONG fMask;
|
---|
236 | HWND hwnd;
|
---|
237 | LPCWSTR lpVerb;
|
---|
238 | LPCWSTR lpFile;
|
---|
239 | LPCWSTR lpParameters;
|
---|
240 | LPCWSTR lpDirectory;
|
---|
241 | int nShow;
|
---|
242 | HINSTANCE hInstApp;
|
---|
243 | PVOID lpIDList;
|
---|
244 | LPCWSTR lpClass;
|
---|
245 | HKEY hkeyClass;
|
---|
246 | DWORD dwHotKey;
|
---|
247 | HANDLE hIcon;
|
---|
248 | HANDLE hProcess;
|
---|
249 | } SHELLEXECUTEINFOW,*LPSHELLEXECUTEINFOW;
|
---|
250 | typedef struct _SHFILEOPSTRUCTA {
|
---|
251 | HWND hwnd;
|
---|
252 | UINT wFunc;
|
---|
253 | LPCSTR pFrom;
|
---|
254 | LPCSTR pTo;
|
---|
255 | FILEOP_FLAGS fFlags;
|
---|
256 | BOOL fAnyOperationsAborted;
|
---|
257 | PVOID hNameMappings;
|
---|
258 | LPCSTR lpszProgressTitle;
|
---|
259 | } SHFILEOPSTRUCTA,*LPSHFILEOPSTRUCTA;
|
---|
260 | typedef struct _SHFILEOPSTRUCTW {
|
---|
261 | HWND hwnd;
|
---|
262 | UINT wFunc;
|
---|
263 | LPCWSTR pFrom;
|
---|
264 | LPCWSTR pTo;
|
---|
265 | FILEOP_FLAGS fFlags;
|
---|
266 | BOOL fAnyOperationsAborted;
|
---|
267 | PVOID hNameMappings;
|
---|
268 | LPCWSTR lpszProgressTitle;
|
---|
269 | } SHFILEOPSTRUCTW,*LPSHFILEOPSTRUCTW;
|
---|
270 | typedef struct _SHFILEINFOA {
|
---|
271 | HICON hIcon;
|
---|
272 | int iIcon;
|
---|
273 | DWORD dwAttributes;
|
---|
274 | CHAR szDisplayName[MAX_PATH];
|
---|
275 | CHAR szTypeName[80];
|
---|
276 | } SHFILEINFOA;
|
---|
277 | typedef struct _SHFILEINFOW {
|
---|
278 | HICON hIcon;
|
---|
279 | int iIcon;
|
---|
280 | DWORD dwAttributes;
|
---|
281 | WCHAR szDisplayName[MAX_PATH];
|
---|
282 | WCHAR szTypeName[80];
|
---|
283 | } SHFILEINFOW;
|
---|
284 | typedef struct _SHQUERYRBINFO {
|
---|
285 | DWORD cbSize;
|
---|
286 | __int64 i64Size;
|
---|
287 | __int64 i64NumItems;
|
---|
288 | } SHQUERYRBINFO, *LPSHQUERYRBINFO;
|
---|
289 | #include <poppack.h>
|
---|
290 |
|
---|
291 | LPWSTR * WINAPI CommandLineToArgvW(LPCWSTR,int*);
|
---|
292 | void WINAPI DragAcceptFiles(HWND,BOOL);
|
---|
293 | void WINAPI DragFinish(HDROP);
|
---|
294 | UINT WINAPI DragQueryFileA(HDROP,UINT,LPSTR,UINT);
|
---|
295 | UINT WINAPI DragQueryFileW(HDROP,UINT,LPWSTR,UINT);
|
---|
296 | BOOL WINAPI DragQueryPoint(HDROP,LPPOINT);
|
---|
297 | HICON WINAPI DuplicateIcon(HINSTANCE,HICON);
|
---|
298 | HICON WINAPI ExtractAssociatedIconA(HINSTANCE,LPCSTR,PWORD);
|
---|
299 | HICON WINAPI ExtractAssociatedIconW(HINSTANCE,LPCWSTR,PWORD);
|
---|
300 | HICON WINAPI ExtractIconA(HINSTANCE,LPCSTR,UINT);
|
---|
301 | HICON WINAPI ExtractIconW(HINSTANCE,LPCWSTR,UINT);
|
---|
302 | UINT WINAPI ExtractIconExA(LPCSTR,int,HICON*,HICON*,UINT);
|
---|
303 | UINT WINAPI ExtractIconExW(LPCWSTR,int,HICON*,HICON*,UINT);
|
---|
304 | HINSTANCE WINAPI FindExecutableA(LPCSTR,LPCSTR,LPSTR);
|
---|
305 | HINSTANCE WINAPI FindExecutableW(LPCWSTR,LPCWSTR,LPWSTR);
|
---|
306 | UINT WINAPI SHAppBarMessage(DWORD,PAPPBARDATA);
|
---|
307 | BOOL WINAPI Shell_NotifyIconA(DWORD,PNOTIFYICONDATAA);
|
---|
308 | BOOL WINAPI Shell_NotifyIconW(DWORD,PNOTIFYICONDATAW);
|
---|
309 | int WINAPI ShellAboutA(HWND,LPCSTR,LPCSTR,HICON);
|
---|
310 | int WINAPI ShellAboutW(HWND,LPCWSTR,LPCWSTR,HICON);
|
---|
311 | HINSTANCE WINAPI ShellExecuteA(HWND,LPCSTR,LPCSTR,LPCSTR,LPCSTR,INT);
|
---|
312 | HINSTANCE WINAPI ShellExecuteW(HWND,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR,INT);
|
---|
313 | BOOL WINAPI ShellExecuteExA(LPSHELLEXECUTEINFOA);
|
---|
314 | BOOL WINAPI ShellExecuteExW(LPSHELLEXECUTEINFOW);
|
---|
315 | int WINAPI SHFileOperationA(LPSHFILEOPSTRUCTA);
|
---|
316 | int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW);
|
---|
317 | void WINAPI SHFreeNameMappings(HANDLE);
|
---|
318 | DWORD WINAPI SHGetFileInfoA(LPCSTR,DWORD,SHFILEINFOA*,UINT,UINT);
|
---|
319 | DWORD WINAPI SHGetFileInfoW(LPCWSTR,DWORD,SHFILEINFOW*,UINT,UINT);
|
---|
320 | HRESULT WINAPI SHQueryRecycleBinA(LPCSTR, LPSHQUERYRBINFO);
|
---|
321 | HRESULT WINAPI SHQueryRecycleBinW(LPCWSTR, LPSHQUERYRBINFO);
|
---|
322 | HRESULT WINAPI SHEmptyRecycleBinA(HWND,LPCSTR,DWORD);
|
---|
323 | HRESULT WINAPI SHEmptyRecycleBinW(HWND,LPCWSTR,DWORD);
|
---|
324 |
|
---|
325 | #if (_WIN32_WINNT >= 0x600)
|
---|
326 | #define SHIL_LARGE 0x0
|
---|
327 | #define SHIL_SMALL 0x1
|
---|
328 | #define SHIL_EXTRALARGE 0x2
|
---|
329 | #define SHIL_SYSSMALL 0x3
|
---|
330 | #define SHIL_JUMBO 0x4
|
---|
331 | #define SHIL_LAST SHIL_JUMBO
|
---|
332 | HRESULT WINAPI SHGetImageList(int,REFIID,void**);
|
---|
333 | #endif
|
---|
334 |
|
---|
335 | #ifdef UNICODE
|
---|
336 | typedef NOTIFYICONDATAW NOTIFYICONDATA,*PNOTIFYICONDATA;
|
---|
337 | typedef SHELLEXECUTEINFOW SHELLEXECUTEINFO,*LPSHELLEXECUTEINFO;
|
---|
338 | typedef SHFILEOPSTRUCTW SHFILEOPSTRUCT,*LPSHFILEOPSTRUCT;
|
---|
339 | typedef SHFILEINFOW SHFILEINFO;
|
---|
340 | #define DragQueryFile DragQueryFileW
|
---|
341 | #define ExtractAssociatedIcon ExtractAssociatedIconW
|
---|
342 | #define ExtractIcon ExtractIconW
|
---|
343 | #define ExtractIconEx ExtractIconExW
|
---|
344 | #define FindExecutable FindExecutableW
|
---|
345 | #define Shell_NotifyIcon Shell_NotifyIconW
|
---|
346 | #define ShellAbout ShellAboutW
|
---|
347 | #define ShellExecute ShellExecuteW
|
---|
348 | #define ShellExecuteEx ShellExecuteExW
|
---|
349 | #define SHFileOperation SHFileOperationW
|
---|
350 | #define SHGetFileInfo SHGetFileInfoW
|
---|
351 | #define SHQueryRecycleBin SHQueryRecycleBinW
|
---|
352 | #define SHEmptyRecycleBin SHEmptyRecycleBinW
|
---|
353 |
|
---|
354 | #else
|
---|
355 | typedef NOTIFYICONDATAA NOTIFYICONDATA,*PNOTIFYICONDATA;
|
---|
356 | typedef SHELLEXECUTEINFOA SHELLEXECUTEINFO,*LPSHELLEXECUTEINFO;
|
---|
357 | typedef SHFILEOPSTRUCTA SHFILEOPSTRUCT,*LPSHFILEOPSTRUCT;
|
---|
358 | typedef SHFILEINFOA SHFILEINFO;
|
---|
359 | #define DragQueryFile DragQueryFileA
|
---|
360 | #define ExtractAssociatedIcon ExtractAssociatedIconA
|
---|
361 | #define ExtractIcon ExtractIconA
|
---|
362 | #define ExtractIconEx ExtractIconExA
|
---|
363 | #define FindExecutable FindExecutableA
|
---|
364 | #define Shell_NotifyIcon Shell_NotifyIconA
|
---|
365 | #define ShellAbout ShellAboutA
|
---|
366 | #define ShellExecute ShellExecuteA
|
---|
367 | #define ShellExecuteEx ShellExecuteExA
|
---|
368 | #define SHFileOperation SHFileOperationA
|
---|
369 | #define SHGetFileInfo SHGetFileInfoA
|
---|
370 | #define SHQueryRecycleBin SHQueryRecycleBinA
|
---|
371 | #define SHEmptyRecycleBin SHEmptyRecycleBinA
|
---|
372 | #endif
|
---|
373 | #ifdef __cplusplus
|
---|
374 | }
|
---|
375 | #endif
|
---|
376 | #endif
|
---|