1 module win32.shellapi;
2
3 // Translated from Microsoft Platform SDK August 2001 Edition
4 // by Y.Tomino
5
6 import win32.windef;
7 import win32.winbase;
8 import win32.winuser;
9
10 // #ifndef _INC_SHELLAPI
11 // #define _INC_SHELLAPI
12
13 // #ifndef WINSHELLAPI
14 // #if !defined(_SHELL32_)
15 // #define WINSHELLAPI DECLSPEC_IMPORT
16 // #else
17 // #...
18 // #endif
19 // #endif // WINSHELLAPI
20
21 // #ifndef SHSTDAPI
22 // #if !defined(_SHELL32_)
23 // #define SHSTDAPI EXTERN_C DECLSPEC_IMPORT HRESULT STDAPICALLTYPE
24 // #define SHSTDAPI_(type) EXTERN_C DECLSPEC_IMPORT type STDAPICALLTYPE
25 // #else
26 // #...
27 // #...
28 // #endif
29 // #endif // SHSTDAPI
30
31 // #ifndef SHDOCAPI
32 // #if !defined(_SHDOCVW_)
33 // #define SHDOCAPI EXTERN_C DECLSPEC_IMPORT HRESULT STDAPICALLTYPE
34 // #define SHDOCAPI_(type) EXTERN_C DECLSPEC_IMPORT type STDAPICALLTYPE
35 // #else
36 // #...
37 // #...
38 // #endif
39 // #endif // SHDOCAPI
40
41 // #if !defined(_WIN64)
42 align(1):
43 // #endif
44
45 // #ifdef __cplusplus
46 // extern "C" { /* Assume C declarations for C++ */
47 // #endif /* __cplusplus */
48
49 alias void* HDROP;
50
51 extern(Windows) export UINT DragQueryFileA(HDROP,UINT,LPSTR,UINT);
52 extern(Windows) export UINT DragQueryFileW(HDROP,UINT,LPWSTR,UINT);
53 // #ifdef UNICODE
54 alias DragQueryFileW DragQueryFile;
55 // #else
56 // #...
57 // #endif // !UNICODE
58 extern(Windows) export BOOL DragQueryPoint(HDROP,LPPOINT);
59 extern(Windows) export void DragFinish(HDROP);
60 extern(Windows) export void DragAcceptFiles(HWND,BOOL);
61
62 extern(Windows) export HINSTANCE ShellExecuteA(HWND hwnd, LPCSTR lpOperation, LPCSTR lpFile, LPCSTR lpParameters, LPCSTR lpDirectory, INT nShowCmd);
63 extern(Windows) export HINSTANCE ShellExecuteW(HWND hwnd, LPCWSTR lpOperation, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd);
64 // #ifdef UNICODE
65 alias ShellExecuteW ShellExecute;
66 // #else
67 // #...
68 // #endif // !UNICODE
69 extern(Windows) export HINSTANCE FindExecutableA(LPCSTR lpFile, LPCSTR lpDirectory, LPSTR lpResult);
70 extern(Windows) export HINSTANCE FindExecutableW(LPCWSTR lpFile, LPCWSTR lpDirectory, LPWSTR lpResult);
71 // #ifdef UNICODE
72 alias FindExecutableW FindExecutable;
73 // #else
74 // #...
75 // #endif // !UNICODE
76 extern(Windows) export LPWSTR * CommandLineToArgvW(LPCWSTR lpCmdLine, int*pNumArgs);
77
78 extern(Windows) export INT ShellAboutA(HWND hWnd, LPCSTR szApp, LPCSTR szOtherStuff, HICON hIcon);
79 extern(Windows) export INT ShellAboutW(HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, HICON hIcon);
80 // #ifdef UNICODE
81 alias ShellAboutW ShellAbout;
82 // #else
83 // #...
84 // #endif // !UNICODE
85 extern(Windows) export HICON DuplicateIcon(HINSTANCE hInst, HICON hIcon);
86 extern(Windows) export HICON ExtractAssociatedIconA(HINSTANCE hInst, LPSTR lpIconPath, LPWORD lpiIcon);
87 extern(Windows) export HICON ExtractAssociatedIconW(HINSTANCE hInst, LPWSTR lpIconPath, LPWORD lpiIcon);
88 // #ifdef UNICODE
89 alias ExtractAssociatedIconW ExtractAssociatedIcon;
90 // #else
91 // #...
92 // #endif // !UNICODE
93 extern(Windows) export HICON ExtractIconA(HINSTANCE hInst, LPCSTR lpszExeFileName, UINT nIconIndex);
94 extern(Windows) export HICON ExtractIconW(HINSTANCE hInst, LPCWSTR lpszExeFileName, UINT nIconIndex);
95 // #ifdef UNICODE
96 alias ExtractIconW ExtractIcon;
97 // #else
98 // #...
99 // #endif // !UNICODE
100
101 // #if(WINVER >= 0x0400)
102 struct _DRAGINFOA {
103 UINT uSize;
104 POINT pt;
105 BOOL fNC;
106 LPSTR lpFileList;
107 DWORD grfKeyState;
108 }
109 alias _DRAGINFOA DRAGINFOA;
110 alias _DRAGINFOA* LPDRAGINFOA;
111
112 struct _DRAGINFOW {
113 UINT uSize;
114 POINT pt;
115 BOOL fNC;
116 LPWSTR lpFileList;
117 DWORD grfKeyState;
118 }
119 alias _DRAGINFOW DRAGINFOW;
120 alias _DRAGINFOW* LPDRAGINFOW;
121
122 // #ifdef UNICODE
123 alias DRAGINFOW DRAGINFO;
124 alias LPDRAGINFOW LPDRAGINFO;
125 // #else
126 // ...
127 // #endif // UNICODE
128
129 enum : uint { ABM_NEW = 0x00000000 }
130 enum : uint { ABM_REMOVE = 0x00000001 }
131 enum : uint { ABM_QUERYPOS = 0x00000002 }
132 enum : uint { ABM_SETPOS = 0x00000003 }
133 enum : uint { ABM_GETSTATE = 0x00000004 }
134 enum : uint { ABM_GETTASKBARPOS = 0x00000005 }
135 enum : uint { ABM_ACTIVATE = 0x00000006 }
136 enum : uint { ABM_GETAUTOHIDEBAR = 0x00000007 }
137 enum : uint { ABM_SETAUTOHIDEBAR = 0x00000008 }
138
139 enum : uint { ABM_WINDOWPOSCHANGED = 0x0000009 }
140 enum : uint { ABM_SETSTATE = 0x0000000a }
141
142 enum : uint { ABN_STATECHANGE = 0x0000000 }
143 enum : uint { ABN_POSCHANGED = 0x0000001 }
144 enum : uint { ABN_FULLSCREENAPP = 0x0000002 }
145 enum : uint { ABN_WINDOWARRANGE = 0x0000003 }
146
147 enum : uint { ABS_AUTOHIDE = 0x0000001 }
148 enum : uint { ABS_ALWAYSONTOP = 0x0000002 }
149
150 enum : uint { ABE_LEFT = 0 }
151 enum : uint { ABE_TOP = 1 }
152 enum : uint { ABE_RIGHT = 2 }
153 enum : uint { ABE_BOTTOM = 3 }
154
155 struct _AppBarData {
156 DWORD cbSize;
157 HWND hWnd;
158 UINT uCallbackMessage;
159 UINT uEdge;
160 RECT rc;
161 LPARAM lParam;
162 }
163 alias _AppBarData APPBARDATA;
164 alias _AppBarData* PAPPBARDATA;
165
166 extern(Windows) export UINT_PTR SHAppBarMessage(DWORD dwMessage, PAPPBARDATA pData);
167
168 extern(Windows) export DWORD DoEnvironmentSubstA(LPSTR szString, UINT cchString);
169 extern(Windows) export DWORD DoEnvironmentSubstW(LPWSTR szString, UINT cchString);
170 // #ifdef UNICODE
171 alias DoEnvironmentSubstW DoEnvironmentSubst;
172 // #else
173 // #...
174 // #endif // !UNICODE
175
176 // #define EIRESID(x) (-1 * (int)(x))
177 extern(Windows) export UINT ExtractIconExA(LPCSTR lpszFile, int nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIcons);
178 extern(Windows) export UINT ExtractIconExW(LPCWSTR lpszFile, int nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIcons);
179 // #ifdef UNICODE
180 alias ExtractIconExW ExtractIconEx;
181 // #else
182 // #...
183 // #endif // !UNICODE
184
185 // #ifndef FO_MOVE //these need to be kept in sync with the ones in shlobj.h
186
187 enum : uint { FO_MOVE = 0x0001 }
188 enum : uint { FO_COPY = 0x0002 }
189 enum : uint { FO_DELETE = 0x0003 }
190 enum : uint { FO_RENAME = 0x0004 }
191
192 enum : uint { FOF_MULTIDESTFILES = 0x0001 }
193 enum : uint { FOF_CONFIRMMOUSE = 0x0002 }
194 enum : uint { FOF_SILENT = 0x0004 }
195 enum : uint { FOF_RENAMEONCOLLISION = 0x0008 }
196 enum : uint { FOF_NOCONFIRMATION = 0x0010 }
197 enum : uint { FOF_WANTMAPPINGHANDLE = 0x0020 }
198
199 enum : uint { FOF_ALLOWUNDO = 0x0040 }
200 enum : uint { FOF_FILESONLY = 0x0080 }
201 enum : uint { FOF_SIMPLEPROGRESS = 0x0100 }
202 enum : uint { FOF_NOCONFIRMMKDIR = 0x0200 }
203 enum : uint { FOF_NOERRORUI = 0x0400 }
204 enum : uint { FOF_NOCOPYSECURITYATTRIBS = 0x0800 }
205 enum : uint { FOF_NORECURSION = 0x1000 }
206 // #if (_WIN32_IE >= 0x0500)
207 enum : uint { FOF_NO_CONNECTED_ELEMENTS = 0x2000 }
208 enum : uint { FOF_WANTNUKEWARNING = 0x4000 }
209 // #endif // (_WIN32_IE >= 0x500)
210 // #if (_WIN32_WINNT >= 0x0501)
211 enum : uint { FOF_NORECURSEREPARSE = 0x8000 }
212 // #endif // (_WIN32_WINNT >= 0x501)
213
214 alias WORD FILEOP_FLAGS;
215
216 enum : uint { PO_DELETE = 0x0013 }
217 enum : uint { PO_RENAME = 0x0014 }
218 enum : uint { PO_PORTCHANGE = 0x0020 }
219
220 enum : uint { PO_REN_PORT = 0x0034 }
221
222 alias WORD PRINTEROP_FLAGS;
223
224 // #endif // FO_MOVE
225
226 struct _SHFILEOPSTRUCTA {
227 HWND hwnd;
228 UINT wFunc;
229 LPCSTR pFrom;
230 LPCSTR pTo;
231 FILEOP_FLAGS fFlags;
232 BOOL fAnyOperationsAborted;
233 LPVOID hNameMappings;
234 LPCSTR lpszProgressTitle;
235 }
236 alias _SHFILEOPSTRUCTA SHFILEOPSTRUCTA;
237 alias _SHFILEOPSTRUCTA* LPSHFILEOPSTRUCTA;
238
239 struct _SHFILEOPSTRUCTW {
240 HWND hwnd;
241 UINT wFunc;
242 LPCWSTR pFrom;
243 LPCWSTR pTo;
244 FILEOP_FLAGS fFlags;
245 BOOL fAnyOperationsAborted;
246 LPVOID hNameMappings;
247 LPCWSTR lpszProgressTitle;
248 }
249 alias _SHFILEOPSTRUCTW SHFILEOPSTRUCTW;
250 alias _SHFILEOPSTRUCTW* LPSHFILEOPSTRUCTW;
251
252 // #ifdef UNICODE
253 alias SHFILEOPSTRUCTW SHFILEOPSTRUCT;
254 alias LPSHFILEOPSTRUCTW LPSHFILEOPSTRUCT;
255 // #else
256 // ...
257 // #endif // UNICODE
258
259 extern(Windows) export int SHFileOperationA(LPSHFILEOPSTRUCTA lpFileOp);
260 extern(Windows) export int SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp);
261 // #ifdef UNICODE
262 alias SHFileOperationW SHFileOperation;
263 // #else
264 // #...
265 // #endif // !UNICODE
266 extern(Windows) export void SHFreeNameMappings(HANDLE hNameMappings);
267
268 struct _SHNAMEMAPPINGA {
269 LPSTR pszOldPath;
270 LPSTR pszNewPath;
271 int cchOldPath;
272 int cchNewPath;
273 }
274 alias _SHNAMEMAPPINGA SHNAMEMAPPINGA;
275 alias _SHNAMEMAPPINGA* LPSHNAMEMAPPINGA;
276
277 struct _SHNAMEMAPPINGW {
278 LPWSTR pszOldPath;
279 LPWSTR pszNewPath;
280 int cchOldPath;
281 int cchNewPath;
282 }
283 alias _SHNAMEMAPPINGW SHNAMEMAPPINGW;
284 alias _SHNAMEMAPPINGW* LPSHNAMEMAPPINGW;
285
286 // #ifdef UNICODE
287 alias SHNAMEMAPPINGW SHNAMEMAPPING;
288 alias LPSHNAMEMAPPINGW LPSHNAMEMAPPING;
289 // #else
290 // ...
291 // #endif // UNICODE
292
293 enum : uint { SE_ERR_FNF = 2 }
294 enum : uint { SE_ERR_PNF = 3 }
295 enum : uint { SE_ERR_ACCESSDENIED = 5 }
296 enum : uint { SE_ERR_OOM = 8 }
297 enum : uint { SE_ERR_DLLNOTFOUND = 32 }
298
299 // #endif /* WINVER >= 0x0400 */
300
301 enum : uint { SE_ERR_SHARE = 26 }
302 enum : uint { SE_ERR_ASSOCINCOMPLETE = 27 }
303 enum : uint { SE_ERR_DDETIMEOUT = 28 }
304 enum : uint { SE_ERR_DDEFAIL = 29 }
305 enum : uint { SE_ERR_DDEBUSY = 30 }
306 enum : uint { SE_ERR_NOASSOC = 31 }
307
308 // #if(WINVER >= 0x0400)
309
310 enum : uint { SEE_MASK_CLASSNAME = 0x00000001 }
311 enum : uint { SEE_MASK_CLASSKEY = 0x00000003 }
312
313 enum : uint { SEE_MASK_IDLIST = 0x00000004 }
314 enum : uint { SEE_MASK_INVOKEIDLIST = 0x0000000c }
315 enum : uint { SEE_MASK_ICON = 0x00000010 }
316 enum : uint { SEE_MASK_HOTKEY = 0x00000020 }
317 enum : uint { SEE_MASK_NOCLOSEPROCESS = 0x00000040 }
318 enum : uint { SEE_MASK_CONNECTNETDRV = 0x00000080 }
319 enum : uint { SEE_MASK_FLAG_DDEWAIT = 0x00000100 }
320 enum : uint { SEE_MASK_DOENVSUBST = 0x00000200 }
321 enum : uint { SEE_MASK_FLAG_NO_UI = 0x00000400 }
322 enum : uint { SEE_MASK_UNICODE = 0x00004000 }
323 enum : uint { SEE_MASK_NO_CONSOLE = 0x00008000 }
324 enum : uint { SEE_MASK_ASYNCOK = 0x00100000 }
325 enum : uint { SEE_MASK_HMONITOR = 0x00200000 }
326 // #if (_WIN32_IE >= 0x0500)
327 enum : uint { SEE_MASK_NOQUERYCLASSSTORE = 0x01000000 }
328 enum : uint { SEE_MASK_WAITFORINPUTIDLE = 0x02000000 }
329 // #endif // (_WIN32_IE >= 0x500)
330 // #if (_WIN32_IE >= 0x0560)
331 enum : uint { SEE_MASK_FLAG_LOG_USAGE = 0x04000000 }
332 // #endif // (_WIN32_IE >= 0x560)
333
334 // #ifndef DUMMYUNIONNAME
335 // #ifdef NONAMELESSUNION
336 // #...
337 // #...
338 // #...
339 // #...
340 // #...
341 // #else
342 // #define DUMMYUNIONNAME
343 // #define DUMMYUNIONNAME2
344 // #define DUMMYUNIONNAME3
345 // #define DUMMYUNIONNAME4
346 // #define DUMMYUNIONNAME5
347 // #endif
348 // #endif // DUMMYUNIONNAME
349
350 struct _SHELLEXECUTEINFOA {
351 DWORD cbSize;
352 ULONG fMask;
353 HWND hwnd;
354 LPCSTR lpVerb;
355 LPCSTR lpFile;
356 LPCSTR lpParameters;
357 LPCSTR lpDirectory;
358 int nShow;
359 HINSTANCE hInstApp;
360
361 LPVOID lpIDList;
362 LPCSTR lpClass;
363 HKEY hkeyClass;
364 DWORD dwHotKey;
365 union {
366 HANDLE hIcon;
367 HANDLE hMonitor;
368 }
369
370 HANDLE hProcess;
371 }
372 alias _SHELLEXECUTEINFOA SHELLEXECUTEINFOA;
373 alias _SHELLEXECUTEINFOA* LPSHELLEXECUTEINFOA;
374
375 struct _SHELLEXECUTEINFOW {
376 DWORD cbSize;
377 ULONG fMask;
378 HWND hwnd;
379 LPCWSTR lpVerb;
380 LPCWSTR lpFile;
381 LPCWSTR lpParameters;
382 LPCWSTR lpDirectory;
383 int nShow;
384 HINSTANCE hInstApp;
385
386 LPVOID lpIDList;
387 LPCWSTR lpClass;
388 HKEY hkeyClass;
389 DWORD dwHotKey;
390 union {
391 HANDLE hIcon;
392 HANDLE hMonitor;
393 }
394
395 HANDLE hProcess;
396 }
397 alias _SHELLEXECUTEINFOW SHELLEXECUTEINFOW;
398 alias _SHELLEXECUTEINFOW* LPSHELLEXECUTEINFOW;
399
400 // #ifdef UNICODE
401 alias SHELLEXECUTEINFOW SHELLEXECUTEINFO;
402 alias LPSHELLEXECUTEINFOW LPSHELLEXECUTEINFO;
403 // #else
404 // ...
405 // #endif // UNICODE
406
407 extern(Windows) export BOOL ShellExecuteExA(LPSHELLEXECUTEINFOA lpExecInfo);
408 extern(Windows) export BOOL ShellExecuteExW(LPSHELLEXECUTEINFOW lpExecInfo);
409 // #ifdef UNICODE
410 alias ShellExecuteExW ShellExecuteEx;
411 // #else
412 // #...
413 // #endif // !UNICODE
414 extern(Windows) export void WinExecErrorA(HWND hwnd, int error, LPCSTR lpstrFileName, LPCSTR lpstrTitle);
415 extern(Windows) export void WinExecErrorW(HWND hwnd, int error, LPCWSTR lpstrFileName, LPCWSTR lpstrTitle);
416 // #ifdef UNICODE
417 alias WinExecErrorW WinExecError;
418 // #else
419 // #...
420 // #endif // !UNICODE
421
422 struct _SHCREATEPROCESSINFOW {
423 DWORD cbSize;
424 ULONG fMask;
425 HWND hwnd;
426 LPCWSTR pszFile;
427 LPCWSTR pszParameters;
428 LPCWSTR pszCurrentDirectory;
429 HANDLE hUserToken;
430 LPSECURITY_ATTRIBUTES lpProcessAttributes;
431 LPSECURITY_ATTRIBUTES lpThreadAttributes;
432 BOOL bInheritHandles;
433 DWORD dwCreationFlags;
434 LPSTARTUPINFOW lpStartupInfo;
435 LPPROCESS_INFORMATION lpProcessInformation;
436 }
437 alias _SHCREATEPROCESSINFOW SHCREATEPROCESSINFOW;
438 alias _SHCREATEPROCESSINFOW* PSHCREATEPROCESSINFOW;
439
440 extern(Windows) export BOOL SHCreateProcessAsUserW(PSHCREATEPROCESSINFOW pscpi);
441
442 struct _SHQUERYRBINFO {
443 DWORD cbSize;
444 // #if !defined(_MAC) || defined(_MAC_INT_64)
445 __int64 i64Size;
446 __int64 i64NumItems;
447 // #else
448 // ...
449 // #endif
450 }
451 alias _SHQUERYRBINFO SHQUERYRBINFO;
452 alias _SHQUERYRBINFO* LPSHQUERYRBINFO;
453
454 enum : uint { SHERB_NOCONFIRMATION = 0x00000001 }
455 enum : uint { SHERB_NOPROGRESSUI = 0x00000002 }
456 enum : uint { SHERB_NOSOUND = 0x00000004 }
457
458 extern(Windows) export HRESULT SHQueryRecycleBinA(LPCSTR pszRootPath, LPSHQUERYRBINFO pSHQueryRBInfo);
459 extern(Windows) export HRESULT SHQueryRecycleBinW(LPCWSTR pszRootPath, LPSHQUERYRBINFO pSHQueryRBInfo);
460 // #ifdef UNICODE
461 alias SHQueryRecycleBinW SHQueryRecycleBin;
462 // #else
463 // #...
464 // #endif // !UNICODE
465 extern(Windows) export HRESULT SHEmptyRecycleBinA(HWND hwnd, LPCSTR pszRootPath, DWORD dwFlags);
466 extern(Windows) export HRESULT SHEmptyRecycleBinW(HWND hwnd, LPCWSTR pszRootPath, DWORD dwFlags);
467 // #ifdef UNICODE
468 alias SHEmptyRecycleBinW SHEmptyRecycleBin;
469 // #else
470 // #...
471 // #endif // !UNICODE
472
473 struct _NOTIFYICONDATAA {
474 DWORD cbSize;
475 HWND hWnd;
476 UINT uID;
477 UINT uFlags;
478 UINT uCallbackMessage;
479 HICON hIcon;
480 // #if (_WIN32_IE < 0x0500)
481 // ...
482 // #else
483 CHAR szTip[128];
484 // #endif
485 // #if (_WIN32_IE >= 0x0500)
486 DWORD dwState;
487 DWORD dwStateMask;
488 CHAR szInfo[256];
489 union {
490 UINT uTimeout;
491 UINT uVersion;
492 }
493
494 CHAR szInfoTitle[64];
495 DWORD dwInfoFlags;
496 // #endif
497 // #if (_WIN32_IE >= 0x600)
498 GUID guidItem;
499 // #endif
500 }
501 alias _NOTIFYICONDATAA NOTIFYICONDATAA;
502 alias _NOTIFYICONDATAA* PNOTIFYICONDATAA;
503
504 struct _NOTIFYICONDATAW {
505 DWORD cbSize;
506 HWND hWnd;
507 UINT uID;
508 UINT uFlags;
509 UINT uCallbackMessage;
510 HICON hIcon;
511 // #if (_WIN32_IE < 0x0500)
512 // ...
513 // #else
514 WCHAR szTip[128];
515 // #endif
516 // #if (_WIN32_IE >= 0x0500)
517 DWORD dwState;
518 DWORD dwStateMask;
519 WCHAR szInfo[256];
520 union {
521 UINT uTimeout;
522 UINT uVersion;
523 }
524
525 WCHAR szInfoTitle[64];
526 DWORD dwInfoFlags;
527 // #endif
528 // #if (_WIN32_IE >= 0x600)
529 GUID guidItem;
530 // #endif
531 }
532 alias _NOTIFYICONDATAW NOTIFYICONDATAW;
533 alias _NOTIFYICONDATAW* PNOTIFYICONDATAW;
534
535 // #ifdef UNICODE
536 alias NOTIFYICONDATAW NOTIFYICONDATA;
537 alias PNOTIFYICONDATAW PNOTIFYICONDATA;
538 // #else
539 // ...
540 // #endif // UNICODE
541
542 // #define NOTIFYICONDATAA_V1_SIZE FIELD_OFFSET(NOTIFYICONDATAA, szTip[64])
543 // #define NOTIFYICONDATAW_V1_SIZE FIELD_OFFSET(NOTIFYICONDATAW, szTip[64])
544 // #ifdef UNICODE
545 // #define NOTIFYICONDATA_V1_SIZE NOTIFYICONDATAW_V1_SIZE
546 // #else
547 // #...
548 // #endif
549
550 // #define NOTIFYICONDATAA_V2_SIZE FIELD_OFFSET(NOTIFYICONDATAA, guidItem)
551 // #define NOTIFYICONDATAW_V2_SIZE FIELD_OFFSET(NOTIFYICONDATAW, guidItem)
552 // #ifdef UNICODE
553 // #define NOTIFYICONDATA_V2_SIZE NOTIFYICONDATAW_V2_SIZE
554 // #else
555 // #...
556 // #endif
557
558 // #if (_WIN32_IE >= 0x0500)
559 const uint NIN_SELECT = WM_USER + 0;
560 enum : uint { NINF_KEY = 0x1 }
561 const uint NIN_KEYSELECT = NIN_SELECT | NINF_KEY;
562 // #endif
563
564 // #if (_WIN32_IE >= 0x0501)
565 const uint NIN_BALLOONSHOW = WM_USER + 2;
566 const uint NIN_BALLOONHIDE = WM_USER + 3;
567 const uint NIN_BALLOONTIMEOUT = WM_USER + 4;
568 const uint NIN_BALLOONUSERCLICK = WM_USER + 5;
569 // #endif
570
571 enum : uint { NIM_ADD = 0x00000000 }
572 enum : uint { NIM_MODIFY = 0x00000001 }
573 enum : uint { NIM_DELETE = 0x00000002 }
574 // #if (_WIN32_IE >= 0x0500)
575 enum : uint { NIM_SETFOCUS = 0x00000003 }
576 enum : uint { NIM_SETVERSION = 0x00000004 }
577 enum : uint { NOTIFYICON_VERSION = 3 }
578 // #endif
579
580 enum : uint { NIF_MESSAGE = 0x00000001 }
581 enum : uint { NIF_ICON = 0x00000002 }
582 enum : uint { NIF_TIP = 0x00000004 }
583 // #if (_WIN32_IE >= 0x0500)
584 enum : uint { NIF_STATE = 0x00000008 }
585 enum : uint { NIF_INFO = 0x00000010 }
586 // #endif
587 // #if (_WIN32_IE >= 0x600)
588 enum : uint { NIF_GUID = 0x00000020 }
589 // #endif
590
591 // #if (_WIN32_IE >= 0x0500)
592 enum : uint { NIS_HIDDEN = 0x00000001 }
593 enum : uint { NIS_SHAREDICON = 0x00000002 }
594
595 enum : uint { NIIF_NONE = 0x00000000 }
596
597 enum : uint { NIIF_INFO = 0x00000001 }
598 enum : uint { NIIF_WARNING = 0x00000002 }
599 enum : uint { NIIF_ERROR = 0x00000003 }
600 enum : uint { NIIF_ICON_MASK = 0x0000000F }
601 // #if (_WIN32_IE >= 0x0501)
602 enum : uint { NIIF_NOSOUND = 0x00000010 }
603 // #endif
604 // #endif
605
606 extern(Windows) export BOOL Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA lpData);
607 extern(Windows) export BOOL Shell_NotifyIconW(DWORD dwMessage, PNOTIFYICONDATAW lpData);
608 // #ifdef UNICODE
609 alias Shell_NotifyIconW Shell_NotifyIcon;
610 // #else
611 // #...
612 // #endif // !UNICODE
613
614 // #ifndef SHFILEINFO_DEFINED
615 // #define SHFILEINFO_DEFINED
616
617 struct _SHFILEINFOA {
618 HICON hIcon;
619 int iIcon;
620 DWORD dwAttributes;
621 CHAR szDisplayName[MAX_PATH];
622 CHAR szTypeName[80];
623 }
624 alias _SHFILEINFOA SHFILEINFOA;
625
626 struct _SHFILEINFOW {
627 HICON hIcon;
628 int iIcon;
629 DWORD dwAttributes;
630 WCHAR szDisplayName[MAX_PATH];
631 WCHAR szTypeName[80];
632 }
633 alias _SHFILEINFOW SHFILEINFOW;
634
635 // #ifdef UNICODE
636 alias SHFILEINFOW SHFILEINFO;
637 // #else
638 // ...
639 // #endif // UNICODE
640
641 // #endif // !SHFILEINFO_DEFINED
642
643 enum : uint { SHGFI_ICON = 0x000000100 }
644 enum : uint { SHGFI_DISPLAYNAME = 0x000000200 }
645 enum : uint { SHGFI_TYPENAME = 0x000000400 }
646 enum : uint { SHGFI_ATTRIBUTES = 0x000000800 }
647 enum : uint { SHGFI_ICONLOCATION = 0x000001000 }
648 enum : uint { SHGFI_EXETYPE = 0x000002000 }
649 enum : uint { SHGFI_SYSICONINDEX = 0x000004000 }
650 enum : uint { SHGFI_LINKOVERLAY = 0x000008000 }
651 enum : uint { SHGFI_SELECTED = 0x000010000 }
652 enum : uint { SHGFI_ATTR_SPECIFIED = 0x000020000 }
653 enum : uint { SHGFI_LARGEICON = 0x000000000 }
654 enum : uint { SHGFI_SMALLICON = 0x000000001 }
655 enum : uint { SHGFI_OPENICON = 0x000000002 }
656 enum : uint { SHGFI_SHELLICONSIZE = 0x000000004 }
657 enum : uint { SHGFI_PIDL = 0x000000008 }
658 enum : uint { SHGFI_USEFILEATTRIBUTES = 0x000000010 }
659
660 // #if (_WIN32_IE >= 0x0500)
661 enum : uint { SHGFI_ADDOVERLAYS = 0x000000020 }
662 enum : uint { SHGFI_OVERLAYINDEX = 0x000000040 }
663
664 // #endif
665
666 extern(Windows) export DWORD_PTR SHGetFileInfoA(LPCSTR pszPath, DWORD dwFileAttributes, SHFILEINFOA *psfi, UINT cbFileInfo, UINT uFlags);
667 extern(Windows) export DWORD_PTR SHGetFileInfoW(LPCWSTR pszPath, DWORD dwFileAttributes, SHFILEINFOW *psfi, UINT cbFileInfo, UINT uFlags);
668 // #ifdef UNICODE
669 alias SHGetFileInfoW SHGetFileInfo;
670 // #else
671 // #...
672 // #endif // !UNICODE
673
674 alias SHGetDiskFreeSpaceEx SHGetDiskFreeSpace;
675
676 extern(Windows) export BOOL SHGetDiskFreeSpaceExA(LPCSTR pszDirectoryName, ULARGE_INTEGER* pulFreeBytesAvailableToCaller, ULARGE_INTEGER* pulTotalNumberOfBytes, ULARGE_INTEGER* pulTotalNumberOfFreeBytes);
677 extern(Windows) export BOOL SHGetDiskFreeSpaceExW(LPCWSTR pszDirectoryName, ULARGE_INTEGER* pulFreeBytesAvailableToCaller, ULARGE_INTEGER* pulTotalNumberOfBytes, ULARGE_INTEGER* pulTotalNumberOfFreeBytes);
678 // #ifdef UNICODE
679 alias SHGetDiskFreeSpaceExW SHGetDiskFreeSpaceEx;
680 // #else
681 // #...
682 // #endif // !UNICODE
683 extern(Windows) export BOOL SHGetNewLinkInfoA(LPCSTR pszLinkTo, LPCSTR pszDir, LPSTR pszName, BOOL *pfMustCopy, UINT uFlags);
684 extern(Windows) export BOOL SHGetNewLinkInfoW(LPCWSTR pszLinkTo, LPCWSTR pszDir, LPWSTR pszName, BOOL *pfMustCopy, UINT uFlags);
685 // #ifdef UNICODE
686 alias SHGetNewLinkInfoW SHGetNewLinkInfo;
687 // #else
688 // #...
689 // #endif // !UNICODE
690
691 enum : uint { SHGNLI_PIDL = 0x000000001 }
692 enum : uint { SHGNLI_PREFIXNAME = 0x000000002 }
693 enum : uint { SHGNLI_NOUNIQUE = 0x000000004 }
694 // #if (_WIN32_IE >= 0x0501)
695 enum : uint { SHGNLI_NOLNK = 0x000000008 }
696 // #endif // _WIN2_IE >= 0x0501
697
698 enum : uint { PRINTACTION_OPEN = 0 }
699 enum : uint { PRINTACTION_PROPERTIES = 1 }
700 enum : uint { PRINTACTION_NETINSTALL = 2 }
701 enum : uint { PRINTACTION_NETINSTALLLINK = 3 }
702 enum : uint { PRINTACTION_TESTPAGE = 4 }
703 enum : uint { PRINTACTION_OPENNETPRN = 5 }
704 // #ifdef WINNT
705 // #...
706 // #...
707 // #endif
708
709 extern(Windows) export BOOL SHInvokePrinterCommandA(HWND hwnd, UINT uAction, LPCSTR lpBuf1, LPCSTR lpBuf2, BOOL fModal);
710 extern(Windows) export BOOL SHInvokePrinterCommandW(HWND hwnd, UINT uAction, LPCWSTR lpBuf1, LPCWSTR lpBuf2, BOOL fModal);
711 // #ifdef UNICODE
712 alias SHInvokePrinterCommandW SHInvokePrinterCommand;
713 // #else
714 // #...
715 // #endif // !UNICODE
716
717 // #endif /* WINVER >= 0x0400 */
718
719 // #if (_WIN32_WINNT >= 0x0500) || (_WIN32_WINDOWS >= 0x0500)
720
721 extern(Windows) export HRESULT SHLoadNonloadedIconOverlayIdentifiers();
722
723 extern(Windows) export HRESULT SHIsFileAvailableOffline(LPCWSTR pwszPath, LPDWORD pdwStatus);
724
725 enum : uint { OFFLINE_STATUS_LOCAL = 0x0001 }
726 enum : uint { OFFLINE_STATUS_REMOTE = 0x0002 }
727 enum : uint { OFFLINE_STATUS_INCOMPLETE = 0x0004 }
728
729 // #endif
730
731 extern(Windows) export HRESULT SHSetLocalizedName(LPWSTR pszPath, LPCWSTR pszResModule, int idsRes);
732
733 // #if _WIN32_IE >= 0x0600
734
735 extern(Windows) export HRESULT SHEnumerateUnreadMailAccountsA(HKEY hKeyUser, DWORD dwIndex, LPSTR pszMailAddress, int cchMailAddress);
736 extern(Windows) export HRESULT SHEnumerateUnreadMailAccountsW(HKEY hKeyUser, DWORD dwIndex, LPWSTR pszMailAddress, int cchMailAddress);
737 // #ifdef UNICODE
738 alias SHEnumerateUnreadMailAccountsW SHEnumerateUnreadMailAccounts;
739 // #else
740 // #...
741 // #endif // !UNICODE
742 extern(Windows) export HRESULT SHGetUnreadMailCountA(HKEY hKeyUser, LPCSTR pszMailAddress, DWORD *pdwCount, FILETIME *pFileTime, LPSTR pszShellExecuteCommand, int cchShellExecuteCommand);
743 extern(Windows) export HRESULT SHGetUnreadMailCountW(HKEY hKeyUser, LPCWSTR pszMailAddress, DWORD *pdwCount, FILETIME *pFileTime, LPWSTR pszShellExecuteCommand, int cchShellExecuteCommand);
744 // #ifdef UNICODE
745 alias SHGetUnreadMailCountW SHGetUnreadMailCount;
746 // #else
747 // #...
748 // #endif // !UNICODE
749 extern(Windows) export HRESULT SHSetUnreadMailCountA(LPCSTR pszMailAddress, DWORD dwCount, LPCSTR pszShellExecuteCommand);
750 extern(Windows) export HRESULT SHSetUnreadMailCountW(LPCWSTR pszMailAddress, DWORD dwCount, LPCWSTR pszShellExecuteCommand);
751 // #ifdef UNICODE
752 alias SHSetUnreadMailCountW SHSetUnreadMailCount;
753 // #else
754 // #...
755 // #endif // !UNICODE
756
757 // #endif /* _WIN32_IE >= 0x0600 */
758
759 // #if _WIN32_IE >= 0x0600
760
761 extern(Windows) export HRESULT SHGetImageList(int iImageList, REFIID riid, void **ppvObj);
762
763 enum : uint { SHIL_LARGE = 0 }
764 enum : uint { SHIL_SMALL = 1 }
765 enum : uint { SHIL_EXTRALARGE = 2 }
766 enum : uint { SHIL_SYSSMALL = 3 }
767
768 alias SHIL_SYSSMALL SHIL_LAST;
769
770 extern(Windows) alias HRESULT function( LPCWSTR pszPath) PFNCANSHAREFOLDERW;
771 extern(Windows) alias HRESULT function( HWND hwndParent, LPCWSTR pszPath) PFNSHOWSHAREFOLDERUIW;
772
773 // #endif /* _WIN32_IE >= 0x0600 */
774
775 // #ifdef __cplusplus
776 // }
777 // #endif /* __cplusplus */
778
779 // #if !defined(_WIN64)
780 align:
781 // #endif
782
783 // #endif /* _INC_SHELLAPI */
784