[PSDK]
[reactos.git] / reactos / include / psdk / shellapi.h
1 #ifndef _SHELLAPI_H
2 #define _SHELLAPI_H
3
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7 #ifdef _MSC_VER
8 #pragma warning(push)
9 #pragma warning(disable:4201)
10 #endif
11 #define WINSHELLAPI DECLSPEC_IMPORT
12 #define ABE_LEFT 0
13 #define ABE_TOP 1
14 #define ABE_RIGHT 2
15 #define ABE_BOTTOM 3
16 #define ABS_AUTOHIDE 1
17 #define ABS_ALWAYSONTOP 2
18 #define SEE_MASK_CLASSNAME 1
19 #define SEE_MASK_CLASSKEY 3
20 #define SEE_MASK_IDLIST 4
21 #define SEE_MASK_INVOKEIDLIST 12
22 #define SEE_MASK_ICON 0x10
23 #define SEE_MASK_HOTKEY 0x20
24 #define SEE_MASK_NOCLOSEPROCESS 0x40
25 #define SEE_MASK_CONNECTNETDRV 0x80
26 #define SEE_MASK_NOASYNC 0x00000100
27 #define SEE_MASK_FLAG_DDEWAIT SEE_MASK_NOASYNC
28 #define SEE_MASK_DOENVSUBST 0x200
29 #define SEE_MASK_FLAG_NO_UI 0x400
30 #define SEE_MASK_NO_CONSOLE 0x8000
31 #define SEE_MASK_UNICODE 0x10000
32 #define SEE_MASK_ASYNCOK 0x100000
33 #define SEE_MASK_HMONITOR 0x200000
34 #define SEE_MASK_NOZONECHECKS 0x00800000
35 #define ABM_NEW 0
36 #define ABM_REMOVE 1
37 #define ABM_QUERYPOS 2
38 #define ABM_SETPOS 3
39 #define ABM_GETSTATE 4
40 #define ABM_GETTASKBARPOS 5
41 #define ABM_ACTIVATE 6
42 #define ABM_GETAUTOHIDEBAR 7
43 #define ABM_SETAUTOHIDEBAR 8
44 #define ABM_WINDOWPOSCHANGED 9
45 #define ABN_STATECHANGE 0
46 #define ABN_POSCHANGED 1
47 #define ABN_FULLSCREENAPP 2
48 #define ABN_WINDOWARRANGE 3
49 #define NIM_ADD 0
50 #define NIM_MODIFY 1
51 #define NIM_DELETE 2
52 #if _WIN32_IE >= 0x0500
53 #define NOTIFYICON_VERSION 3
54 #define NIM_SETFOCUS 3
55 #define NIM_SETVERSION 4
56 #endif
57 #define NIF_MESSAGE 1
58 #define NIF_ICON 2
59 #define NIF_TIP 4
60 #define NIF_STATE 8
61 #if _WIN32_IE >= 0x0500
62 #define NIF_INFO 16
63 #define NIS_HIDDEN 1
64 #define NIS_SHAREDICON 2
65 #define NIIF_NONE 0
66 #define NIIF_INFO 1
67 #define NIIF_WARNING 2
68 #define NIIF_ERROR 3
69 #if _WIN32_IE >= 0x0600
70 #define NIIF_ICON_MASK 0xf
71 #define NIIF_NOSOUND 0x10
72 #endif /* _WIN32_IE >= 0x0600 */
73 #endif /* _WIN32_IE >= 0x0500 */
74 #define SE_ERR_FNF 2
75 #define SE_ERR_PNF 3
76 #define SE_ERR_ACCESSDENIED 5
77 #define SE_ERR_OOM 8
78 #define SE_ERR_DLLNOTFOUND 32
79 #define SE_ERR_SHARE 26
80 #define SE_ERR_ASSOCINCOMPLETE 27
81 #define SE_ERR_DDETIMEOUT 28
82 #define SE_ERR_DDEFAIL 29
83 #define SE_ERR_DDEBUSY 30
84 #define SE_ERR_NOASSOC 31
85 #define FO_MOVE 1
86 #define FO_COPY 2
87 #define FO_DELETE 3
88 #define FO_RENAME 4
89
90 #define FOF_MULTIDESTFILES 0x0001
91 #define FOF_CONFIRMMOUSE 0x0002
92 #define FOF_SILENT 0x0004
93 #define FOF_RENAMEONCOLLISION 0x0008
94 #define FOF_NOCONFIRMATION 0x0010
95 #define FOF_WANTMAPPINGHANDLE 0x0020
96 #define FOF_ALLOWUNDO 0x0040
97 #define FOF_FILESONLY 0x0080
98 #define FOF_SIMPLEPROGRESS 0x0100
99 #define FOF_NOCONFIRMMKDIR 0x0200
100 #define FOF_NOERRORUI 0x0400
101 #define FOF_NOCOPYSECURITYATTRIBS 0x0800
102 #define FOF_NORECURSION 0x1000 /* don't do recursion into directories */
103 #define FOF_NO_CONNECTED_ELEMENTS 0x2000 /* don't do connected files */
104 #define FOF_WANTNUKEWARNING 0x4000 /* during delete operation, warn if delete instead
105 of recycling (even if FOF_NOCONFIRMATION) */
106 #define FOF_NORECURSEREPARSE 0x8000 /* don't do recursion into reparse points */
107
108 #define PO_DELETE 19
109 #define PO_RENAME 20
110 #define PO_PORTCHANGE 32
111 #define PO_REN_PORT 52
112 #define SHGFI_ADDOVERLAYS 32
113 #define SHGFI_OVERLAYINDEX 64
114 #define SHGFI_ICON 256
115 #define SHGFI_DISPLAYNAME 512
116 #define SHGFI_TYPENAME 1024
117 #define SHGFI_ATTRIBUTES 2048
118 #define SHGFI_ICONLOCATION 4096
119 #define SHGFI_EXETYPE 8192
120 #define SHGFI_SYSICONINDEX 16384
121 #define SHGFI_LINKOVERLAY 32768
122 #define SHGFI_SELECTED 65536
123 #define SHGFI_ATTR_SPECIFIED 131072
124 #define SHGFI_LARGEICON 0
125 #define SHGFI_SMALLICON 1
126 #define SHGFI_OPENICON 2
127 #define SHGFI_SHELLICONSIZE 4
128 #define SHGFI_PIDL 8
129 #define SHGFI_USEFILEATTRIBUTES 16
130
131 #if (NTDDI_VERSION >= NTDDI_WINXP)
132 #define SHIL_LARGE 0x0
133 #define SHIL_SMALL 0x1
134 #define SHIL_EXTRALARGE 0x2
135 #define SHIL_SYSSMALL 0x3
136 #if (NTDDI_VERSION >= NTDDI_VISTA)
137 #define SHIL_JUMBO 0x4
138 #define SHIL_LAST SHIL_JUMBO
139 #else
140 #define SHIL_LAST SHIL_SYSSMALL
141 #endif
142 #endif
143
144 typedef struct _SHCREATEPROCESSINFOW
145 {
146 DWORD cbSize;
147 ULONG fMask;
148 HWND hwnd;
149 LPCWSTR pszFile;
150 LPCWSTR pszParameters;
151 LPCWSTR pszCurrentDirectory;
152 IN HANDLE hUserToken;
153 IN LPSECURITY_ATTRIBUTES lpProcessAttributes;
154 IN LPSECURITY_ATTRIBUTES lpThreadAttributes;
155 IN BOOL bInheritHandles;
156 IN DWORD dwCreationFlags;
157 IN LPSTARTUPINFOW lpStartupInfo;
158 OUT LPPROCESS_INFORMATION lpProcessInformation;
159 } SHCREATEPROCESSINFOW, *PSHCREATEPROCESSINFOW;
160
161 typedef WORD FILEOP_FLAGS;
162 typedef WORD PRINTEROP_FLAGS;
163 #include <pshpack1.h>
164 typedef struct _AppBarData {
165 DWORD cbSize;
166 HWND hWnd;
167 UINT uCallbackMessage;
168 UINT uEdge;
169 RECT rc;
170 LPARAM lParam;
171 } APPBARDATA,*PAPPBARDATA;
172 DECLARE_HANDLE(HDROP);
173
174 typedef struct _NOTIFYICONDATAA {
175 DWORD cbSize;
176 HWND hWnd;
177 UINT uID;
178 UINT uFlags;
179 UINT uCallbackMessage;
180 HICON hIcon;
181 #if _WIN32_IE >= 0x0500
182 CHAR szTip[128];
183 DWORD dwState;
184 DWORD dwStateMask;
185 CHAR szInfo[256];
186 _ANONYMOUS_UNION union {
187 UINT uTimeout;
188 UINT uVersion;
189 } DUMMYUNIONNAME;
190 CHAR szInfoTitle[64];
191 DWORD dwInfoFlags;
192 #else
193 CHAR szTip[64];
194 #endif
195 #if _WIN32_IE >= 0x600
196 GUID guidItem;
197 #endif
198 } NOTIFYICONDATAA,*PNOTIFYICONDATAA;
199
200 typedef struct _NOTIFYICONDATAW {
201 DWORD cbSize;
202 HWND hWnd;
203 UINT uID;
204 UINT uFlags;
205 UINT uCallbackMessage;
206 HICON hIcon;
207 #if _WIN32_IE >= 0x0500
208 WCHAR szTip[128];
209 DWORD dwState;
210 DWORD dwStateMask;
211 WCHAR szInfo[256];
212 _ANONYMOUS_UNION union {
213 UINT uTimeout;
214 UINT uVersion;
215 } DUMMYUNIONNAME;
216 WCHAR szInfoTitle[64];
217 DWORD dwInfoFlags;
218 #else
219 WCHAR szTip[64];
220 #endif
221 #if _WIN32_IE >= 0x600
222 GUID guidItem;
223 #endif
224 } NOTIFYICONDATAW,*PNOTIFYICONDATAW;
225
226 #define NOTIFYICONDATAA_V1_SIZE FIELD_OFFSET(NOTIFYICONDATAA, szTip[64])
227 #define NOTIFYICONDATAW_V1_SIZE FIELD_OFFSET(NOTIFYICONDATAW, szTip[64])
228 #define NOTIFYICONDATAA_V2_SIZE FIELD_OFFSET(NOTIFYICONDATAA, guidItem)
229 #define NOTIFYICONDATAW_V2_SIZE FIELD_OFFSET(NOTIFYICONDATAW, guidItem)
230
231 #if WINVER >= 0x400
232 typedef struct _DRAGINFOA {
233 UINT uSize;
234 POINT pt;
235 BOOL fNC;
236 LPSTR lpFileList;
237 DWORD grfKeyState;
238 } DRAGINFOA,*LPDRAGINFOA;
239 typedef struct _DRAGINFOW {
240 UINT uSize;
241 POINT pt;
242 BOOL fNC;
243 LPWSTR lpFileList;
244 DWORD grfKeyState;
245 } DRAGINFOW,*LPDRAGINFOW;
246 #endif
247
248 typedef struct _SHELLEXECUTEINFOA {
249 DWORD cbSize;
250 ULONG fMask;
251 HWND hwnd;
252 LPCSTR lpVerb;
253 LPCSTR lpFile;
254 LPCSTR lpParameters;
255 LPCSTR lpDirectory;
256 int nShow;
257 HINSTANCE hInstApp;
258 PVOID lpIDList;
259 LPCSTR lpClass;
260 HKEY hkeyClass;
261 DWORD dwHotKey;
262 HANDLE hIcon;
263 HANDLE hProcess;
264 } SHELLEXECUTEINFOA,*LPSHELLEXECUTEINFOA;
265 typedef struct _SHELLEXECUTEINFOW {
266 DWORD cbSize;
267 ULONG fMask;
268 HWND hwnd;
269 LPCWSTR lpVerb;
270 LPCWSTR lpFile;
271 LPCWSTR lpParameters;
272 LPCWSTR lpDirectory;
273 int nShow;
274 HINSTANCE hInstApp;
275 PVOID lpIDList;
276 LPCWSTR lpClass;
277 HKEY hkeyClass;
278 DWORD dwHotKey;
279 HANDLE hIcon;
280 HANDLE hProcess;
281 } SHELLEXECUTEINFOW,*LPSHELLEXECUTEINFOW;
282 typedef struct _SHFILEOPSTRUCTA {
283 HWND hwnd;
284 UINT wFunc;
285 LPCSTR pFrom;
286 LPCSTR pTo;
287 FILEOP_FLAGS fFlags;
288 BOOL fAnyOperationsAborted;
289 PVOID hNameMappings;
290 LPCSTR lpszProgressTitle;
291 } SHFILEOPSTRUCTA,*LPSHFILEOPSTRUCTA;
292 typedef struct _SHFILEOPSTRUCTW {
293 HWND hwnd;
294 UINT wFunc;
295 LPCWSTR pFrom;
296 LPCWSTR pTo;
297 FILEOP_FLAGS fFlags;
298 BOOL fAnyOperationsAborted;
299 PVOID hNameMappings;
300 LPCWSTR lpszProgressTitle;
301 } SHFILEOPSTRUCTW,*LPSHFILEOPSTRUCTW;
302 typedef struct _SHFILEINFOA {
303 HICON hIcon;
304 int iIcon;
305 DWORD dwAttributes;
306 CHAR szDisplayName[MAX_PATH];
307 CHAR szTypeName[80];
308 } SHFILEINFOA;
309 typedef struct _SHFILEINFOW {
310 HICON hIcon;
311 int iIcon;
312 DWORD dwAttributes;
313 WCHAR szDisplayName[MAX_PATH];
314 WCHAR szTypeName[80];
315 } SHFILEINFOW;
316 typedef struct _SHQUERYRBINFO {
317 DWORD cbSize;
318 __int64 i64Size;
319 __int64 i64NumItems;
320 } SHQUERYRBINFO, *LPSHQUERYRBINFO;
321 typedef struct _SHNAMEMAPPINGA {
322 LPSTR pszOldPath;
323 LPSTR pszNewPath;
324 int cchOldPath;
325 int cchNewPath;
326 } SHNAMEMAPPINGA, *LPSHNAMEMAPPINGA;
327 typedef struct _SHNAMEMAPPINGW {
328 LPWSTR pszOldPath;
329 LPWSTR pszNewPath;
330 int cchOldPath;
331 int cchNewPath;
332 } SHNAMEMAPPINGW, *LPSHNAMEMAPPINGW;
333 #include <poppack.h>
334
335 #define SHERB_NOCONFIRMATION 0x1
336 #define SHERB_NOPROGRESSUI 0x2
337 #define SHERB_NOSOUND 0x4
338
339 /******************************************
340 * Links
341 */
342
343 #define SHGNLI_PIDL 0x01
344 #define SHGNLI_PREFIXNAME 0x02
345 #define SHGNLI_NOUNIQUE 0x04
346 #define SHGNLI_NOLNK 0x08
347
348 BOOL WINAPI SHGetNewLinkInfoA(LPCSTR,LPCSTR,LPSTR,BOOL*,UINT);
349 BOOL WINAPI SHGetNewLinkInfoW(LPCWSTR,LPCWSTR,LPWSTR,BOOL*,UINT);
350
351 LPWSTR * WINAPI CommandLineToArgvW(LPCWSTR,int*);
352 void WINAPI DragAcceptFiles(HWND,BOOL);
353 void WINAPI DragFinish(HDROP);
354 UINT WINAPI DragQueryFileA(HDROP,UINT,LPSTR,UINT);
355 UINT WINAPI DragQueryFileW(HDROP,UINT,LPWSTR,UINT);
356 BOOL WINAPI DragQueryPoint(HDROP,LPPOINT);
357 HICON WINAPI ExtractAssociatedIconA(HINSTANCE,LPSTR,PWORD);
358 HICON WINAPI ExtractAssociatedIconW(HINSTANCE,LPWSTR,PWORD);
359 HICON WINAPI ExtractIconA(HINSTANCE,LPCSTR,UINT);
360 HICON WINAPI ExtractIconW(HINSTANCE,LPCWSTR,UINT);
361 UINT WINAPI ExtractIconExA(LPCSTR,int,HICON*,HICON*,UINT);
362 UINT WINAPI ExtractIconExW(LPCWSTR,int,HICON*,HICON*,UINT);
363 HINSTANCE WINAPI FindExecutableA(LPCSTR,LPCSTR,LPSTR);
364 HINSTANCE WINAPI FindExecutableW(LPCWSTR,LPCWSTR,LPWSTR);
365 UINT_PTR WINAPI SHAppBarMessage(DWORD,PAPPBARDATA);
366 BOOL WINAPI Shell_NotifyIconA(DWORD,PNOTIFYICONDATAA);
367 BOOL WINAPI Shell_NotifyIconW(DWORD,PNOTIFYICONDATAW);
368 int WINAPI ShellAboutA(HWND,LPCSTR,LPCSTR,HICON);
369 int WINAPI ShellAboutW(HWND,LPCWSTR,LPCWSTR,HICON);
370 HINSTANCE WINAPI ShellExecuteA(HWND,LPCSTR,LPCSTR,LPCSTR,LPCSTR,INT);
371 HINSTANCE WINAPI ShellExecuteW(HWND,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR,INT);
372 BOOL WINAPI ShellExecuteExA(LPSHELLEXECUTEINFOA);
373 BOOL WINAPI ShellExecuteExW(LPSHELLEXECUTEINFOW);
374 int WINAPI SHFileOperationA(LPSHFILEOPSTRUCTA);
375 int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW);
376 void WINAPI SHFreeNameMappings(HANDLE);
377 DWORD_PTR WINAPI SHGetFileInfoA(LPCSTR,DWORD,SHFILEINFOA*,UINT,UINT);
378 DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR,DWORD,SHFILEINFOW*,UINT,UINT);
379 BOOL WINAPI SHGetNewLinkInfoA(LPCSTR,LPCSTR,LPSTR,BOOL*,UINT);
380 BOOL WINAPI SHGetNewLinkInfoW(LPCWSTR,LPCWSTR,LPWSTR,BOOL*,UINT);
381 HRESULT WINAPI SHQueryRecycleBinA(LPCSTR, LPSHQUERYRBINFO);
382 HRESULT WINAPI SHQueryRecycleBinW(LPCWSTR, LPSHQUERYRBINFO);
383 HRESULT WINAPI SHEmptyRecycleBinA(HWND,LPCSTR,DWORD);
384 HRESULT WINAPI SHEmptyRecycleBinW(HWND,LPCWSTR,DWORD);
385 BOOL WINAPI SHCreateProcessAsUserW(PSHCREATEPROCESSINFOW);
386
387 #ifdef UNICODE
388 #define NOTIFYICONDATA_V1_SIZE NOTIFYICONDATAW_V1_SIZE
389 #define NOTIFYICONDATA_V2_SIZE NOTIFYICONDATAW_V2_SIZE
390 typedef NOTIFYICONDATAW NOTIFYICONDATA,*PNOTIFYICONDATA;
391 typedef DRAGINFOW DRAGINFO,*LPDRAGINFO;
392 typedef SHELLEXECUTEINFOW SHELLEXECUTEINFO,*LPSHELLEXECUTEINFO;
393 typedef SHFILEOPSTRUCTW SHFILEOPSTRUCT,*LPSHFILEOPSTRUCT;
394 typedef SHFILEINFOW SHFILEINFO;
395 typedef SHNAMEMAPPINGW SHNAMEMAPPING;
396 typedef LPSHNAMEMAPPINGW LPSHNAMEMAPPING;
397 #define DragQueryFile DragQueryFileW
398 #define ExtractAssociatedIcon ExtractAssociatedIconW
399 #define ExtractIcon ExtractIconW
400 #define ExtractIconEx ExtractIconExW
401 #define FindExecutable FindExecutableW
402 #define Shell_NotifyIcon Shell_NotifyIconW
403 #define ShellAbout ShellAboutW
404 #define ShellExecute ShellExecuteW
405 #define ShellExecuteEx ShellExecuteExW
406 #define SHFileOperation SHFileOperationW
407 #define SHGetFileInfo SHGetFileInfoW
408 #define SHGetNewLinkInfo SHGetNewLinkInfoW
409 #define SHQueryRecycleBin SHQueryRecycleBinW
410 #define SHEmptyRecycleBin SHEmptyRecycleBinW
411 #define SHGetNewLinkInfo SHGetNewLinkInfoW
412
413 #else
414 #define NOTIFYICONDATA_V1_SIZE NOTIFYICONDATAA_V1_SIZE
415 #define NOTIFYICONDATA_V2_SIZE NOTIFYICONDATAA_V2_SIZE
416 typedef NOTIFYICONDATAA NOTIFYICONDATA,*PNOTIFYICONDATA;
417 typedef DRAGINFOA DRAGINFO,*LPDRAGINFO;
418 typedef SHELLEXECUTEINFOA SHELLEXECUTEINFO,*LPSHELLEXECUTEINFO;
419 typedef SHFILEOPSTRUCTA SHFILEOPSTRUCT,*LPSHFILEOPSTRUCT;
420 typedef SHFILEINFOA SHFILEINFO;
421 typedef SHNAMEMAPPINGA SHNAMEMAPPING;
422 typedef LPSHNAMEMAPPINGA LPSHNAMEMAPPING;
423 #define DragQueryFile DragQueryFileA
424 #define ExtractAssociatedIcon ExtractAssociatedIconA
425 #define ExtractIcon ExtractIconA
426 #define ExtractIconEx ExtractIconExA
427 #define FindExecutable FindExecutableA
428 #define Shell_NotifyIcon Shell_NotifyIconA
429 #define ShellAbout ShellAboutA
430 #define ShellExecute ShellExecuteA
431 #define ShellExecuteEx ShellExecuteExA
432 #define SHFileOperation SHFileOperationA
433 #define SHGetFileInfo SHGetFileInfoA
434 #define SHGetNewLinkInfo SHGetNewLinkInfoA
435 #define SHQueryRecycleBin SHQueryRecycleBinA
436 #define SHEmptyRecycleBin SHEmptyRecycleBinA
437 #define SHGetNewLinkInfo SHGetNewLinkInfoA
438 #endif
439 #ifdef _MSC_VER
440 #pragma warning(pop)
441 #endif
442 #ifdef __cplusplus
443 }
444 #endif
445 #endif