Use MassiveGitTask for index manipulation
[TortoiseGit.git] / src / Utils / Win7.h
blob7be80100df5cf5010db2935b23a7cfdea7eac93b
1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2009-2010 - TortoiseSVN
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software Foundation,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 // helper:
21 // declares and defines stuff which is not available in the Vista SDK or
22 // which isn't available in the Win7 SDK but not unless NTDDI_VERSION is
23 // set to NTDDI_WIN7
25 #pragma once
27 static UINT WM_TASKBARBTNCREATED = RegisterWindowMessage(_T("TaskbarButtonCreated"));
29 #if (NTDDI_VERSION < 0x06010000)
32 * Message filter info values (CHANGEFILTERSTRUCT.ExtStatus)
34 #define MSGFLTINFO_NONE (0)
35 #define MSGFLTINFO_ALREADYALLOWED_FORWND (1)
36 #define MSGFLTINFO_ALREADYDISALLOWED_FORWND (2)
37 #define MSGFLTINFO_ALLOWED_HIGHER (3)
39 typedef struct tagCHANGEFILTERSTRUCT {
40 DWORD cbSize;
41 DWORD ExtStatus;
42 } CHANGEFILTERSTRUCT, *PCHANGEFILTERSTRUCT;
45 * Message filter action values (action parameter to ChangeWindowMessageFilterEx)
47 #define MSGFLT_RESET (0)
48 #define MSGFLT_ALLOW (1)
49 #define MSGFLT_DISALLOW (2)
51 #ifdef __cplusplus
53 // Define operator overloads to enable bit operations on enum values that are
54 // used to define flags. Use DEFINE_ENUM_FLAG_OPERATORS(YOUR_TYPE) to enable these
55 // operators on YOUR_TYPE.
57 // Moved here from objbase.w.
59 #define DEFINE_ENUM_FLAG_OPERATORS(ENUMTYPE) \
60 extern "C++" { \
61 inline ENUMTYPE operator | (ENUMTYPE a, ENUMTYPE b) { return ENUMTYPE(((int)a) | ((int)b)); } \
62 inline ENUMTYPE &operator |= (ENUMTYPE &a, ENUMTYPE b) { return (ENUMTYPE &)(((int &)a) |= ((int)b)); } \
63 inline ENUMTYPE operator & (ENUMTYPE a, ENUMTYPE b) { return ENUMTYPE(((int)a) & ((int)b)); } \
64 inline ENUMTYPE &operator &= (ENUMTYPE &a, ENUMTYPE b) { return (ENUMTYPE &)(((int &)a) &= ((int)b)); } \
65 inline ENUMTYPE operator ~ (ENUMTYPE a) { return ENUMTYPE(~((int)a)); } \
66 inline ENUMTYPE operator ^ (ENUMTYPE a, ENUMTYPE b) { return ENUMTYPE(((int)a) ^ ((int)b)); } \
67 inline ENUMTYPE &operator ^= (ENUMTYPE &a, ENUMTYPE b) { return (ENUMTYPE &)(((int &)a) ^= ((int)b)); } \
69 #else
70 #define DEFINE_ENUM_FLAG_OPERATORS(ENUMTYPE) // NOP, C allows these operators.
71 #endif
73 /* this ALWAYS GENERATED file contains the definitions for the interfaces */
76 /* File created by MIDL compiler version 7.00.0555 */
77 /* Compiler settings for objectarray.idl:
78 Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 7.00.0555
79 protocol : dce , ms_ext, c_ext, robust
80 error checks: allocation ref bounds_check enum stub_data
81 VC __declspec() decoration level:
82 __declspec(uuid()), __declspec(selectany), __declspec(novtable)
83 DECLSPEC_UUID(), MIDL_INTERFACE()
85 /* @@MIDL_FILE_HEADING( ) */
87 #pragma warning( disable: 4049 ) /* more than 64k source lines */
90 /* verify that the <rpcndr.h> version is high enough to compile this file*/
91 #ifndef __REQUIRED_RPCNDR_H_VERSION__
92 #define __REQUIRED_RPCNDR_H_VERSION__ 500
93 #endif
95 /* verify that the <rpcsal.h> version is high enough to compile this file*/
96 #ifndef __REQUIRED_RPCSAL_H_VERSION__
97 #define __REQUIRED_RPCSAL_H_VERSION__ 100
98 #endif
100 #include <rpc.h>
101 #include <rpcndr.h>
103 #ifndef __RPCNDR_H_VERSION__
104 #error this stub requires an updated version of <rpcndr.h>
105 #endif // __RPCNDR_H_VERSION__
107 #ifndef COM_NO_WINDOWS_H
108 #include <Windows.h>
109 #include <ole2.h>
110 #endif /*COM_NO_WINDOWS_H*/
112 #ifndef __objectarray_h__
113 #define __objectarray_h__
115 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
116 #pragma once
117 #endif
119 /* Forward Declarations */
121 #ifndef __IObjectArray_FWD_DEFINED__
122 #define __IObjectArray_FWD_DEFINED__
123 typedef interface IObjectArray IObjectArray;
124 #endif /* __IObjectArray_FWD_DEFINED__ */
127 #ifndef __IObjectCollection_FWD_DEFINED__
128 #define __IObjectCollection_FWD_DEFINED__
129 typedef interface IObjectCollection IObjectCollection;
130 #endif /* __IObjectCollection_FWD_DEFINED__ */
133 /* header files for imported files */
134 #include <oaidl.h>
135 #include <ocidl.h>
137 #ifdef __cplusplus
138 extern "C"{
139 #endif
142 /* interface __MIDL_itf_shobjidl_0000_0093 */
143 /* [local] */
145 #ifdef MIDL_PASS
146 typedef IUnknown *HIMAGELIST;
148 #endif
149 typedef /* [v1_enum] */
150 enum THUMBBUTTONFLAGS
151 { THBF_ENABLED = 0,
152 THBF_DISABLED = 0x1,
153 THBF_DISMISSONCLICK = 0x2,
154 THBF_NOBACKGROUND = 0x4,
155 THBF_HIDDEN = 0x8,
156 THBF_NONINTERACTIVE = 0x10
157 } THUMBBUTTONFLAGS;
159 DEFINE_ENUM_FLAG_OPERATORS(THUMBBUTTONFLAGS)
160 typedef /* [v1_enum] */
161 enum THUMBBUTTONMASK
162 { THB_BITMAP = 0x1,
163 THB_ICON = 0x2,
164 THB_TOOLTIP = 0x4,
165 THB_FLAGS = 0x8
166 } THUMBBUTTONMASK;
168 DEFINE_ENUM_FLAG_OPERATORS(THUMBBUTTONMASK)
169 #include <pshpack8.h>
170 typedef struct THUMBBUTTON
172 THUMBBUTTONMASK dwMask;
173 UINT iId;
174 UINT iBitmap;
175 HICON hIcon;
176 WCHAR szTip[ 260 ];
177 THUMBBUTTONFLAGS dwFlags;
178 } THUMBBUTTON;
180 typedef struct THUMBBUTTON *LPTHUMBBUTTON;
182 #include <poppack.h>
183 #define THBN_CLICKED 0x1800
186 extern RPC_IF_HANDLE __MIDL_itf_shobjidl_0000_0093_v0_0_c_ifspec;
187 extern RPC_IF_HANDLE __MIDL_itf_shobjidl_0000_0093_v0_0_s_ifspec;
189 #ifndef __ITaskbarList3_INTERFACE_DEFINED__
190 #define __ITaskbarList3_INTERFACE_DEFINED__
192 /* interface ITaskbarList3 */
193 /* [object][uuid] */
195 typedef /* [v1_enum] */
196 enum TBPFLAG
197 { TBPF_NOPROGRESS = 0,
198 TBPF_INDETERMINATE = 0x1,
199 TBPF_NORMAL = 0x2,
200 TBPF_ERROR = 0x4,
201 TBPF_PAUSED = 0x8
202 } TBPFLAG;
204 DEFINE_ENUM_FLAG_OPERATORS(TBPFLAG)
206 EXTERN_C const IID IID_ITaskbarList3;
208 #if defined(__cplusplus) && !defined(CINTERFACE)
210 MIDL_INTERFACE("ea1afb91-9e28-4b86-90e9-9e9f8a5eefaf")
211 ITaskbarList3 : public ITaskbarList2
213 public:
214 virtual HRESULT STDMETHODCALLTYPE SetProgressValue(
215 /* [in] */ __RPC__in HWND hwnd,
216 /* [in] */ ULONGLONG ullCompleted,
217 /* [in] */ ULONGLONG ullTotal) = 0;
219 virtual HRESULT STDMETHODCALLTYPE SetProgressState(
220 /* [in] */ __RPC__in HWND hwnd,
221 /* [in] */ TBPFLAG tbpFlags) = 0;
223 virtual HRESULT STDMETHODCALLTYPE RegisterTab(
224 /* [in] */ __RPC__in HWND hwndTab,
225 /* [in] */ __RPC__in HWND hwndMDI) = 0;
227 virtual HRESULT STDMETHODCALLTYPE UnregisterTab(
228 /* [in] */ __RPC__in HWND hwndTab) = 0;
230 virtual HRESULT STDMETHODCALLTYPE SetTabOrder(
231 /* [in] */ __RPC__in HWND hwndTab,
232 /* [in] */ __RPC__in HWND hwndInsertBefore) = 0;
234 virtual HRESULT STDMETHODCALLTYPE SetTabActive(
235 /* [in] */ __RPC__in HWND hwndTab,
236 /* [in] */ __RPC__in HWND hwndMDI,
237 /* [in] */ DWORD dwReserved) = 0;
239 virtual HRESULT STDMETHODCALLTYPE ThumbBarAddButtons(
240 /* [in] */ __RPC__in HWND hwnd,
241 /* [in] */ UINT cButtons,
242 /* [size_is][in] */ __RPC__in_ecount_full(cButtons) LPTHUMBBUTTON pButton) = 0;
244 virtual HRESULT STDMETHODCALLTYPE ThumbBarUpdateButtons(
245 /* [in] */ __RPC__in HWND hwnd,
246 /* [in] */ UINT cButtons,
247 /* [size_is][in] */ __RPC__in_ecount_full(cButtons) LPTHUMBBUTTON pButton) = 0;
249 virtual HRESULT STDMETHODCALLTYPE ThumbBarSetImageList(
250 /* [in] */ __RPC__in HWND hwnd,
251 /* [in] */ __RPC__in_opt HIMAGELIST himl) = 0;
253 virtual HRESULT STDMETHODCALLTYPE SetOverlayIcon(
254 /* [in] */ __RPC__in HWND hwnd,
255 /* [in] */ __RPC__in HICON hIcon,
256 /* [string][unique][in] */ __RPC__in_opt_string LPCWSTR pszDescription) = 0;
258 virtual HRESULT STDMETHODCALLTYPE SetThumbnailTooltip(
259 /* [in] */ __RPC__in HWND hwnd,
260 /* [string][unique][in] */ __RPC__in_opt_string LPCWSTR pszTip) = 0;
262 virtual HRESULT STDMETHODCALLTYPE SetThumbnailClip(
263 /* [in] */ __RPC__in HWND hwnd,
264 /* [in] */ __RPC__in RECT *prcClip) = 0;
268 #else /* C style interface */
270 typedef struct ITaskbarList3Vtbl
272 BEGIN_INTERFACE
274 HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
275 __RPC__in ITaskbarList3 * This,
276 /* [in] */ __RPC__in REFIID riid,
277 /* [annotation][iid_is][out] */
278 __RPC__deref_out void **ppvObject);
280 ULONG ( STDMETHODCALLTYPE *AddRef )(
281 __RPC__in ITaskbarList3 * This);
283 ULONG ( STDMETHODCALLTYPE *Release )(
284 __RPC__in ITaskbarList3 * This);
286 HRESULT ( STDMETHODCALLTYPE *HrInit )(
287 __RPC__in ITaskbarList3 * This);
289 HRESULT ( STDMETHODCALLTYPE *AddTab )(
290 __RPC__in ITaskbarList3 * This,
291 /* [in] */ __RPC__in HWND hwnd);
293 HRESULT ( STDMETHODCALLTYPE *DeleteTab )(
294 __RPC__in ITaskbarList3 * This,
295 /* [in] */ __RPC__in HWND hwnd);
297 HRESULT ( STDMETHODCALLTYPE *ActivateTab )(
298 __RPC__in ITaskbarList3 * This,
299 /* [in] */ __RPC__in HWND hwnd);
301 HRESULT ( STDMETHODCALLTYPE *SetActiveAlt )(
302 __RPC__in ITaskbarList3 * This,
303 /* [in] */ __RPC__in HWND hwnd);
305 HRESULT ( STDMETHODCALLTYPE *MarkFullscreenWindow )(
306 __RPC__in ITaskbarList3 * This,
307 /* [in] */ __RPC__in HWND hwnd,
308 /* [in] */ BOOL fFullscreen);
310 HRESULT ( STDMETHODCALLTYPE *SetProgressValue )(
311 __RPC__in ITaskbarList3 * This,
312 /* [in] */ __RPC__in HWND hwnd,
313 /* [in] */ ULONGLONG ullCompleted,
314 /* [in] */ ULONGLONG ullTotal);
316 HRESULT ( STDMETHODCALLTYPE *SetProgressState )(
317 __RPC__in ITaskbarList3 * This,
318 /* [in] */ __RPC__in HWND hwnd,
319 /* [in] */ TBPFLAG tbpFlags);
321 HRESULT ( STDMETHODCALLTYPE *RegisterTab )(
322 __RPC__in ITaskbarList3 * This,
323 /* [in] */ __RPC__in HWND hwndTab,
324 /* [in] */ __RPC__in HWND hwndMDI);
326 HRESULT ( STDMETHODCALLTYPE *UnregisterTab )(
327 __RPC__in ITaskbarList3 * This,
328 /* [in] */ __RPC__in HWND hwndTab);
330 HRESULT ( STDMETHODCALLTYPE *SetTabOrder )(
331 __RPC__in ITaskbarList3 * This,
332 /* [in] */ __RPC__in HWND hwndTab,
333 /* [in] */ __RPC__in HWND hwndInsertBefore);
335 HRESULT ( STDMETHODCALLTYPE *SetTabActive )(
336 __RPC__in ITaskbarList3 * This,
337 /* [in] */ __RPC__in HWND hwndTab,
338 /* [in] */ __RPC__in HWND hwndMDI,
339 /* [in] */ DWORD dwReserved);
341 HRESULT ( STDMETHODCALLTYPE *ThumbBarAddButtons )(
342 __RPC__in ITaskbarList3 * This,
343 /* [in] */ __RPC__in HWND hwnd,
344 /* [in] */ UINT cButtons,
345 /* [size_is][in] */ __RPC__in_ecount_full(cButtons) LPTHUMBBUTTON pButton);
347 HRESULT ( STDMETHODCALLTYPE *ThumbBarUpdateButtons )(
348 __RPC__in ITaskbarList3 * This,
349 /* [in] */ __RPC__in HWND hwnd,
350 /* [in] */ UINT cButtons,
351 /* [size_is][in] */ __RPC__in_ecount_full(cButtons) LPTHUMBBUTTON pButton);
353 HRESULT ( STDMETHODCALLTYPE *ThumbBarSetImageList )(
354 __RPC__in ITaskbarList3 * This,
355 /* [in] */ __RPC__in HWND hwnd,
356 /* [in] */ __RPC__in_opt HIMAGELIST himl);
358 HRESULT ( STDMETHODCALLTYPE *SetOverlayIcon )(
359 __RPC__in ITaskbarList3 * This,
360 /* [in] */ __RPC__in HWND hwnd,
361 /* [in] */ __RPC__in HICON hIcon,
362 /* [string][unique][in] */ __RPC__in_opt_string LPCWSTR pszDescription);
364 HRESULT ( STDMETHODCALLTYPE *SetThumbnailTooltip )(
365 __RPC__in ITaskbarList3 * This,
366 /* [in] */ __RPC__in HWND hwnd,
367 /* [string][unique][in] */ __RPC__in_opt_string LPCWSTR pszTip);
369 HRESULT ( STDMETHODCALLTYPE *SetThumbnailClip )(
370 __RPC__in ITaskbarList3 * This,
371 /* [in] */ __RPC__in HWND hwnd,
372 /* [in] */ __RPC__in RECT *prcClip);
374 END_INTERFACE
375 } ITaskbarList3Vtbl;
377 interface ITaskbarList3
379 CONST_VTBL struct ITaskbarList3Vtbl *lpVtbl;
384 #ifdef COBJMACROS
387 #define ITaskbarList3_QueryInterface(This,riid,ppvObject) \
388 ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
390 #define ITaskbarList3_AddRef(This) \
391 ( (This)->lpVtbl -> AddRef(This) )
393 #define ITaskbarList3_Release(This) \
394 ( (This)->lpVtbl -> Release(This) )
397 #define ITaskbarList3_HrInit(This) \
398 ( (This)->lpVtbl -> HrInit(This) )
400 #define ITaskbarList3_AddTab(This,hwnd) \
401 ( (This)->lpVtbl -> AddTab(This,hwnd) )
403 #define ITaskbarList3_DeleteTab(This,hwnd) \
404 ( (This)->lpVtbl -> DeleteTab(This,hwnd) )
406 #define ITaskbarList3_ActivateTab(This,hwnd) \
407 ( (This)->lpVtbl -> ActivateTab(This,hwnd) )
409 #define ITaskbarList3_SetActiveAlt(This,hwnd) \
410 ( (This)->lpVtbl -> SetActiveAlt(This,hwnd) )
413 #define ITaskbarList3_MarkFullscreenWindow(This,hwnd,fFullscreen) \
414 ( (This)->lpVtbl -> MarkFullscreenWindow(This,hwnd,fFullscreen) )
417 #define ITaskbarList3_SetProgressValue(This,hwnd,ullCompleted,ullTotal) \
418 ( (This)->lpVtbl -> SetProgressValue(This,hwnd,ullCompleted,ullTotal) )
420 #define ITaskbarList3_SetProgressState(This,hwnd,tbpFlags) \
421 ( (This)->lpVtbl -> SetProgressState(This,hwnd,tbpFlags) )
423 #define ITaskbarList3_RegisterTab(This,hwndTab,hwndMDI) \
424 ( (This)->lpVtbl -> RegisterTab(This,hwndTab,hwndMDI) )
426 #define ITaskbarList3_UnregisterTab(This,hwndTab) \
427 ( (This)->lpVtbl -> UnregisterTab(This,hwndTab) )
429 #define ITaskbarList3_SetTabOrder(This,hwndTab,hwndInsertBefore) \
430 ( (This)->lpVtbl -> SetTabOrder(This,hwndTab,hwndInsertBefore) )
432 #define ITaskbarList3_SetTabActive(This,hwndTab,hwndMDI,dwReserved) \
433 ( (This)->lpVtbl -> SetTabActive(This,hwndTab,hwndMDI,dwReserved) )
435 #define ITaskbarList3_ThumbBarAddButtons(This,hwnd,cButtons,pButton) \
436 ( (This)->lpVtbl -> ThumbBarAddButtons(This,hwnd,cButtons,pButton) )
438 #define ITaskbarList3_ThumbBarUpdateButtons(This,hwnd,cButtons,pButton) \
439 ( (This)->lpVtbl -> ThumbBarUpdateButtons(This,hwnd,cButtons,pButton) )
441 #define ITaskbarList3_ThumbBarSetImageList(This,hwnd,himl) \
442 ( (This)->lpVtbl -> ThumbBarSetImageList(This,hwnd,himl) )
444 #define ITaskbarList3_SetOverlayIcon(This,hwnd,hIcon,pszDescription) \
445 ( (This)->lpVtbl -> SetOverlayIcon(This,hwnd,hIcon,pszDescription) )
447 #define ITaskbarList3_SetThumbnailTooltip(This,hwnd,pszTip) \
448 ( (This)->lpVtbl -> SetThumbnailTooltip(This,hwnd,pszTip) )
450 #define ITaskbarList3_SetThumbnailClip(This,hwnd,prcClip) \
451 ( (This)->lpVtbl -> SetThumbnailClip(This,hwnd,prcClip) )
453 #endif /* COBJMACROS */
456 #endif /* C style interface */
461 #endif /* __ITaskbarList3_INTERFACE_DEFINED__ */
464 #ifndef __ITaskbarList4_INTERFACE_DEFINED__
465 #define __ITaskbarList4_INTERFACE_DEFINED__
467 /* interface ITaskbarList4 */
468 /* [object][uuid] */
470 typedef /* [v1_enum] */
471 enum STPFLAG
472 { STPF_NONE = 0,
473 STPF_USEAPPTHUMBNAILALWAYS = 0x1,
474 STPF_USEAPPTHUMBNAILWHENACTIVE = 0x2,
475 STPF_USEAPPPEEKALWAYS = 0x4,
476 STPF_USEAPPPEEKWHENACTIVE = 0x8
477 } STPFLAG;
479 DEFINE_ENUM_FLAG_OPERATORS(STPFLAG)
481 EXTERN_C const IID IID_ITaskbarList4;
483 #if defined(__cplusplus) && !defined(CINTERFACE)
485 MIDL_INTERFACE("c43dc798-95d1-4bea-9030-bb99e2983a1a")
486 ITaskbarList4 : public ITaskbarList3
488 public:
489 virtual HRESULT STDMETHODCALLTYPE SetTabProperties(
490 /* [in] */ __RPC__in HWND hwndTab,
491 /* [in] */ STPFLAG stpFlags) = 0;
495 #else /* C style interface */
497 typedef struct ITaskbarList4Vtbl
499 BEGIN_INTERFACE
501 HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
502 __RPC__in ITaskbarList4 * This,
503 /* [in] */ __RPC__in REFIID riid,
504 /* [annotation][iid_is][out] */
505 __RPC__deref_out void **ppvObject);
507 ULONG ( STDMETHODCALLTYPE *AddRef )(
508 __RPC__in ITaskbarList4 * This);
510 ULONG ( STDMETHODCALLTYPE *Release )(
511 __RPC__in ITaskbarList4 * This);
513 HRESULT ( STDMETHODCALLTYPE *HrInit )(
514 __RPC__in ITaskbarList4 * This);
516 HRESULT ( STDMETHODCALLTYPE *AddTab )(
517 __RPC__in ITaskbarList4 * This,
518 /* [in] */ __RPC__in HWND hwnd);
520 HRESULT ( STDMETHODCALLTYPE *DeleteTab )(
521 __RPC__in ITaskbarList4 * This,
522 /* [in] */ __RPC__in HWND hwnd);
524 HRESULT ( STDMETHODCALLTYPE *ActivateTab )(
525 __RPC__in ITaskbarList4 * This,
526 /* [in] */ __RPC__in HWND hwnd);
528 HRESULT ( STDMETHODCALLTYPE *SetActiveAlt )(
529 __RPC__in ITaskbarList4 * This,
530 /* [in] */ __RPC__in HWND hwnd);
532 HRESULT ( STDMETHODCALLTYPE *MarkFullscreenWindow )(
533 __RPC__in ITaskbarList4 * This,
534 /* [in] */ __RPC__in HWND hwnd,
535 /* [in] */ BOOL fFullscreen);
537 HRESULT ( STDMETHODCALLTYPE *SetProgressValue )(
538 __RPC__in ITaskbarList4 * This,
539 /* [in] */ __RPC__in HWND hwnd,
540 /* [in] */ ULONGLONG ullCompleted,
541 /* [in] */ ULONGLONG ullTotal);
543 HRESULT ( STDMETHODCALLTYPE *SetProgressState )(
544 __RPC__in ITaskbarList4 * This,
545 /* [in] */ __RPC__in HWND hwnd,
546 /* [in] */ TBPFLAG tbpFlags);
548 HRESULT ( STDMETHODCALLTYPE *RegisterTab )(
549 __RPC__in ITaskbarList4 * This,
550 /* [in] */ __RPC__in HWND hwndTab,
551 /* [in] */ __RPC__in HWND hwndMDI);
553 HRESULT ( STDMETHODCALLTYPE *UnregisterTab )(
554 __RPC__in ITaskbarList4 * This,
555 /* [in] */ __RPC__in HWND hwndTab);
557 HRESULT ( STDMETHODCALLTYPE *SetTabOrder )(
558 __RPC__in ITaskbarList4 * This,
559 /* [in] */ __RPC__in HWND hwndTab,
560 /* [in] */ __RPC__in HWND hwndInsertBefore);
562 HRESULT ( STDMETHODCALLTYPE *SetTabActive )(
563 __RPC__in ITaskbarList4 * This,
564 /* [in] */ __RPC__in HWND hwndTab,
565 /* [in] */ __RPC__in HWND hwndMDI,
566 /* [in] */ DWORD dwReserved);
568 HRESULT ( STDMETHODCALLTYPE *ThumbBarAddButtons )(
569 __RPC__in ITaskbarList4 * This,
570 /* [in] */ __RPC__in HWND hwnd,
571 /* [in] */ UINT cButtons,
572 /* [size_is][in] */ __RPC__in_ecount_full(cButtons) LPTHUMBBUTTON pButton);
574 HRESULT ( STDMETHODCALLTYPE *ThumbBarUpdateButtons )(
575 __RPC__in ITaskbarList4 * This,
576 /* [in] */ __RPC__in HWND hwnd,
577 /* [in] */ UINT cButtons,
578 /* [size_is][in] */ __RPC__in_ecount_full(cButtons) LPTHUMBBUTTON pButton);
580 HRESULT ( STDMETHODCALLTYPE *ThumbBarSetImageList )(
581 __RPC__in ITaskbarList4 * This,
582 /* [in] */ __RPC__in HWND hwnd,
583 /* [in] */ __RPC__in_opt HIMAGELIST himl);
585 HRESULT ( STDMETHODCALLTYPE *SetOverlayIcon )(
586 __RPC__in ITaskbarList4 * This,
587 /* [in] */ __RPC__in HWND hwnd,
588 /* [in] */ __RPC__in HICON hIcon,
589 /* [string][unique][in] */ __RPC__in_opt_string LPCWSTR pszDescription);
591 HRESULT ( STDMETHODCALLTYPE *SetThumbnailTooltip )(
592 __RPC__in ITaskbarList4 * This,
593 /* [in] */ __RPC__in HWND hwnd,
594 /* [string][unique][in] */ __RPC__in_opt_string LPCWSTR pszTip);
596 HRESULT ( STDMETHODCALLTYPE *SetThumbnailClip )(
597 __RPC__in ITaskbarList4 * This,
598 /* [in] */ __RPC__in HWND hwnd,
599 /* [in] */ __RPC__in RECT *prcClip);
601 HRESULT ( STDMETHODCALLTYPE *SetTabProperties )(
602 __RPC__in ITaskbarList4 * This,
603 /* [in] */ __RPC__in HWND hwndTab,
604 /* [in] */ STPFLAG stpFlags);
606 END_INTERFACE
607 } ITaskbarList4Vtbl;
609 interface ITaskbarList4
611 CONST_VTBL struct ITaskbarList4Vtbl *lpVtbl;
616 #ifdef COBJMACROS
619 #define ITaskbarList4_QueryInterface(This,riid,ppvObject) \
620 ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
622 #define ITaskbarList4_AddRef(This) \
623 ( (This)->lpVtbl -> AddRef(This) )
625 #define ITaskbarList4_Release(This) \
626 ( (This)->lpVtbl -> Release(This) )
629 #define ITaskbarList4_HrInit(This) \
630 ( (This)->lpVtbl -> HrInit(This) )
632 #define ITaskbarList4_AddTab(This,hwnd) \
633 ( (This)->lpVtbl -> AddTab(This,hwnd) )
635 #define ITaskbarList4_DeleteTab(This,hwnd) \
636 ( (This)->lpVtbl -> DeleteTab(This,hwnd) )
638 #define ITaskbarList4_ActivateTab(This,hwnd) \
639 ( (This)->lpVtbl -> ActivateTab(This,hwnd) )
641 #define ITaskbarList4_SetActiveAlt(This,hwnd) \
642 ( (This)->lpVtbl -> SetActiveAlt(This,hwnd) )
645 #define ITaskbarList4_MarkFullscreenWindow(This,hwnd,fFullscreen) \
646 ( (This)->lpVtbl -> MarkFullscreenWindow(This,hwnd,fFullscreen) )
649 #define ITaskbarList4_SetProgressValue(This,hwnd,ullCompleted,ullTotal) \
650 ( (This)->lpVtbl -> SetProgressValue(This,hwnd,ullCompleted,ullTotal) )
652 #define ITaskbarList4_SetProgressState(This,hwnd,tbpFlags) \
653 ( (This)->lpVtbl -> SetProgressState(This,hwnd,tbpFlags) )
655 #define ITaskbarList4_RegisterTab(This,hwndTab,hwndMDI) \
656 ( (This)->lpVtbl -> RegisterTab(This,hwndTab,hwndMDI) )
658 #define ITaskbarList4_UnregisterTab(This,hwndTab) \
659 ( (This)->lpVtbl -> UnregisterTab(This,hwndTab) )
661 #define ITaskbarList4_SetTabOrder(This,hwndTab,hwndInsertBefore) \
662 ( (This)->lpVtbl -> SetTabOrder(This,hwndTab,hwndInsertBefore) )
664 #define ITaskbarList4_SetTabActive(This,hwndTab,hwndMDI,dwReserved) \
665 ( (This)->lpVtbl -> SetTabActive(This,hwndTab,hwndMDI,dwReserved) )
667 #define ITaskbarList4_ThumbBarAddButtons(This,hwnd,cButtons,pButton) \
668 ( (This)->lpVtbl -> ThumbBarAddButtons(This,hwnd,cButtons,pButton) )
670 #define ITaskbarList4_ThumbBarUpdateButtons(This,hwnd,cButtons,pButton) \
671 ( (This)->lpVtbl -> ThumbBarUpdateButtons(This,hwnd,cButtons,pButton) )
673 #define ITaskbarList4_ThumbBarSetImageList(This,hwnd,himl) \
674 ( (This)->lpVtbl -> ThumbBarSetImageList(This,hwnd,himl) )
676 #define ITaskbarList4_SetOverlayIcon(This,hwnd,hIcon,pszDescription) \
677 ( (This)->lpVtbl -> SetOverlayIcon(This,hwnd,hIcon,pszDescription) )
679 #define ITaskbarList4_SetThumbnailTooltip(This,hwnd,pszTip) \
680 ( (This)->lpVtbl -> SetThumbnailTooltip(This,hwnd,pszTip) )
682 #define ITaskbarList4_SetThumbnailClip(This,hwnd,prcClip) \
683 ( (This)->lpVtbl -> SetThumbnailClip(This,hwnd,prcClip) )
686 #define ITaskbarList4_SetTabProperties(This,hwndTab,stpFlags) \
687 ( (This)->lpVtbl -> SetTabProperties(This,hwndTab,stpFlags) )
689 #endif /* COBJMACROS */
692 #endif /* C style interface */
697 #endif /* __ITaskbarList4_INTERFACE_DEFINED__ */
700 #ifndef __IObjectArray_INTERFACE_DEFINED__
701 #define __IObjectArray_INTERFACE_DEFINED__
703 /* interface IObjectArray */
704 /* [unique][object][uuid][helpstring] */
707 EXTERN_C const IID IID_IObjectArray;
709 #if defined(__cplusplus) && !defined(CINTERFACE)
711 MIDL_INTERFACE("92CA9DCD-5622-4bba-A805-5E9F541BD8C9")
712 IObjectArray : public IUnknown
714 public:
715 virtual HRESULT STDMETHODCALLTYPE GetCount(
716 /* [out] */ __RPC__out UINT *pcObjects) = 0;
718 virtual HRESULT STDMETHODCALLTYPE GetAt(
719 /* [in] */ UINT uiIndex,
720 /* [in] */ __RPC__in REFIID riid,
721 /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
725 #else /* C style interface */
727 typedef struct IObjectArrayVtbl
729 BEGIN_INTERFACE
731 HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
732 __RPC__in IObjectArray * This,
733 /* [in] */ __RPC__in REFIID riid,
734 /* [annotation][iid_is][out] */
735 __RPC__deref_out void **ppvObject);
737 ULONG ( STDMETHODCALLTYPE *AddRef )(
738 __RPC__in IObjectArray * This);
740 ULONG ( STDMETHODCALLTYPE *Release )(
741 __RPC__in IObjectArray * This);
743 HRESULT ( STDMETHODCALLTYPE *GetCount )(
744 __RPC__in IObjectArray * This,
745 /* [out] */ __RPC__out UINT *pcObjects);
747 HRESULT ( STDMETHODCALLTYPE *GetAt )(
748 __RPC__in IObjectArray * This,
749 /* [in] */ UINT uiIndex,
750 /* [in] */ __RPC__in REFIID riid,
751 /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
753 END_INTERFACE
754 } IObjectArrayVtbl;
756 interface IObjectArray
758 CONST_VTBL struct IObjectArrayVtbl *lpVtbl;
763 #ifdef COBJMACROS
766 #define IObjectArray_QueryInterface(This,riid,ppvObject) \
767 ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
769 #define IObjectArray_AddRef(This) \
770 ( (This)->lpVtbl -> AddRef(This) )
772 #define IObjectArray_Release(This) \
773 ( (This)->lpVtbl -> Release(This) )
776 #define IObjectArray_GetCount(This,pcObjects) \
777 ( (This)->lpVtbl -> GetCount(This,pcObjects) )
779 #define IObjectArray_GetAt(This,uiIndex,riid,ppv) \
780 ( (This)->lpVtbl -> GetAt(This,uiIndex,riid,ppv) )
782 #endif /* COBJMACROS */
785 #endif /* C style interface */
790 #endif /* __IObjectArray_INTERFACE_DEFINED__ */
793 #ifndef __IObjectCollection_INTERFACE_DEFINED__
794 #define __IObjectCollection_INTERFACE_DEFINED__
796 /* interface IObjectCollection */
797 /* [unique][object][uuid] */
800 EXTERN_C const IID IID_IObjectCollection;
802 #if defined(__cplusplus) && !defined(CINTERFACE)
804 MIDL_INTERFACE("5632b1a4-e38a-400a-928a-d4cd63230295")
805 IObjectCollection : public IObjectArray
807 public:
808 virtual HRESULT STDMETHODCALLTYPE AddObject(
809 /* [in] */ __RPC__in_opt IUnknown *punk) = 0;
811 virtual HRESULT STDMETHODCALLTYPE AddFromArray(
812 /* [in] */ __RPC__in_opt IObjectArray *poaSource) = 0;
814 virtual HRESULT STDMETHODCALLTYPE RemoveObjectAt(
815 /* [in] */ UINT uiIndex) = 0;
817 virtual HRESULT STDMETHODCALLTYPE Clear( void) = 0;
821 #else /* C style interface */
823 typedef struct IObjectCollectionVtbl
825 BEGIN_INTERFACE
827 HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
828 __RPC__in IObjectCollection * This,
829 /* [in] */ __RPC__in REFIID riid,
830 /* [annotation][iid_is][out] */
831 __RPC__deref_out void **ppvObject);
833 ULONG ( STDMETHODCALLTYPE *AddRef )(
834 __RPC__in IObjectCollection * This);
836 ULONG ( STDMETHODCALLTYPE *Release )(
837 __RPC__in IObjectCollection * This);
839 HRESULT ( STDMETHODCALLTYPE *GetCount )(
840 __RPC__in IObjectCollection * This,
841 /* [out] */ __RPC__out UINT *pcObjects);
843 HRESULT ( STDMETHODCALLTYPE *GetAt )(
844 __RPC__in IObjectCollection * This,
845 /* [in] */ UINT uiIndex,
846 /* [in] */ __RPC__in REFIID riid,
847 /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
849 HRESULT ( STDMETHODCALLTYPE *AddObject )(
850 __RPC__in IObjectCollection * This,
851 /* [in] */ __RPC__in_opt IUnknown *punk);
853 HRESULT ( STDMETHODCALLTYPE *AddFromArray )(
854 __RPC__in IObjectCollection * This,
855 /* [in] */ __RPC__in_opt IObjectArray *poaSource);
857 HRESULT ( STDMETHODCALLTYPE *RemoveObjectAt )(
858 __RPC__in IObjectCollection * This,
859 /* [in] */ UINT uiIndex);
861 HRESULT ( STDMETHODCALLTYPE *Clear )(
862 __RPC__in IObjectCollection * This);
864 END_INTERFACE
865 } IObjectCollectionVtbl;
867 interface IObjectCollection
869 CONST_VTBL struct IObjectCollectionVtbl *lpVtbl;
874 #ifdef COBJMACROS
877 #define IObjectCollection_QueryInterface(This,riid,ppvObject) \
878 ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
880 #define IObjectCollection_AddRef(This) \
881 ( (This)->lpVtbl -> AddRef(This) )
883 #define IObjectCollection_Release(This) \
884 ( (This)->lpVtbl -> Release(This) )
887 #define IObjectCollection_GetCount(This,pcObjects) \
888 ( (This)->lpVtbl -> GetCount(This,pcObjects) )
890 #define IObjectCollection_GetAt(This,uiIndex,riid,ppv) \
891 ( (This)->lpVtbl -> GetAt(This,uiIndex,riid,ppv) )
894 #define IObjectCollection_AddObject(This,punk) \
895 ( (This)->lpVtbl -> AddObject(This,punk) )
897 #define IObjectCollection_AddFromArray(This,poaSource) \
898 ( (This)->lpVtbl -> AddFromArray(This,poaSource) )
900 #define IObjectCollection_RemoveObjectAt(This,uiIndex) \
901 ( (This)->lpVtbl -> RemoveObjectAt(This,uiIndex) )
903 #define IObjectCollection_Clear(This) \
904 ( (This)->lpVtbl -> Clear(This) )
906 #endif /* COBJMACROS */
909 #endif /* C style interface */
914 #endif /* __IObjectCollection_INTERFACE_DEFINED__ */
917 /* Additional Prototypes for ALL interfaces */
919 /* end of Additional Prototypes */
921 #ifdef __cplusplus
923 #endif
925 #endif
932 extern RPC_IF_HANDLE __MIDL_itf_shobjidl_0000_0188_v0_0_c_ifspec;
933 extern RPC_IF_HANDLE __MIDL_itf_shobjidl_0000_0188_v0_0_s_ifspec;
935 #ifndef __ICustomDestinationList_INTERFACE_DEFINED__
936 #define __ICustomDestinationList_INTERFACE_DEFINED__
938 /* interface ICustomDestinationList */
939 /* [unique][object][uuid] */
941 typedef /* [v1_enum] */
942 enum KNOWNDESTCATEGORY
943 { KDC_FREQUENT = 1,
944 KDC_RECENT = ( KDC_FREQUENT + 1 )
945 } KNOWNDESTCATEGORY;
948 EXTERN_C const IID IID_ICustomDestinationList;
950 #if defined(__cplusplus) && !defined(CINTERFACE)
952 MIDL_INTERFACE("6332debf-87b5-4670-90c0-5e57b408a49e")
953 ICustomDestinationList : public IUnknown
955 public:
956 virtual HRESULT STDMETHODCALLTYPE SetAppID(
957 /* [string][in] */ __RPC__in_string LPCWSTR pszAppID) = 0;
959 virtual HRESULT STDMETHODCALLTYPE BeginList(
960 /* [out] */ __RPC__out UINT *pcMinSlots,
961 /* [in] */ __RPC__in REFIID riid,
962 /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
964 virtual HRESULT STDMETHODCALLTYPE AppendCategory(
965 /* [string][in] */ __RPC__in_string LPCWSTR pszCategory,
966 /* [in] */ __RPC__in_opt IObjectArray *poa) = 0;
968 virtual HRESULT STDMETHODCALLTYPE AppendKnownCategory(
969 /* [in] */ KNOWNDESTCATEGORY category) = 0;
971 virtual HRESULT STDMETHODCALLTYPE AddUserTasks(
972 /* [in] */ __RPC__in_opt IObjectArray *poa) = 0;
974 virtual HRESULT STDMETHODCALLTYPE CommitList( void) = 0;
976 virtual HRESULT STDMETHODCALLTYPE GetRemovedDestinations(
977 /* [in] */ __RPC__in REFIID riid,
978 /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
980 virtual HRESULT STDMETHODCALLTYPE DeleteList(
981 /* [string][unique][in] */ __RPC__in_opt_string LPCWSTR pszAppID) = 0;
983 virtual HRESULT STDMETHODCALLTYPE AbortList( void) = 0;
987 #else /* C style interface */
989 typedef struct ICustomDestinationListVtbl
991 BEGIN_INTERFACE
993 HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
994 __RPC__in ICustomDestinationList * This,
995 /* [in] */ __RPC__in REFIID riid,
996 /* [annotation][iid_is][out] */
997 __RPC__deref_out void **ppvObject);
999 ULONG ( STDMETHODCALLTYPE *AddRef )(
1000 __RPC__in ICustomDestinationList * This);
1002 ULONG ( STDMETHODCALLTYPE *Release )(
1003 __RPC__in ICustomDestinationList * This);
1005 HRESULT ( STDMETHODCALLTYPE *SetAppID )(
1006 __RPC__in ICustomDestinationList * This,
1007 /* [string][in] */ __RPC__in_string LPCWSTR pszAppID);
1009 HRESULT ( STDMETHODCALLTYPE *BeginList )(
1010 __RPC__in ICustomDestinationList * This,
1011 /* [out] */ __RPC__out UINT *pcMinSlots,
1012 /* [in] */ __RPC__in REFIID riid,
1013 /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
1015 HRESULT ( STDMETHODCALLTYPE *AppendCategory )(
1016 __RPC__in ICustomDestinationList * This,
1017 /* [string][in] */ __RPC__in_string LPCWSTR pszCategory,
1018 /* [in] */ __RPC__in_opt IObjectArray *poa);
1020 HRESULT ( STDMETHODCALLTYPE *AppendKnownCategory )(
1021 __RPC__in ICustomDestinationList * This,
1022 /* [in] */ KNOWNDESTCATEGORY category);
1024 HRESULT ( STDMETHODCALLTYPE *AddUserTasks )(
1025 __RPC__in ICustomDestinationList * This,
1026 /* [in] */ __RPC__in_opt IObjectArray *poa);
1028 HRESULT ( STDMETHODCALLTYPE *CommitList )(
1029 __RPC__in ICustomDestinationList * This);
1031 HRESULT ( STDMETHODCALLTYPE *GetRemovedDestinations )(
1032 __RPC__in ICustomDestinationList * This,
1033 /* [in] */ __RPC__in REFIID riid,
1034 /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
1036 HRESULT ( STDMETHODCALLTYPE *DeleteList )(
1037 __RPC__in ICustomDestinationList * This,
1038 /* [string][unique][in] */ __RPC__in_opt_string LPCWSTR pszAppID);
1040 HRESULT ( STDMETHODCALLTYPE *AbortList )(
1041 __RPC__in ICustomDestinationList * This);
1043 END_INTERFACE
1044 } ICustomDestinationListVtbl;
1046 interface ICustomDestinationList
1048 CONST_VTBL struct ICustomDestinationListVtbl *lpVtbl;
1053 #ifdef COBJMACROS
1056 #define ICustomDestinationList_QueryInterface(This,riid,ppvObject) \
1057 ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
1059 #define ICustomDestinationList_AddRef(This) \
1060 ( (This)->lpVtbl -> AddRef(This) )
1062 #define ICustomDestinationList_Release(This) \
1063 ( (This)->lpVtbl -> Release(This) )
1066 #define ICustomDestinationList_SetAppID(This,pszAppID) \
1067 ( (This)->lpVtbl -> SetAppID(This,pszAppID) )
1069 #define ICustomDestinationList_BeginList(This,pcMinSlots,riid,ppv) \
1070 ( (This)->lpVtbl -> BeginList(This,pcMinSlots,riid,ppv) )
1072 #define ICustomDestinationList_AppendCategory(This,pszCategory,poa) \
1073 ( (This)->lpVtbl -> AppendCategory(This,pszCategory,poa) )
1075 #define ICustomDestinationList_AppendKnownCategory(This,category) \
1076 ( (This)->lpVtbl -> AppendKnownCategory(This,category) )
1078 #define ICustomDestinationList_AddUserTasks(This,poa) \
1079 ( (This)->lpVtbl -> AddUserTasks(This,poa) )
1081 #define ICustomDestinationList_CommitList(This) \
1082 ( (This)->lpVtbl -> CommitList(This) )
1084 #define ICustomDestinationList_GetRemovedDestinations(This,riid,ppv) \
1085 ( (This)->lpVtbl -> GetRemovedDestinations(This,riid,ppv) )
1087 #define ICustomDestinationList_DeleteList(This,pszAppID) \
1088 ( (This)->lpVtbl -> DeleteList(This,pszAppID) )
1090 #define ICustomDestinationList_AbortList(This) \
1091 ( (This)->lpVtbl -> AbortList(This) )
1093 #endif /* COBJMACROS */
1096 #endif /* C style interface */
1101 #endif /* __ICustomDestinationList_INTERFACE_DEFINED__ */
1104 #ifndef __IApplicationDestinations_INTERFACE_DEFINED__
1105 #define __IApplicationDestinations_INTERFACE_DEFINED__
1107 /* interface IApplicationDestinations */
1108 /* [unique][object][uuid] */
1111 EXTERN_C const IID IID_IApplicationDestinations;
1113 #if defined(__cplusplus) && !defined(CINTERFACE)
1115 MIDL_INTERFACE("12337d35-94c6-48a0-bce7-6a9c69d4d600")
1116 IApplicationDestinations : public IUnknown
1118 public:
1119 virtual HRESULT STDMETHODCALLTYPE SetAppID(
1120 /* [in] */ __RPC__in LPCWSTR pszAppID) = 0;
1122 virtual HRESULT STDMETHODCALLTYPE RemoveDestination(
1123 /* [in] */ __RPC__in_opt IUnknown *punk) = 0;
1125 virtual HRESULT STDMETHODCALLTYPE RemoveAllDestinations( void) = 0;
1129 #else /* C style interface */
1131 typedef struct IApplicationDestinationsVtbl
1133 BEGIN_INTERFACE
1135 HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
1136 __RPC__in IApplicationDestinations * This,
1137 /* [in] */ __RPC__in REFIID riid,
1138 /* [annotation][iid_is][out] */
1139 __RPC__deref_out void **ppvObject);
1141 ULONG ( STDMETHODCALLTYPE *AddRef )(
1142 __RPC__in IApplicationDestinations * This);
1144 ULONG ( STDMETHODCALLTYPE *Release )(
1145 __RPC__in IApplicationDestinations * This);
1147 HRESULT ( STDMETHODCALLTYPE *SetAppID )(
1148 __RPC__in IApplicationDestinations * This,
1149 /* [in] */ __RPC__in LPCWSTR pszAppID);
1151 HRESULT ( STDMETHODCALLTYPE *RemoveDestination )(
1152 __RPC__in IApplicationDestinations * This,
1153 /* [in] */ __RPC__in_opt IUnknown *punk);
1155 HRESULT ( STDMETHODCALLTYPE *RemoveAllDestinations )(
1156 __RPC__in IApplicationDestinations * This);
1158 END_INTERFACE
1159 } IApplicationDestinationsVtbl;
1161 interface IApplicationDestinations
1163 CONST_VTBL struct IApplicationDestinationsVtbl *lpVtbl;
1168 #ifdef COBJMACROS
1171 #define IApplicationDestinations_QueryInterface(This,riid,ppvObject) \
1172 ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
1174 #define IApplicationDestinations_AddRef(This) \
1175 ( (This)->lpVtbl -> AddRef(This) )
1177 #define IApplicationDestinations_Release(This) \
1178 ( (This)->lpVtbl -> Release(This) )
1181 #define IApplicationDestinations_SetAppID(This,pszAppID) \
1182 ( (This)->lpVtbl -> SetAppID(This,pszAppID) )
1184 #define IApplicationDestinations_RemoveDestination(This,punk) \
1185 ( (This)->lpVtbl -> RemoveDestination(This,punk) )
1187 #define IApplicationDestinations_RemoveAllDestinations(This) \
1188 ( (This)->lpVtbl -> RemoveAllDestinations(This) )
1190 #endif /* COBJMACROS */
1193 #endif /* C style interface */
1195 #endif /* __IApplicationDestinations_INTERFACE_DEFINED__ */
1197 EXTERN_C const CLSID CLSID_DestinationList;
1199 #ifdef __cplusplus
1201 class DECLSPEC_UUID("77f10cf0-3db5-4966-b520-b7c54fd35ed6")
1202 DestinationList;
1203 #endif
1205 EXTERN_C const CLSID CLSID_ApplicationDestinations;
1207 #ifdef __cplusplus
1209 class DECLSPEC_UUID("86c14003-4d6b-4ef3-a7b4-0506663b2e68")
1210 ApplicationDestinations;
1211 #endif
1213 EXTERN_C const CLSID CLSID_EnumerableObjectCollection;
1215 EXTERN_C const CLSID CLSID_ShellLibrary;
1217 #ifdef __cplusplus
1219 class DECLSPEC_UUID("2d3468c1-36a7-43b6-ac24-d3f02fd9607a")
1220 EnumerableObjectCollection;
1221 #endif
1223 DEFINE_PROPERTYKEY(PKEY_Title, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 2);
1224 DEFINE_PROPERTYKEY(PKEY_AppUserModel_IsDestListSeparator, 0x9F4C2855, 0x9F79, 0x4B39, 0xA8, 0xD0, 0xE1, 0xD4, 0x2D, 0xE1, 0xD5, 0xF3, 6);
1227 typedef /* [v1_enum] */
1228 enum LIBRARYMANAGEDIALOGOPTIONS
1229 { LMD_DEFAULT = 0,
1230 LMD_ALLOWUNINDEXABLENETWORKLOCATIONS = 0x1
1231 } LIBRARYMANAGEDIALOGOPTIONS;
1233 DEFINE_ENUM_FLAG_OPERATORS(LIBRARYMANAGEDIALOGOPTIONS)
1234 SHSTDAPI SHShowManageLibraryUI(__in IShellItem *psiLibrary, __in HWND hwndOwner, __in_opt LPCWSTR pszTitle, __in_opt LPCWSTR pszInstruction, __in LIBRARYMANAGEDIALOGOPTIONS lmdOptions);
1235 SHSTDAPI SHResolveLibrary(__in IShellItem *psiLibrary);
1237 #ifndef __IShellLibrary_INTERFACE_DEFINED__
1238 #define __IShellLibrary_INTERFACE_DEFINED__
1240 /* interface IShellLibrary */
1241 /* [unique][object][uuid][helpstring] */
1243 typedef /* [v1_enum] */
1244 enum LIBRARYFOLDERFILTER
1245 { LFF_FORCEFILESYSTEM = 1,
1246 LFF_STORAGEITEMS = 2,
1247 LFF_ALLITEMS = 3
1248 } LIBRARYFOLDERFILTER;
1250 typedef /* [v1_enum] */
1251 enum LIBRARYOPTIONFLAGS
1252 { LOF_DEFAULT = 0,
1253 LOF_PINNEDTONAVPANE = 0x1,
1254 LOF_MASK_ALL = 0x1
1255 } LIBRARYOPTIONFLAGS;
1257 DEFINE_ENUM_FLAG_OPERATORS(LIBRARYOPTIONFLAGS)
1258 typedef /* [v1_enum] */
1259 enum DEFAULTSAVEFOLDERTYPE
1260 { DSFT_DETECT = 1,
1261 DSFT_PRIVATE = ( DSFT_DETECT + 1 ) ,
1262 DSFT_PUBLIC = ( DSFT_PRIVATE + 1 )
1263 } DEFAULTSAVEFOLDERTYPE;
1265 typedef /* [v1_enum] */
1266 enum LIBRARYSAVEFLAGS
1267 { LSF_FAILIFTHERE = 0,
1268 LSF_OVERRIDEEXISTING = 0x1,
1269 LSF_MAKEUNIQUENAME = 0x2
1270 } LIBRARYSAVEFLAGS;
1272 DEFINE_ENUM_FLAG_OPERATORS(LIBRARYSAVEFLAGS)
1274 EXTERN_C const IID IID_IShellLibrary;
1277 #if defined(__cplusplus) && !defined(CINTERFACE)
1279 MIDL_INTERFACE("11a66efa-382e-451a-9234-1e0e12ef3085")
1280 IShellLibrary : public IUnknown
1282 public:
1283 virtual HRESULT STDMETHODCALLTYPE LoadLibraryFromItem(
1284 /* [in] */ __RPC__in_opt IShellItem *psiLibrary,
1285 /* [in] */ DWORD grfMode) = 0;
1287 virtual HRESULT STDMETHODCALLTYPE LoadLibraryFromKnownFolder(
1288 /* [in] */ __RPC__in REFKNOWNFOLDERID kfidLibrary,
1289 /* [in] */ DWORD grfMode) = 0;
1291 virtual HRESULT STDMETHODCALLTYPE AddFolder(
1292 /* [in] */ __RPC__in_opt IShellItem *psiLocation) = 0;
1294 virtual HRESULT STDMETHODCALLTYPE RemoveFolder(
1295 /* [in] */ __RPC__in_opt IShellItem *psiLocation) = 0;
1297 virtual HRESULT STDMETHODCALLTYPE GetFolders(
1298 /* [in] */ LIBRARYFOLDERFILTER lff,
1299 /* [in] */ __RPC__in REFIID riid,
1300 /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
1302 virtual HRESULT STDMETHODCALLTYPE ResolveFolder(
1303 /* [in] */ __RPC__in_opt IShellItem *psiFolderToResolve,
1304 /* [in] */ DWORD dwTimeout,
1305 /* [in] */ __RPC__in REFIID riid,
1306 /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
1308 virtual HRESULT STDMETHODCALLTYPE GetDefaultSaveFolder(
1309 /* [in] */ DEFAULTSAVEFOLDERTYPE dsft,
1310 /* [in] */ __RPC__in REFIID riid,
1311 /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
1313 virtual HRESULT STDMETHODCALLTYPE SetDefaultSaveFolder(
1314 /* [in] */ DEFAULTSAVEFOLDERTYPE dsft,
1315 /* [in] */ __RPC__in_opt IShellItem *psi) = 0;
1317 virtual HRESULT STDMETHODCALLTYPE GetOptions(
1318 /* [out] */ __RPC__out LIBRARYOPTIONFLAGS *plofOptions) = 0;
1320 virtual HRESULT STDMETHODCALLTYPE SetOptions(
1321 /* [in] */ LIBRARYOPTIONFLAGS lofMask,
1322 /* [in] */ LIBRARYOPTIONFLAGS lofOptions) = 0;
1324 virtual HRESULT STDMETHODCALLTYPE GetFolderType(
1325 /* [out] */ __RPC__out FOLDERTYPEID *pftid) = 0;
1327 virtual HRESULT STDMETHODCALLTYPE SetFolderType(
1328 /* [in] */ __RPC__in REFFOLDERTYPEID ftid) = 0;
1330 virtual HRESULT STDMETHODCALLTYPE GetIcon(
1331 /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszIcon) = 0;
1333 virtual HRESULT STDMETHODCALLTYPE SetIcon(
1334 /* [string][in] */ __RPC__in_string LPCWSTR pszIcon) = 0;
1336 virtual HRESULT STDMETHODCALLTYPE Commit( void) = 0;
1338 virtual HRESULT STDMETHODCALLTYPE Save(
1339 /* [in] */ __RPC__in_opt IShellItem *psiFolderToSaveIn,
1340 /* [string][in] */ __RPC__in_string LPCWSTR pszLibraryName,
1341 /* [in] */ LIBRARYSAVEFLAGS lsf,
1342 /* [out] */ __RPC__deref_out_opt IShellItem **ppsiSavedTo) = 0;
1344 virtual HRESULT STDMETHODCALLTYPE SaveInKnownFolder(
1345 /* [in] */ __RPC__in REFKNOWNFOLDERID kfidToSaveIn,
1346 /* [string][in] */ __RPC__in_string LPCWSTR pszLibraryName,
1347 /* [in] */ LIBRARYSAVEFLAGS lsf,
1348 /* [out] */ __RPC__deref_out_opt IShellItem **ppsiSavedTo) = 0;
1352 #else /* C style interface */
1354 typedef struct IShellLibraryVtbl
1356 BEGIN_INTERFACE
1358 HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
1359 __RPC__in IShellLibrary * This,
1360 /* [in] */ __RPC__in REFIID riid,
1361 /* [annotation][iid_is][out] */
1362 __RPC__deref_out void **ppvObject);
1364 ULONG ( STDMETHODCALLTYPE *AddRef )(
1365 __RPC__in IShellLibrary * This);
1367 ULONG ( STDMETHODCALLTYPE *Release )(
1368 __RPC__in IShellLibrary * This);
1370 HRESULT ( STDMETHODCALLTYPE *LoadLibraryFromItem )(
1371 __RPC__in IShellLibrary * This,
1372 /* [in] */ __RPC__in_opt IShellItem *psiLibrary,
1373 /* [in] */ DWORD grfMode);
1375 HRESULT ( STDMETHODCALLTYPE *LoadLibraryFromKnownFolder )(
1376 __RPC__in IShellLibrary * This,
1377 /* [in] */ __RPC__in REFKNOWNFOLDERID kfidLibrary,
1378 /* [in] */ DWORD grfMode);
1380 HRESULT ( STDMETHODCALLTYPE *AddFolder )(
1381 __RPC__in IShellLibrary * This,
1382 /* [in] */ __RPC__in_opt IShellItem *psiLocation);
1384 HRESULT ( STDMETHODCALLTYPE *RemoveFolder )(
1385 __RPC__in IShellLibrary * This,
1386 /* [in] */ __RPC__in_opt IShellItem *psiLocation);
1388 HRESULT ( STDMETHODCALLTYPE *GetFolders )(
1389 __RPC__in IShellLibrary * This,
1390 /* [in] */ LIBRARYFOLDERFILTER lff,
1391 /* [in] */ __RPC__in REFIID riid,
1392 /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
1394 HRESULT ( STDMETHODCALLTYPE *ResolveFolder )(
1395 __RPC__in IShellLibrary * This,
1396 /* [in] */ __RPC__in_opt IShellItem *psiFolderToResolve,
1397 /* [in] */ DWORD dwTimeout,
1398 /* [in] */ __RPC__in REFIID riid,
1399 /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
1401 HRESULT ( STDMETHODCALLTYPE *GetDefaultSaveFolder )(
1402 __RPC__in IShellLibrary * This,
1403 /* [in] */ DEFAULTSAVEFOLDERTYPE dsft,
1404 /* [in] */ __RPC__in REFIID riid,
1405 /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
1407 HRESULT ( STDMETHODCALLTYPE *SetDefaultSaveFolder )(
1408 __RPC__in IShellLibrary * This,
1409 /* [in] */ DEFAULTSAVEFOLDERTYPE dsft,
1410 /* [in] */ __RPC__in_opt IShellItem *psi);
1412 HRESULT ( STDMETHODCALLTYPE *GetOptions )(
1413 __RPC__in IShellLibrary * This,
1414 /* [out] */ __RPC__out LIBRARYOPTIONFLAGS *plofOptions);
1416 HRESULT ( STDMETHODCALLTYPE *SetOptions )(
1417 __RPC__in IShellLibrary * This,
1418 /* [in] */ LIBRARYOPTIONFLAGS lofMask,
1419 /* [in] */ LIBRARYOPTIONFLAGS lofOptions);
1421 HRESULT ( STDMETHODCALLTYPE *GetFolderType )(
1422 __RPC__in IShellLibrary * This,
1423 /* [out] */ __RPC__out FOLDERTYPEID *pftid);
1425 HRESULT ( STDMETHODCALLTYPE *SetFolderType )(
1426 __RPC__in IShellLibrary * This,
1427 /* [in] */ __RPC__in REFFOLDERTYPEID ftid);
1429 HRESULT ( STDMETHODCALLTYPE *GetIcon )(
1430 __RPC__in IShellLibrary * This,
1431 /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszIcon);
1433 HRESULT ( STDMETHODCALLTYPE *SetIcon )(
1434 __RPC__in IShellLibrary * This,
1435 /* [string][in] */ __RPC__in_string LPCWSTR pszIcon);
1437 HRESULT ( STDMETHODCALLTYPE *Commit )(
1438 __RPC__in IShellLibrary * This);
1440 HRESULT ( STDMETHODCALLTYPE *Save )(
1441 __RPC__in IShellLibrary * This,
1442 /* [in] */ __RPC__in_opt IShellItem *psiFolderToSaveIn,
1443 /* [string][in] */ __RPC__in_string LPCWSTR pszLibraryName,
1444 /* [in] */ LIBRARYSAVEFLAGS lsf,
1445 /* [out] */ __RPC__deref_out_opt IShellItem **ppsiSavedTo);
1447 HRESULT ( STDMETHODCALLTYPE *SaveInKnownFolder )(
1448 __RPC__in IShellLibrary * This,
1449 /* [in] */ __RPC__in REFKNOWNFOLDERID kfidToSaveIn,
1450 /* [string][in] */ __RPC__in_string LPCWSTR pszLibraryName,
1451 /* [in] */ LIBRARYSAVEFLAGS lsf,
1452 /* [out] */ __RPC__deref_out_opt IShellItem **ppsiSavedTo);
1454 END_INTERFACE
1455 } IShellLibraryVtbl;
1457 interface IShellLibrary
1459 CONST_VTBL struct IShellLibraryVtbl *lpVtbl;
1464 #ifdef COBJMACROS
1467 #define IShellLibrary_QueryInterface(This,riid,ppvObject) \
1468 ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
1470 #define IShellLibrary_AddRef(This) \
1471 ( (This)->lpVtbl -> AddRef(This) )
1473 #define IShellLibrary_Release(This) \
1474 ( (This)->lpVtbl -> Release(This) )
1477 #define IShellLibrary_LoadLibraryFromItem(This,psiLibrary,grfMode) \
1478 ( (This)->lpVtbl -> LoadLibraryFromItem(This,psiLibrary,grfMode) )
1480 #define IShellLibrary_LoadLibraryFromKnownFolder(This,kfidLibrary,grfMode) \
1481 ( (This)->lpVtbl -> LoadLibraryFromKnownFolder(This,kfidLibrary,grfMode) )
1483 #define IShellLibrary_AddFolder(This,psiLocation) \
1484 ( (This)->lpVtbl -> AddFolder(This,psiLocation) )
1486 #define IShellLibrary_RemoveFolder(This,psiLocation) \
1487 ( (This)->lpVtbl -> RemoveFolder(This,psiLocation) )
1489 #define IShellLibrary_GetFolders(This,lff,riid,ppv) \
1490 ( (This)->lpVtbl -> GetFolders(This,lff,riid,ppv) )
1492 #define IShellLibrary_ResolveFolder(This,psiFolderToResolve,dwTimeout,riid,ppv) \
1493 ( (This)->lpVtbl -> ResolveFolder(This,psiFolderToResolve,dwTimeout,riid,ppv) )
1495 #define IShellLibrary_GetDefaultSaveFolder(This,dsft,riid,ppv) \
1496 ( (This)->lpVtbl -> GetDefaultSaveFolder(This,dsft,riid,ppv) )
1498 #define IShellLibrary_SetDefaultSaveFolder(This,dsft,psi) \
1499 ( (This)->lpVtbl -> SetDefaultSaveFolder(This,dsft,psi) )
1501 #define IShellLibrary_GetOptions(This,plofOptions) \
1502 ( (This)->lpVtbl -> GetOptions(This,plofOptions) )
1504 #define IShellLibrary_SetOptions(This,lofMask,lofOptions) \
1505 ( (This)->lpVtbl -> SetOptions(This,lofMask,lofOptions) )
1507 #define IShellLibrary_GetFolderType(This,pftid) \
1508 ( (This)->lpVtbl -> GetFolderType(This,pftid) )
1510 #define IShellLibrary_SetFolderType(This,ftid) \
1511 ( (This)->lpVtbl -> SetFolderType(This,ftid) )
1513 #define IShellLibrary_GetIcon(This,ppszIcon) \
1514 ( (This)->lpVtbl -> GetIcon(This,ppszIcon) )
1516 #define IShellLibrary_SetIcon(This,pszIcon) \
1517 ( (This)->lpVtbl -> SetIcon(This,pszIcon) )
1519 #define IShellLibrary_Commit(This) \
1520 ( (This)->lpVtbl -> Commit(This) )
1522 #define IShellLibrary_Save(This,psiFolderToSaveIn,pszLibraryName,lsf,ppsiSavedTo) \
1523 ( (This)->lpVtbl -> Save(This,psiFolderToSaveIn,pszLibraryName,lsf,ppsiSavedTo) )
1525 #define IShellLibrary_SaveInKnownFolder(This,kfidToSaveIn,pszLibraryName,lsf,ppsiSavedTo) \
1526 ( (This)->lpVtbl -> SaveInKnownFolder(This,kfidToSaveIn,pszLibraryName,lsf,ppsiSavedTo) )
1528 #endif /* COBJMACROS */
1531 #endif /* C style interface */
1533 #endif /*__IShellLibrary_INTERFACE_DEFINED__*/
1535 __inline HRESULT SHCreateLibrary(__in REFIID riid, __deref_out void **ppv)
1537 return CoCreateInstance(CLSID_ShellLibrary, NULL, CLSCTX_INPROC_SERVER, riid, ppv);
1540 __inline HRESULT SHLoadLibraryFromItem(__in IShellItem *psiLibrary, __in DWORD grfMode, __in REFIID riid, __deref_out void **ppv)
1542 *ppv = NULL;
1543 IShellLibrary *plib;
1544 HRESULT hr = CoCreateInstance(CLSID_ShellLibrary, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&plib));
1545 if (SUCCEEDED(hr))
1547 hr = plib->LoadLibraryFromItem(psiLibrary, grfMode);
1548 if (SUCCEEDED(hr))
1550 hr = plib->QueryInterface(riid, ppv);
1552 plib->Release();
1554 return hr;
1557 __inline HRESULT SHLoadLibraryFromKnownFolder(__in REFKNOWNFOLDERID kfidLibrary, __in DWORD grfMode, __in REFIID riid, __deref_out void **ppv)
1559 *ppv = NULL;
1560 IShellLibrary *plib;
1561 HRESULT hr = CoCreateInstance(CLSID_ShellLibrary, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&plib));
1562 if (SUCCEEDED(hr))
1564 hr = plib->LoadLibraryFromKnownFolder(kfidLibrary, grfMode);
1565 if (SUCCEEDED(hr))
1567 hr = plib->QueryInterface(riid, ppv);
1569 plib->Release();
1571 return hr;
1574 __inline HRESULT SHLoadLibraryFromParsingName(__in PCWSTR pszParsingName, __in DWORD grfMode, __in REFIID riid, __deref_out void **ppv)
1576 *ppv = NULL;
1577 IShellItem *psiLibrary;
1578 HRESULT hr = SHCreateItemFromParsingName(pszParsingName, NULL, IID_PPV_ARGS(&psiLibrary));
1579 if (SUCCEEDED(hr))
1581 hr = SHLoadLibraryFromItem(psiLibrary, grfMode, riid, ppv);
1582 psiLibrary->Release();
1584 return hr;
1587 __inline HRESULT SHAddFolderPathToLibrary(__in IShellLibrary *plib, __in PCWSTR pszFolderPath)
1589 IShellItem *psiFolder;
1590 HRESULT hr = SHCreateItemFromParsingName(pszFolderPath, NULL, IID_PPV_ARGS(&psiFolder));
1591 if (SUCCEEDED(hr))
1593 hr = plib->AddFolder(psiFolder);
1594 psiFolder->Release();
1596 return hr;
1599 __inline HRESULT SHRemoveFolderPathFromLibrary(__in IShellLibrary *plib, __in PCWSTR pszFolderPath)
1601 PIDLIST_ABSOLUTE pidlFolder = SHSimpleIDListFromPath(pszFolderPath);
1602 HRESULT hr = pidlFolder ? S_OK : E_INVALIDARG;
1603 if (SUCCEEDED(hr))
1605 IShellItem *psiFolder;
1606 hr = SHCreateItemFromIDList(pidlFolder, IID_PPV_ARGS(&psiFolder));
1607 if (SUCCEEDED(hr))
1609 hr = plib->RemoveFolder(psiFolder);
1610 psiFolder->Release();
1612 CoTaskMemFree(pidlFolder);
1614 return hr;
1617 __inline HRESULT SHResolveFolderPathInLibrary(__in IShellLibrary *plib, __in PCWSTR pszFolderPath, __in DWORD dwTimeout, __deref_out PWSTR *ppszResolvedPath)
1619 *ppszResolvedPath = NULL;
1620 PIDLIST_ABSOLUTE pidlFolder = SHSimpleIDListFromPath(pszFolderPath);
1621 HRESULT hr = pidlFolder ? S_OK : E_INVALIDARG;
1622 if (SUCCEEDED(hr))
1624 IShellItem *psiFolder;
1625 hr = SHCreateItemFromIDList(pidlFolder, IID_PPV_ARGS(&psiFolder));
1626 if (SUCCEEDED(hr))
1628 IShellItem *psiResolved;
1629 hr = plib->ResolveFolder(psiFolder, dwTimeout, IID_PPV_ARGS(&psiResolved));
1630 if (SUCCEEDED(hr))
1632 hr = psiResolved->GetDisplayName(SIGDN_DESKTOPABSOLUTEPARSING, ppszResolvedPath);
1633 psiResolved->Release();
1635 psiFolder->Release();
1637 CoTaskMemFree(pidlFolder);
1639 return hr;
1642 __inline HRESULT SHSaveLibraryInFolderPath(__in IShellLibrary *plib, __in PCWSTR pszFolderPath, __in PCWSTR pszLibraryName, __in LIBRARYSAVEFLAGS lsf, __deref_opt_out PWSTR *ppszSavedToPath)
1644 if (ppszSavedToPath)
1646 *ppszSavedToPath = NULL;
1649 IShellItem *psiFolder;
1650 HRESULT hr = SHCreateItemFromParsingName(pszFolderPath, NULL, IID_PPV_ARGS(&psiFolder));
1651 if (SUCCEEDED(hr))
1653 IShellItem *psiSavedTo;
1654 hr = plib->Save(psiFolder, pszLibraryName, lsf, &psiSavedTo);
1655 if (SUCCEEDED(hr))
1657 if (ppszSavedToPath)
1659 hr = psiSavedTo->GetDisplayName(SIGDN_DESKTOPABSOLUTEPARSING, ppszSavedToPath);
1661 psiSavedTo->Release();
1663 psiFolder->Release();
1665 return hr;
1667 #endif /* (NTDDI_VERSION < NTDDI_WIN7) */