ReactOS 0.4.16-dev-122-g325d74c
contextmenu.h
Go to the documentation of this file.
1/* Copyright (c) Mark Harmstone 2016-17
2 *
3 * This file is part of WinBtrfs.
4 *
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.
9 *
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.
14 *
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/>. */
17
18#pragma once
19
20#include <shlobj.h>
21
22extern LONG objs_loaded;
23
25public:
27 refcount = 0;
28 ignore = true;
29 stgm_set = false;
30 uacicon = nullptr;
31 allow_snapshot = false;
33 }
34
36 if (stgm_set) {
37 GlobalUnlock(stgm.hGlobal);
39 }
40
41 if (uacicon)
43
45 }
46
47 // IUnknown
48
50
53 }
54
57
58 if (rc == 0)
59 delete this;
60
61 return rc;
62 }
63
64 // IShellExtInit
65
66 virtual HRESULT __stdcall Initialize(PCIDLIST_ABSOLUTE pidlFolder, IDataObject* pdtobj, HKEY hkeyProgID);
67
68 // IContextMenu
69
70 virtual HRESULT __stdcall QueryContextMenu(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags);
72 virtual HRESULT __stdcall GetCommandString(UINT_PTR idCmd, UINT uFlags, UINT* pwReserved, LPSTR pszName, UINT cchMax);
73
74private:
77 bool bg;
78 wstring path;
79 STGMEDIUM stgm;
82
83 void reflink_copy(HWND hwnd, const WCHAR* fn, const WCHAR* dir);
84 void get_uac_icon();
85};
UINT cchMax
unsigned int dir
Definition: maze.c:112
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
STGMEDIUM stgm
Definition: contextmenu.h:79
ULONG __stdcall Release()
Definition: contextmenu.h:55
HRESULT __stdcall QueryInterface(REFIID riid, void **ppObj)
Definition: contextmenu.cpp:70
virtual HRESULT __stdcall GetCommandString(UINT_PTR idCmd, UINT uFlags, UINT *pwReserved, LPSTR pszName, UINT cchMax)
virtual HRESULT __stdcall QueryContextMenu(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags)
virtual HRESULT __stdcall InvokeCommand(LPCMINVOKECOMMANDINFO pici)
void reflink_copy(HWND hwnd, const WCHAR *fn, const WCHAR *dir)
virtual ~BtrfsContextMenu()
Definition: contextmenu.h:35
ULONG __stdcall AddRef()
Definition: contextmenu.h:51
LONG objs_loaded
Definition: main.cpp:48
UINT uFlags
Definition: api.c:59
void WINAPI ReleaseStgMedium(STGMEDIUM *pmedium)
Definition: ole2.c:2033
pKey DeleteObject()
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
Definition: heapmem.c:1190
REFIID riid
Definition: atlbase.h:39
struct IContextMenu::tagCMINVOKECOMMANDINFO * LPCMINVOKECOMMANDINFO
static HBITMAP
Definition: button.c:44
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
unsigned int UINT
Definition: ndis.h:50
long LONG
Definition: pedump.c:60
#define REFIID
Definition: guiddef.h:118
#define __stdcall
Definition: typedefs.h:25
uint32_t ULONG
Definition: typedefs.h:59
static GLenum _GLUfuncptr fn
Definition: wgl_font.c:159
static HMENU hmenu
Definition: win.c:66
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
static void Initialize()
Definition: xlate.c:212
char * LPSTR
Definition: xmlstorage.h:182
__wchar_t WCHAR
Definition: xmlstorage.h:180