source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/shellapi.h@ 1181

Last change on this file since 1181 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 26.6 KB
RevLine 
[1166]1/**
2 * This file is part of the mingw-w64 runtime package.
3 * No warranty is given; refer to the file DISCLAIMER within this package.
4 */
5#include <winapifamily.h>
6
7#ifndef _INC_SHELLAPI
8#define _INC_SHELLAPI
9
10#include <_mingw_unicode.h>
11#include <specstrings.h>
12
13#ifndef WINSHELLAPI
14#ifndef _SHELL32_
15#define WINSHELLAPI DECLSPEC_IMPORT
16#else
17#define WINSHELLAPI
18#endif
19#endif
20
21#ifndef SHSTDAPI
22#ifndef _SHELL32_
23#ifdef __cplusplus
24#define SHSTDAPI EXTERN_C DECLSPEC_IMPORT HRESULT STDAPICALLTYPE
25#define SHSTDAPI_(type) EXTERN_C DECLSPEC_IMPORT type STDAPICALLTYPE
26#else
27#define SHSTDAPI DECLSPEC_IMPORT HRESULT STDAPICALLTYPE
28#define SHSTDAPI_(type) DECLSPEC_IMPORT type STDAPICALLTYPE
29#endif
30#else
31#define SHSTDAPI STDAPI
32#define SHSTDAPI_(type) STDAPI_(type)
33#endif
34#endif
35
36#ifndef SHDOCAPI
37#ifndef _SHDOCVW_
38#ifdef __cplusplus
39#define SHDOCAPI EXTERN_C DECLSPEC_IMPORT HRESULT STDAPICALLTYPE
40#define SHDOCAPI_(type) EXTERN_C DECLSPEC_IMPORT type STDAPICALLTYPE
41#else
42#define SHDOCAPI DECLSPEC_IMPORT HRESULT STDAPICALLTYPE
43#define SHDOCAPI_(type) DECLSPEC_IMPORT type STDAPICALLTYPE
44#endif
45#else
46#define SHDOCAPI STDAPI
47#define SHDOCAPI_(type) STDAPI_(type)
48#endif
49#endif
50
51#ifndef _WIN64
52#include <pshpack1.h>
53#endif
54
55#ifdef __cplusplus
56extern "C" {
57#endif
58
59#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
60 DECLARE_HANDLE (HDROP);
61
62#define DragQueryFile __MINGW_NAME_AW(DragQueryFile)
63#define ShellExecute __MINGW_NAME_AW(ShellExecute)
64#define FindExecutable __MINGW_NAME_AW(FindExecutable)
65#define ShellAbout __MINGW_NAME_AW(ShellAbout)
66#define ExtractAssociatedIcon __MINGW_NAME_AW(ExtractAssociatedIcon)
67#define ExtractAssociatedIconEx __MINGW_NAME_AW(ExtractAssociatedIconEx)
68#define ExtractIcon __MINGW_NAME_AW(ExtractIcon)
69
70 SHSTDAPI_(UINT) DragQueryFileA (HDROP hDrop, UINT iFile, LPSTR lpszFile, UINT cch);
71 SHSTDAPI_(UINT) DragQueryFileW (HDROP hDrop, UINT iFile, LPWSTR lpszFile, UINT cch);
72 SHSTDAPI_(WINBOOL) DragQueryPoint (HDROP hDrop, POINT *ppt);
73 SHSTDAPI_(void) DragFinish (HDROP hDrop);
74 SHSTDAPI_(void) DragAcceptFiles (HWND hWnd, WINBOOL fAccept);
75 SHSTDAPI_(HINSTANCE) ShellExecuteA (HWND hwnd, LPCSTR lpOperation, LPCSTR lpFile, LPCSTR lpParameters, LPCSTR lpDirectory, INT nShowCmd);
76 SHSTDAPI_(HINSTANCE) ShellExecuteW (HWND hwnd, LPCWSTR lpOperation, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd);
77 SHSTDAPI_(HINSTANCE) FindExecutableA (LPCSTR lpFile, LPCSTR lpDirectory, LPSTR lpResult);
78 SHSTDAPI_(HINSTANCE) FindExecutableW (LPCWSTR lpFile, LPCWSTR lpDirectory, LPWSTR lpResult);
79 SHSTDAPI_(INT) ShellAboutA (HWND hWnd, LPCSTR szApp, LPCSTR szOtherStuff, HICON hIcon);
80 SHSTDAPI_(INT) ShellAboutW (HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, HICON hIcon);
81 SHSTDAPI_(HICON) DuplicateIcon (HINSTANCE hInst, HICON hIcon);
82 SHSTDAPI_(HICON) ExtractAssociatedIconA (HINSTANCE hInst, LPSTR pszIconPath, WORD *piIcon);
83 SHSTDAPI_(HICON) ExtractAssociatedIconW (HINSTANCE hInst, LPWSTR pszIconPath, WORD *piIcon);
84 SHSTDAPI_(HICON) ExtractAssociatedIconExA (HINSTANCE hInst, LPSTR pszIconPath, WORD *piIconIndex, WORD *piIconId);
85 SHSTDAPI_(HICON) ExtractAssociatedIconExW (HINSTANCE hInst, LPWSTR pszIconPath, WORD *piIconIndex, WORD *piIconId);
86 SHSTDAPI_(HICON) ExtractIconA (HINSTANCE hInst, LPCSTR pszExeFileName, UINT nIconIndex);
87 SHSTDAPI_(HICON) ExtractIconW (HINSTANCE hInst, LPCWSTR pszExeFileName, UINT nIconIndex);
88
89 typedef struct _DRAGINFOA {
90 UINT uSize;
91 POINT pt;
92 WINBOOL fNC;
93 LPSTR lpFileList;
94 DWORD grfKeyState;
95 } DRAGINFOA,*LPDRAGINFOA;
96
97 typedef struct _DRAGINFOW {
98 UINT uSize;
99 POINT pt;
100 WINBOOL fNC;
101 LPWSTR lpFileList;
102 DWORD grfKeyState;
103 } DRAGINFOW,*LPDRAGINFOW;
104
105 __MINGW_TYPEDEF_AW(DRAGINFO)
106 __MINGW_TYPEDEF_AW(LPDRAGINFO)
107
108#define ABM_NEW 0x00000000
109#define ABM_REMOVE 0x00000001
110#define ABM_QUERYPOS 0x00000002
111#define ABM_SETPOS 0x00000003
112#define ABM_GETSTATE 0x00000004
113#define ABM_GETTASKBARPOS 0x00000005
114#define ABM_ACTIVATE 0x00000006
115#define ABM_GETAUTOHIDEBAR 0x00000007
116#define ABM_SETAUTOHIDEBAR 0x00000008
117
118#define ABM_WINDOWPOSCHANGED 0x0000009
119#define ABM_SETSTATE 0x0000000a
120#if NTDDI_VERSION >= 0x06020000
121#define ABM_GETAUTOHIDEBAREX 0x0000000b
122#define ABM_SETAUTOHIDEBAREX 0x0000000c
123#endif
124
125#define ABN_STATECHANGE 0x0000000
126#define ABN_POSCHANGED 0x0000001
127#define ABN_FULLSCREENAPP 0x0000002
128#define ABN_WINDOWARRANGE 0x0000003
129
130#define ABS_AUTOHIDE 0x0000001
131#define ABS_ALWAYSONTOP 0x0000002
132
133#define ABE_LEFT 0
134#define ABE_TOP 1
135#define ABE_RIGHT 2
136#define ABE_BOTTOM 3
137
138 typedef struct _AppBarData {
139 DWORD cbSize;
140 HWND hWnd;
141 UINT uCallbackMessage;
142 UINT uEdge;
143 RECT rc;
144 LPARAM lParam;
145 } APPBARDATA,*PAPPBARDATA;
146
147 SHSTDAPI_(UINT_PTR) SHAppBarMessage (DWORD dwMessage, PAPPBARDATA pData);
148 SHSTDAPI_(DWORD) DoEnvironmentSubstA (LPSTR pszSrc, UINT cchSrc);
149 SHSTDAPI_(DWORD) DoEnvironmentSubstW (LPWSTR pszSrc, UINT cchSrc);
150 SHSTDAPI_(UINT) ExtractIconExA (LPCSTR lpszFile, int nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIcons);
151 SHSTDAPI_(UINT) ExtractIconExW (LPCWSTR lpszFile, int nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIcons);
152
153#define DoEnvironmentSubst __MINGW_NAME_AW(DoEnvironmentSubst)
154#define ExtractIconEx __MINGW_NAME_AW(ExtractIconEx)
155
156#define EIRESID(x) (-1 * (int)(x))
157
158#define FO_MOVE 0x1
159#define FO_COPY 0x2
160#define FO_DELETE 0x3
161#define FO_RENAME 0x4
162
163#define FOF_MULTIDESTFILES 0x1
164#define FOF_CONFIRMMOUSE 0x2
165#define FOF_SILENT 0x4
166#define FOF_RENAMEONCOLLISION 0x8
167#define FOF_NOCONFIRMATION 0x10
168#define FOF_WANTMAPPINGHANDLE 0x20
169#define FOF_ALLOWUNDO 0x40
170#define FOF_FILESONLY 0x80
171#define FOF_SIMPLEPROGRESS 0x100
172#define FOF_NOCONFIRMMKDIR 0x200
173#define FOF_NOERRORUI 0x400
174#define FOF_NOCOPYSECURITYATTRIBS 0x800
175#define FOF_NORECURSION 0x1000
176#define FOF_NO_CONNECTED_ELEMENTS 0x2000
177#define FOF_WANTNUKEWARNING 0x4000
178#define FOF_NORECURSEREPARSE 0x8000
179
180#define FOF_NO_UI (FOF_SILENT | FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_NOCONFIRMMKDIR)
181
182 typedef WORD FILEOP_FLAGS;
183
184#define PO_DELETE 0x0013
185#define PO_RENAME 0x0014
186#define PO_PORTCHANGE 0x0020
187
188#define PO_REN_PORT 0x0034
189
190 typedef WORD PRINTEROP_FLAGS;
191
192 typedef struct _SHFILEOPSTRUCTA {
193 HWND hwnd;
194 UINT wFunc;
195 LPCSTR pFrom;
196 LPCSTR pTo;
197 FILEOP_FLAGS fFlags;
198 WINBOOL fAnyOperationsAborted;
199 LPVOID hNameMappings;
200 PCSTR lpszProgressTitle;
201 } SHFILEOPSTRUCTA,*LPSHFILEOPSTRUCTA;
202
203 typedef struct _SHFILEOPSTRUCTW {
204 HWND hwnd;
205 UINT wFunc;
206 LPCWSTR pFrom;
207 LPCWSTR pTo;
208 FILEOP_FLAGS fFlags;
209 WINBOOL fAnyOperationsAborted;
210 LPVOID hNameMappings;
211 PCWSTR lpszProgressTitle;
212 } SHFILEOPSTRUCTW,*LPSHFILEOPSTRUCTW;
213
214 __MINGW_TYPEDEF_AW(SHFILEOPSTRUCT)
215 __MINGW_TYPEDEF_AW(LPSHFILEOPSTRUCT)
216
217 SHSTDAPI_(int) SHFileOperationA (LPSHFILEOPSTRUCTA lpFileOp);
218 SHSTDAPI_(int) SHFileOperationW (LPSHFILEOPSTRUCTW lpFileOp);
219
220#define SHFileOperation __MINGW_NAME_AW(SHFileOperation)
221
222 SHSTDAPI_(void) SHFreeNameMappings (HANDLE hNameMappings);
223
224 typedef struct _SHNAMEMAPPINGA {
225 LPSTR pszOldPath;
226 LPSTR pszNewPath;
227 int cchOldPath;
228 int cchNewPath;
229 } SHNAMEMAPPINGA,*LPSHNAMEMAPPINGA;
230
231 typedef struct _SHNAMEMAPPINGW {
232 LPWSTR pszOldPath;
233 LPWSTR pszNewPath;
234 int cchOldPath;
235 int cchNewPath;
236 } SHNAMEMAPPINGW,*LPSHNAMEMAPPINGW;
237
238
239 __MINGW_TYPEDEF_AW(SHNAMEMAPPING)
240 __MINGW_TYPEDEF_AW(LPSHNAMEMAPPING)
241
242#define SE_ERR_FNF 2
243#define SE_ERR_PNF 3
244#define SE_ERR_ACCESSDENIED 5
245#define SE_ERR_OOM 8
246#define SE_ERR_DLLNOTFOUND 32
247
248#define SE_ERR_SHARE 26
249#define SE_ERR_ASSOCINCOMPLETE 27
250#define SE_ERR_DDETIMEOUT 28
251#define SE_ERR_DDEFAIL 29
252#define SE_ERR_DDEBUSY 30
253#define SE_ERR_NOASSOC 31
254
255#define SEE_MASK_DEFAULT 0x0
256#define SEE_MASK_CLASSNAME 0x1
257#define SEE_MASK_CLASSKEY 0x3
258
259#define SEE_MASK_IDLIST 0x4
260#define SEE_MASK_INVOKEIDLIST 0xc
261#if NTDDI_VERSION < 0x06000000
262#define SEE_MASK_ICON 0x10
263#endif
264#define SEE_MASK_HOTKEY 0x20
265#define SEE_MASK_NOCLOSEPROCESS 0x40
266#define SEE_MASK_CONNECTNETDRV 0x80
267#define SEE_MASK_NOASYNC 0x100
268#define SEE_MASK_FLAG_DDEWAIT SEE_MASK_NOASYNC
269#define SEE_MASK_DOENVSUBST 0x200
270#define SEE_MASK_FLAG_NO_UI 0x400
271#define SEE_MASK_UNICODE 0x4000
272#define SEE_MASK_NO_CONSOLE 0x8000
273#define SEE_MASK_ASYNCOK 0x100000
274#define SEE_MASK_HMONITOR 0x200000
275#define SEE_MASK_NOZONECHECKS 0x800000
276#define SEE_MASK_NOQUERYCLASSSTORE 0x1000000
277#define SEE_MASK_WAITFORINPUTIDLE 0x2000000
278#define SEE_MASK_FLAG_LOG_USAGE 0x4000000
279#if NTDDI_VERSION >= 0x06020000
280#define SEE_MASK_FLAG_HINST_IS_SITE 0x8000000
281#endif
282
283#ifndef DUMMYUNIONNAME
284#ifdef NONAMELESSUNION
285#define DUMMYUNIONNAME u
286#define DUMMYUNIONNAME2 u2
287#define DUMMYUNIONNAME3 u3
288#define DUMMYUNIONNAME4 u4
289#define DUMMYUNIONNAME5 u5
290#else
291#define DUMMYUNIONNAME
292#define DUMMYUNIONNAME2
293#define DUMMYUNIONNAME3
294#define DUMMYUNIONNAME4
295#define DUMMYUNIONNAME5
296#endif
297#endif
298
299#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
300
301 typedef struct _SHELLEXECUTEINFOA {
302 DWORD cbSize;
303 ULONG fMask;
304 HWND hwnd;
305 LPCSTR lpVerb;
306 LPCSTR lpFile;
307 LPCSTR lpParameters;
308 LPCSTR lpDirectory;
309 int nShow;
310 HINSTANCE hInstApp;
311 void *lpIDList;
312 LPCSTR lpClass;
313 HKEY hkeyClass;
314 DWORD dwHotKey;
315 __C89_NAMELESS union {
316 HANDLE hIcon;
317 HANDLE hMonitor;
318 } DUMMYUNIONNAME;
319 HANDLE hProcess;
320 } SHELLEXECUTEINFOA,*LPSHELLEXECUTEINFOA;
321
322 typedef struct _SHELLEXECUTEINFOW {
323 DWORD cbSize;
324 ULONG fMask;
325 HWND hwnd;
326 LPCWSTR lpVerb;
327 LPCWSTR lpFile;
328 LPCWSTR lpParameters;
329 LPCWSTR lpDirectory;
330 int nShow;
331 HINSTANCE hInstApp;
332 void *lpIDList;
333 LPCWSTR lpClass;
334 HKEY hkeyClass;
335 DWORD dwHotKey;
336 __C89_NAMELESS union {
337 HANDLE hIcon;
338 HANDLE hMonitor;
339 } DUMMYUNIONNAME;
340 HANDLE hProcess;
341 } SHELLEXECUTEINFOW,*LPSHELLEXECUTEINFOW;
342
343 __MINGW_TYPEDEF_AW(SHELLEXECUTEINFO)
344 __MINGW_TYPEDEF_AW(LPSHELLEXECUTEINFO)
345
346 SHSTDAPI_(WINBOOL) ShellExecuteExA (SHELLEXECUTEINFOA *pExecInfo);
347 SHSTDAPI_(WINBOOL) ShellExecuteExW (SHELLEXECUTEINFOW *pExecInfo);
348
349#define ShellExecuteEx __MINGW_NAME_AW(ShellExecuteEx)
350
351 typedef struct _SHCREATEPROCESSINFOW {
352 DWORD cbSize;
353 ULONG fMask;
354 HWND hwnd;
355 LPCWSTR pszFile;
356 LPCWSTR pszParameters;
357 LPCWSTR pszCurrentDirectory;
358 HANDLE hUserToken;
359 LPSECURITY_ATTRIBUTES lpProcessAttributes;
360 LPSECURITY_ATTRIBUTES lpThreadAttributes;
361 WINBOOL bInheritHandles;
362 DWORD dwCreationFlags;
363 LPSTARTUPINFOW lpStartupInfo;
364 LPPROCESS_INFORMATION lpProcessInformation;
365 } SHCREATEPROCESSINFOW,*PSHCREATEPROCESSINFOW;
366
367 SHSTDAPI_(WINBOOL) SHCreateProcessAsUserW (PSHCREATEPROCESSINFOW pscpi);
368
369#if NTDDI_VERSION >= 0x06000000
370 SHSTDAPI SHEvaluateSystemCommandTemplate (PCWSTR pszCmdTemplate, PWSTR *ppszApplication, PWSTR *ppszCommandLine, PWSTR *ppszParameters);
371
372 typedef enum ASSOCCLASS {
373 ASSOCCLASS_SHELL_KEY = 0,
374 ASSOCCLASS_PROGID_KEY,
375 ASSOCCLASS_PROGID_STR,
376 ASSOCCLASS_CLSID_KEY,
377 ASSOCCLASS_CLSID_STR,
378 ASSOCCLASS_APP_KEY,
379 ASSOCCLASS_APP_STR,
380 ASSOCCLASS_SYSTEM_STR,
381 ASSOCCLASS_FOLDER,
382 ASSOCCLASS_STAR,
383#if NTDDI_VERSION >= 0x06020000
384 ASSOCCLASS_FIXED_PROGID_STR,
385 ASSOCCLASS_PROTOCOL_STR,
386#endif
387 } ASSOCCLASS;
388
389 typedef struct ASSOCIATIONELEMENT {
390 ASSOCCLASS ac;
391 HKEY hkClass;
392 PCWSTR pszClass;
393 } ASSOCIATIONELEMENT;
394
395 SHSTDAPI AssocCreateForClasses (const ASSOCIATIONELEMENT *rgClasses, ULONG cClasses, REFIID riid, void **ppv);
396#endif
397
398 typedef struct _SHQUERYRBINFO {
399 DWORD cbSize;
400 __MINGW_EXTENSION __int64 i64Size;
401 __MINGW_EXTENSION __int64 i64NumItems;
402 } SHQUERYRBINFO,*LPSHQUERYRBINFO;
403
404#define SHERB_NOCONFIRMATION 0x00000001
405#define SHERB_NOPROGRESSUI 0x00000002
406#define SHERB_NOSOUND 0x00000004
407
408 SHSTDAPI SHQueryRecycleBinA (LPCSTR pszRootPath, LPSHQUERYRBINFO pSHQueryRBInfo);
409 SHSTDAPI SHQueryRecycleBinW (LPCWSTR pszRootPath, LPSHQUERYRBINFO pSHQueryRBInfo);
410
411#define SHQueryRecycleBin __MINGW_NAME_AW(SHQueryRecycleBin)
412
413 SHSTDAPI SHEmptyRecycleBinA (HWND hwnd, LPCSTR pszRootPath, DWORD dwFlags);
414 SHSTDAPI SHEmptyRecycleBinW (HWND hwnd, LPCWSTR pszRootPath, DWORD dwFlags);
415
416#define SHEmptyRecycleBin __MINGW_NAME_AW(SHEmptyRecycleBin)
417
418#if NTDDI_VERSION >= 0x06000000
419 typedef enum {
420 QUNS_NOT_PRESENT = 1,
421 QUNS_BUSY = 2,
422 QUNS_RUNNING_D3D_FULL_SCREEN = 3,
423 QUNS_PRESENTATION_MODE = 4,
424 QUNS_ACCEPTS_NOTIFICATIONS = 5
425#if NTDDI_VERSION >= 0x06010000
426 , QUNS_QUIET_TIME = 6
427#endif
428#if NTDDI_VERSION >= 0x06020000
429 , QUNS_APP = 7
430#endif
431 } QUERY_USER_NOTIFICATION_STATE;
432
433 SHSTDAPI SHQueryUserNotificationState (QUERY_USER_NOTIFICATION_STATE *pquns);
434#endif
435
436#if NTDDI_VERSION >= 0x06010000
437 SHSTDAPI SHGetPropertyStoreForWindow (HWND hwnd, REFIID riid, void **ppv);
438#endif
439
440#endif /* WINAPI_PARTITION_DESKTOP. */
441
442 typedef struct _NOTIFYICONDATAA {
443 DWORD cbSize;
444 HWND hWnd;
445 UINT uID;
446 UINT uFlags;
447 UINT uCallbackMessage;
448 HICON hIcon;
449 CHAR szTip[128];
450 DWORD dwState;
451 DWORD dwStateMask;
452 CHAR szInfo[256];
453 __C89_NAMELESS union {
454 UINT uTimeout;
455 UINT uVersion;
456 } DUMMYUNIONNAME;
457 CHAR szInfoTitle[64];
458 DWORD dwInfoFlags;
459 GUID guidItem;
460#if NTDDI_VERSION >= 0x06000000
461 HICON hBalloonIcon;
462#endif
463 } NOTIFYICONDATAA,*PNOTIFYICONDATAA;
464
465 typedef struct _NOTIFYICONDATAW {
466 DWORD cbSize;
467 HWND hWnd;
468 UINT uID;
469 UINT uFlags;
470 UINT uCallbackMessage;
471 HICON hIcon;
472 WCHAR szTip[128];
473 DWORD dwState;
474 DWORD dwStateMask;
475 WCHAR szInfo[256];
476 __C89_NAMELESS union {
477 UINT uTimeout;
478 UINT uVersion;
479 } DUMMYUNIONNAME;
480 WCHAR szInfoTitle[64];
481 DWORD dwInfoFlags;
482 GUID guidItem;
483#if NTDDI_VERSION >= 0x06000000
484 HICON hBalloonIcon;
485#endif
486 } NOTIFYICONDATAW,*PNOTIFYICONDATAW;
487
488 __MINGW_TYPEDEF_AW(NOTIFYICONDATA)
489 __MINGW_TYPEDEF_AW(PNOTIFYICONDATA)
490
491#define NOTIFYICONDATAA_V1_SIZE FIELD_OFFSET (NOTIFYICONDATAA, szTip[64])
492#define NOTIFYICONDATAW_V1_SIZE FIELD_OFFSET (NOTIFYICONDATAW, szTip[64])
493#define NOTIFYICONDATAA_V2_SIZE FIELD_OFFSET (NOTIFYICONDATAA, guidItem)
494#define NOTIFYICONDATAW_V2_SIZE FIELD_OFFSET (NOTIFYICONDATAW, guidItem)
495#define NOTIFYICONDATAA_V3_SIZE FIELD_OFFSET (NOTIFYICONDATAA, hBalloonIcon)
496#define NOTIFYICONDATAW_V3_SIZE FIELD_OFFSET (NOTIFYICONDATAW, hBalloonIcon)
497
498#define NOTIFYICONDATA_V1_SIZE __MINGW_NAME_AW_EXT(NOTIFYICONDATA,_V1_SIZE)
499#define NOTIFYICONDATA_V2_SIZE __MINGW_NAME_AW_EXT(NOTIFYICONDATA,_V2_SIZE)
500#define NOTIFYICONDATA_V3_SIZE __MINGW_NAME_AW_EXT(NOTIFYICONDATA,_V3_SIZE)
501
502#define NIN_SELECT (WM_USER + 0)
503#define NINF_KEY 0x1
504#define NIN_KEYSELECT (NIN_SELECT | NINF_KEY)
505
506#define NIN_BALLOONSHOW (WM_USER + 2)
507#define NIN_BALLOONHIDE (WM_USER + 3)
508#define NIN_BALLOONTIMEOUT (WM_USER + 4)
509#define NIN_BALLOONUSERCLICK (WM_USER + 5)
510#if NTDDI_VERSION >= 0x06000000
511#define NIN_POPUPOPEN (WM_USER + 6)
512#define NIN_POPUPCLOSE (WM_USER + 7)
513#endif
514
515#define NIM_ADD 0x00000000
516#define NIM_MODIFY 0x00000001
517#define NIM_DELETE 0x00000002
518#define NIM_SETFOCUS 0x00000003
519#define NIM_SETVERSION 0x00000004
520
521#define NOTIFYICON_VERSION 3
522#if NTDDI_VERSION >= 0x06000000
523#define NOTIFYICON_VERSION_4 4
524#endif
525
526#define NIF_MESSAGE 0x00000001
527#define NIF_ICON 0x00000002
528#define NIF_TIP 0x00000004
529#define NIF_STATE 0x00000008
530#define NIF_INFO 0x00000010
531#if _WIN32_IE >= 0x600
532#define NIF_GUID 0x00000020
533#endif
534#if NTDDI_VERSION >= 0x06000000
535#define NIF_REALTIME 0x00000040
536#define NIF_SHOWTIP 0x00000080
537#endif
538
539#define NIS_HIDDEN 0x00000001
540#define NIS_SHAREDICON 0x00000002
541
542#define NIIF_NONE 0x00000000
543#define NIIF_INFO 0x00000001
544#define NIIF_WARNING 0x00000002
545#define NIIF_ERROR 0x00000003
546#define NIIF_USER 0x00000004
547#define NIIF_ICON_MASK 0x0000000f
548#define NIIF_NOSOUND 0x00000010
549#if NTDDI_VERSION >= 0x06000000
550#define NIIF_LARGE_ICON 0x00000020
551#endif
552#if NTDDI_VERSION >= 0x06010000
553#define NIIF_RESPECT_QUIET_TIME 0x00000080
554#endif
555
556 typedef struct _NOTIFYICONIDENTIFIER {
557 DWORD cbSize;
558 HWND hWnd;
559 UINT uID;
560 GUID guidItem;
561 } NOTIFYICONIDENTIFIER,*PNOTIFYICONIDENTIFIER;
562
563 SHSTDAPI_(WINBOOL) Shell_NotifyIconA (DWORD dwMessage, PNOTIFYICONDATAA lpData);
564 SHSTDAPI_(WINBOOL) Shell_NotifyIconW (DWORD dwMessage, PNOTIFYICONDATAW lpData);
565
566#define Shell_NotifyIcon __MINGW_NAME_AW(Shell_NotifyIcon)
567
568#if NTDDI_VERSION >= 0x06010000
569 SHSTDAPI Shell_NotifyIconGetRect (const NOTIFYICONIDENTIFIER *identifier, RECT *iconLocation);
570#endif
571
572#ifndef SHFILEINFO_DEFINED
573#define SHFILEINFO_DEFINED
574
575 typedef struct _SHFILEINFOA {
576 HICON hIcon;
577 int iIcon;
578 DWORD dwAttributes;
579 CHAR szDisplayName[MAX_PATH];
580 CHAR szTypeName[80];
581 } SHFILEINFOA;
582
583 typedef struct _SHFILEINFOW {
584 HICON hIcon;
585 int iIcon;
586 DWORD dwAttributes;
587 WCHAR szDisplayName[MAX_PATH];
588 WCHAR szTypeName[80];
589 } SHFILEINFOW;
590
591 __MINGW_TYPEDEF_AW(SHFILEINFO)
592#endif
593
594#define SHGFI_ICON 0x000000100
595#define SHGFI_DISPLAYNAME 0x000000200
596#define SHGFI_TYPENAME 0x000000400
597#define SHGFI_ATTRIBUTES 0x000000800
598#define SHGFI_ICONLOCATION 0x000001000
599#define SHGFI_EXETYPE 0x000002000
600#define SHGFI_SYSICONINDEX 0x000004000
601#define SHGFI_LINKOVERLAY 0x000008000
602#define SHGFI_SELECTED 0x000010000
603#define SHGFI_ATTR_SPECIFIED 0x000020000
604
605#define SHGFI_LARGEICON 0x000000000
606#define SHGFI_SMALLICON 0x000000001
607#define SHGFI_OPENICON 0x000000002
608#define SHGFI_SHELLICONSIZE 0x000000004
609#define SHGFI_PIDL 0x000000008
610#define SHGFI_USEFILEATTRIBUTES 0x000000010
611
612#define SHGFI_ADDOVERLAYS 0x000000020
613#define SHGFI_OVERLAYINDEX 0x000000040
614
615 SHSTDAPI_(DWORD_PTR) SHGetFileInfoA (LPCSTR pszPath, DWORD dwFileAttributes, SHFILEINFOA *psfi, UINT cbFileInfo, UINT uFlags);
616 SHSTDAPI_(DWORD_PTR) SHGetFileInfoW (LPCWSTR pszPath, DWORD dwFileAttributes, SHFILEINFOW *psfi, UINT cbFileInfo, UINT uFlags);
617
618#define SHGetFileInfo __MINGW_NAME_AW(SHGetFileInfo)
619
620#if NTDDI_VERSION >= 0x06000000
621 typedef struct _SHSTOCKICONINFO {
622 DWORD cbSize;
623 HICON hIcon;
624 int iSysImageIndex;
625 int iIcon;
626 WCHAR szPath[MAX_PATH];
627 } SHSTOCKICONINFO;
628
629#define SHGSI_ICONLOCATION 0
630#define SHGSI_ICON SHGFI_ICON
631#define SHGSI_SYSICONINDEX SHGFI_SYSICONINDEX
632#define SHGSI_LINKOVERLAY SHGFI_LINKOVERLAY
633#define SHGSI_SELECTED SHGFI_SELECTED
634#define SHGSI_LARGEICON SHGFI_LARGEICON
635#define SHGSI_SMALLICON SHGFI_SMALLICON
636#define SHGSI_SHELLICONSIZE SHGFI_SHELLICONSIZE
637
638 typedef enum SHSTOCKICONID {
639 SIID_DOCNOASSOC = 0,
640 SIID_DOCASSOC = 1,
641 SIID_APPLICATION = 2,
642 SIID_FOLDER = 3,
643 SIID_FOLDEROPEN = 4,
644 SIID_DRIVE525 = 5,
645 SIID_DRIVE35 = 6,
646 SIID_DRIVEREMOVE = 7,
647 SIID_DRIVEFIXED = 8,
648 SIID_DRIVENET = 9,
649 SIID_DRIVENETDISABLED = 10,
650 SIID_DRIVECD = 11,
651 SIID_DRIVERAM = 12,
652 SIID_WORLD = 13,
653 SIID_SERVER = 15,
654 SIID_PRINTER = 16,
655 SIID_MYNETWORK = 17,
656 SIID_FIND = 22,
657 SIID_HELP = 23,
658 SIID_SHARE = 28,
659 SIID_LINK = 29,
660 SIID_SLOWFILE = 30,
661 SIID_RECYCLER = 31,
662 SIID_RECYCLERFULL = 32,
663 SIID_MEDIACDAUDIO = 40,
664 SIID_LOCK = 47,
665 SIID_AUTOLIST = 49,
666 SIID_PRINTERNET = 50,
667 SIID_SERVERSHARE = 51,
668 SIID_PRINTERFAX = 52,
669 SIID_PRINTERFAXNET = 53,
670 SIID_PRINTERFILE = 54,
671 SIID_STACK = 55,
672 SIID_MEDIASVCD = 56,
673 SIID_STUFFEDFOLDER = 57,
674 SIID_DRIVEUNKNOWN = 58,
675 SIID_DRIVEDVD = 59,
676 SIID_MEDIADVD = 60,
677 SIID_MEDIADVDRAM = 61,
678 SIID_MEDIADVDRW = 62,
679 SIID_MEDIADVDR = 63,
680 SIID_MEDIADVDROM = 64,
681 SIID_MEDIACDAUDIOPLUS = 65,
682 SIID_MEDIACDRW = 66,
683 SIID_MEDIACDR = 67,
684 SIID_MEDIACDBURN = 68,
685 SIID_MEDIABLANKCD = 69,
686 SIID_MEDIACDROM = 70,
687 SIID_AUDIOFILES = 71,
688 SIID_IMAGEFILES = 72,
689 SIID_VIDEOFILES = 73,
690 SIID_MIXEDFILES = 74,
691 SIID_FOLDERBACK = 75,
692 SIID_FOLDERFRONT = 76,
693 SIID_SHIELD = 77,
694 SIID_WARNING = 78,
695 SIID_INFO = 79,
696 SIID_ERROR = 80,
697 SIID_KEY = 81,
698 SIID_SOFTWARE = 82,
699 SIID_RENAME = 83,
700 SIID_DELETE = 84,
701 SIID_MEDIAAUDIODVD = 85,
702 SIID_MEDIAMOVIEDVD = 86,
703 SIID_MEDIAENHANCEDCD = 87,
704 SIID_MEDIAENHANCEDDVD = 88,
705 SIID_MEDIAHDDVD = 89,
706 SIID_MEDIABLURAY = 90,
707 SIID_MEDIAVCD = 91,
708 SIID_MEDIADVDPLUSR = 92,
709 SIID_MEDIADVDPLUSRW = 93,
710 SIID_DESKTOPPC = 94,
711 SIID_MOBILEPC = 95,
712 SIID_USERS = 96,
713 SIID_MEDIASMARTMEDIA = 97,
714 SIID_MEDIACOMPACTFLASH = 98,
715 SIID_DEVICECELLPHONE = 99,
716 SIID_DEVICECAMERA = 100,
717 SIID_DEVICEVIDEOCAMERA = 101,
718 SIID_DEVICEAUDIOPLAYER = 102,
719 SIID_NETWORKCONNECT = 103,
720 SIID_INTERNET = 104,
721 SIID_ZIPFILE = 105,
722 SIID_SETTINGS = 106,
723
724 SIID_DRIVEHDDVD = 132,
725 SIID_DRIVEBD = 133,
726 SIID_MEDIAHDDVDROM = 134,
727 SIID_MEDIAHDDVDR = 135,
728 SIID_MEDIAHDDVDRAM = 136,
729 SIID_MEDIABDROM = 137,
730 SIID_MEDIABDR = 138,
731 SIID_MEDIABDRE = 139,
732 SIID_CLUSTEREDDRIVE = 140,
733
734 SIID_MAX_ICONS = 175
735 } SHSTOCKICONID;
736
737#define SIID_INVALID ((SHSTOCKICONID)-1)
738
739 SHSTDAPI SHGetStockIconInfo (SHSTOCKICONID siid, UINT uFlags, SHSTOCKICONINFO *psii);
740#endif
741
742#define SHGetDiskFreeSpace SHGetDiskFreeSpaceEx
743
744 SHSTDAPI_(WINBOOL) SHGetDiskFreeSpaceExA (LPCSTR pszDirectoryName, ULARGE_INTEGER *pulFreeBytesAvailableToCaller, ULARGE_INTEGER *pulTotalNumberOfBytes, ULARGE_INTEGER *pulTotalNumberOfFreeBytes);
745 SHSTDAPI_(WINBOOL) SHGetDiskFreeSpaceExW (LPCWSTR pszDirectoryName, ULARGE_INTEGER *pulFreeBytesAvailableToCaller, ULARGE_INTEGER *pulTotalNumberOfBytes, ULARGE_INTEGER *pulTotalNumberOfFreeBytes);
746 SHSTDAPI_(WINBOOL) SHGetNewLinkInfoA (LPCSTR pszLinkTo, LPCSTR pszDir, LPSTR pszName, WINBOOL *pfMustCopy, UINT uFlags);
747 SHSTDAPI_(WINBOOL) SHGetNewLinkInfoW (LPCWSTR pszLinkTo, LPCWSTR pszDir, LPWSTR pszName, WINBOOL *pfMustCopy, UINT uFlags);
748
749#define SHGetDiskFreeSpaceEx __MINGW_NAME_AW(SHGetDiskFreeSpaceEx)
750#define SHGetNewLinkInfo __MINGW_NAME_AW(SHGetNewLinkInfo)
751
752#define SHGNLI_PIDL 0x000000001
753#define SHGNLI_PREFIXNAME 0x000000002
754#define SHGNLI_NOUNIQUE 0x000000004
755#define SHGNLI_NOLNK 0x000000008
756#if _WIN32_IE >= 0x0600
757#define SHGNLI_NOLOCNAME 0x000000010
758#endif
759#if NTDDI_VERSION >= 0x06010000
760#define SHGNLI_USEURLEXT 0x000000020
761#endif
762
763#define PRINTACTION_OPEN 0
764#define PRINTACTION_PROPERTIES 1
765#define PRINTACTION_NETINSTALL 2
766#define PRINTACTION_NETINSTALLLINK 3
767#define PRINTACTION_TESTPAGE 4
768#define PRINTACTION_OPENNETPRN 5
769#define PRINTACTION_DOCUMENTDEFAULTS 6
770#define PRINTACTION_SERVERPROPERTIES 7
771
772 SHSTDAPI_(WINBOOL) SHInvokePrinterCommandA (HWND hwnd, UINT uAction, LPCSTR lpBuf1, LPCSTR lpBuf2, WINBOOL fModal);
773 SHSTDAPI_(WINBOOL) SHInvokePrinterCommandW (HWND hwnd, UINT uAction, LPCWSTR lpBuf1, LPCWSTR lpBuf2, WINBOOL fModal);
774
775#define SHInvokePrinterCommand __MINGW_NAME_AW(SHInvokePrinterCommand)
776
777#if NTDDI_VERSION >= 0x06000000
778 typedef struct _OPEN_PRINTER_PROPS_INFOA {
779 DWORD dwSize;
780 LPSTR pszSheetName;
781 UINT uSheetIndex;
782 DWORD dwFlags;
783 WINBOOL bModal;
784 } OPEN_PRINTER_PROPS_INFOA,*POPEN_PRINTER_PROPS_INFOA;
785
786 typedef struct _OPEN_PRINTER_PROPS_INFOW {
787 DWORD dwSize;
788 LPWSTR pszSheetName;
789 UINT uSheetIndex;
790 DWORD dwFlags;
791 WINBOOL bModal;
792 } OPEN_PRINTER_PROPS_INFOW,*POPEN_PRINTER_PROPS_INFOW;
793
794 __MINGW_TYPEDEF_AW(OPEN_PRINTER_PROPS_INFO)
795 __MINGW_TYPEDEF_AW(POPEN_PRINTER_PROPS_INFO)
796#define PRINT_PROP_FORCE_NAME 0x01
797#endif
798
799 SHSTDAPI SHLoadNonloadedIconOverlayIdentifiers (void);
800 SHSTDAPI SHIsFileAvailableOffline (PCWSTR pwszPath, DWORD *pdwStatus);
801
802#define OFFLINE_STATUS_LOCAL 0x0001
803#define OFFLINE_STATUS_REMOTE 0x0002
804#define OFFLINE_STATUS_INCOMPLETE 0x0004
805
806 SHSTDAPI SHSetLocalizedName (PCWSTR pszPath, PCWSTR pszResModule, int idsRes);
807
808#if NTDDI_VERSION >= 0x06000000
809 SHSTDAPI SHRemoveLocalizedName (PCWSTR pszPath);
810 SHSTDAPI SHGetLocalizedName (PCWSTR pszPath, PWSTR pszResModule, UINT cch, int *pidsRes);
811#endif
812
813#ifndef _SHLWAPI_
814#define LWSTDAPIV_(type) EXTERN_C DECLSPEC_IMPORT type STDAPIVCALLTYPE
815#else
816#define LWSTDAPIV_(type) STDAPIV_ (type)
817#endif
818
819 LWSTDAPIV_ (int) ShellMessageBoxA (HINSTANCE hAppInst, HWND hWnd, LPCSTR lpcText, LPCSTR lpcTitle, UINT fuStyle,...);
820 LWSTDAPIV_ (int) ShellMessageBoxW (HINSTANCE hAppInst, HWND hWnd, LPCWSTR lpcText, LPCWSTR lpcTitle, UINT fuStyle,...);
821
822#define ShellMessageBox __MINGW_NAME_AW(ShellMessageBox)
823
824 SHSTDAPI_(WINBOOL) IsLFNDriveA (LPCSTR pszPath);
825 SHSTDAPI_(WINBOOL) IsLFNDriveW (LPCWSTR pszPath);
826
827#define IsLFNDrive __MINGW_NAME_AW(IsLFNDrive)
828
829#if _WIN32_IE >= 0x0600
830 STDAPI SHEnumerateUnreadMailAccountsA (HKEY hKeyUser, DWORD dwIndex, LPSTR pszMailAddress, int cchMailAddress);
831 STDAPI SHEnumerateUnreadMailAccountsW (HKEY hKeyUser, DWORD dwIndex, LPWSTR pszMailAddress, int cchMailAddress);
832 STDAPI SHGetUnreadMailCountA (HKEY hKeyUser, LPCSTR pszMailAddress, DWORD *pdwCount, FILETIME *pFileTime, LPSTR pszShellExecuteCommand, int cchShellExecuteCommand);
833 STDAPI SHGetUnreadMailCountW (HKEY hKeyUser, LPCWSTR pszMailAddress, DWORD *pdwCount, FILETIME *pFileTime, LPWSTR pszShellExecuteCommand, int cchShellExecuteCommand);
834 STDAPI SHSetUnreadMailCountA (LPCSTR pszMailAddress, DWORD dwCount, LPCSTR pszShellExecuteCommand);
835 STDAPI SHSetUnreadMailCountW (LPCWSTR pszMailAddress, DWORD dwCount, LPCWSTR pszShellExecuteCommand);
836
837#define SHEnumerateUnreadMailAccounts __MINGW_NAME_AW(SHEnumerateUnreadMailAccounts)
838#define SHGetUnreadMailCount __MINGW_NAME_AW(SHGetUnreadMailCount)
839#define SHSetUnreadMailCount __MINGW_NAME_AW(SHSetUnreadMailCount)
840
841#endif
842#if _WIN32_IE >= 0x0601
843 STDAPI_ (WINBOOL) SHTestTokenMembership (HANDLE hToken, ULONG ulRID);
844#endif
845
846#if _WIN32_IE >= 0x0600
847 SHSTDAPI SHGetImageList (int iImageList, REFIID riid, void **ppvObj);
848
849#define SHIL_LARGE 0
850#define SHIL_SMALL 1
851#define SHIL_EXTRALARGE 2
852#define SHIL_SYSSMALL 3
853#if NTDDI_VERSION >= 0x06000000
854#define SHIL_JUMBO 4
855#define SHIL_LAST SHIL_JUMBO
856#else
857#define SHIL_LAST SHIL_SYSSMALL
858#endif
859
860 typedef HRESULT (STDMETHODCALLTYPE *PFNCANSHAREFOLDERW) (PCWSTR pszPath);
861 typedef HRESULT (STDMETHODCALLTYPE *PFNSHOWSHAREFOLDERUIW) (HWND hwndParent, PCWSTR pszPath);
862
863#endif
864#endif /* WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) */
865
866#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP)
867 SHSTDAPI_(LPWSTR *) CommandLineToArgvW (LPCWSTR lpCmdLine, int *pNumArgs);
868#endif
869
870#ifdef __cplusplus
871}
872#endif
873
874#ifndef _WIN64
875#include <poppack.h>
876#endif
877
878#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
879#if NTDDI_VERSION >= 0x06000000
880
881#define WC_NETADDRESS L"msctls_netaddress"
882
883SHSTDAPI_(WINBOOL) InitNetworkAddressControl (void);
884
885#define NCM_GETADDRESS (WM_USER+1)
886#define NetAddr_GetAddress(hwnd, pv) (HRESULT)SNDMSG (hwnd, NCM_GETADDRESS, 0,(LPARAM)pv)
887
888typedef struct tagNC_ADDRESS {
889 struct NET_ADDRESS_INFO_ *pAddrInfo;
890 USHORT PortNumber;
891 BYTE PrefixLength;
892} NC_ADDRESS,*PNC_ADDRESS;
893
894#define NCM_SETALLOWTYPE (WM_USER+2)
895#define NetAddr_SetAllowType(hwnd, addrMask) (HRESULT)SNDMSG (hwnd, NCM_SETALLOWTYPE,(WPARAM)addrMask, 0)
896
897#define NCM_GETALLOWTYPE (WM_USER+3)
898#define NetAddr_GetAllowType(hwnd) (DWORD)SNDMSG (hwnd, NCM_GETALLOWTYPE, 0, 0)
899
900#define NCM_DISPLAYERRORTIP (WM_USER+4)
901#define NetAddr_DisplayErrorTip(hwnd) (HRESULT)SNDMSG (hwnd, NCM_DISPLAYERRORTIP, 0, 0)
902#endif
903
904#if NTDDI_VERSION >= 0x06000000
905STDAPI SHGetDriveMedia (PCWSTR pszDrive, DWORD *pdwMediaContent);
906#endif
907#endif
908#endif
Note: See TracBrowser for help on using the repository browser.