1 /* Copyright (c) Mark Harmstone 2016-17
3 * This file is part of WinBtrfs.
5 * WinBtrfs is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public Licence as published by
7 * the Free Software Foundation, either version 3 of the Licence, or
8 * (at your option) any later version.
10 * WinBtrfs 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 Lesser General Public Licence for more details.
15 * You should have received a copy of the GNU Lesser General Public Licence
16 * along with WinBtrfs. If not, see <http://www.gnu.org/licenses/>. */
22 extern LONG objs_loaded
;
24 class BtrfsContextMenu
: public IShellExtInit
, IContextMenu
{
31 allow_snapshot
= FALSE
;
32 InterlockedIncrement(&objs_loaded
);
35 virtual ~BtrfsContextMenu() {
37 GlobalUnlock(stgm
.hGlobal
);
38 ReleaseStgMedium(&stgm
);
42 DeleteObject(uacicon
);
44 InterlockedDecrement(&objs_loaded
);
49 HRESULT __stdcall
QueryInterface(REFIID riid
, void **ppObj
);
51 ULONG __stdcall
AddRef() {
52 return InterlockedIncrement(&refcount
);
55 ULONG __stdcall
Release() {
56 LONG rc
= InterlockedDecrement(&refcount
);
66 virtual HRESULT __stdcall
Initialize(PCIDLIST_ABSOLUTE pidlFolder
, IDataObject
* pdtobj
, HKEY hkeyProgID
);
70 virtual HRESULT __stdcall
QueryContextMenu(HMENU hmenu
, UINT indexMenu
, UINT idCmdFirst
, UINT idCmdLast
, UINT uFlags
);
71 virtual HRESULT __stdcall
InvokeCommand(LPCMINVOKECOMMANDINFO pici
);
72 virtual HRESULT __stdcall
GetCommandString(UINT_PTR idCmd
, UINT uFlags
, UINT
* pwReserved
, LPSTR pszName
, UINT cchMax
);
76 BOOL ignore
, allow_snapshot
;
83 BOOL
reflink_copy(HWND hwnd
, const WCHAR
* fn
, const WCHAR
* dir
);