ReactOS 0.4.16-dev-1025-gd3456f5
drvdefext.h
Go to the documentation of this file.
1/*
2 * Provides default drive shell extension
3 *
4 * Copyright 2012 Rafal Harabien
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#ifndef _DRV_DEF_EXT_H_
22#define _DRV_DEF_EXT_H_
23
25 public CComCoClass<CDrvDefExt, &CLSID_ShellDrvDefExt>,
26 public CComObjectRootEx<CComMultiThreadModelNoCS>,
27 public IShellExtInit,
28 public IContextMenu,
29 public IShellPropSheetExt,
30 public IObjectWithSite
31{
32private:
34 VOID InitGeneralPage(HWND hwndDlg);
38
41 CComPtr<IDataObject> m_Multiple;
42
44
45public:
46 CDrvDefExt();
48
49 // IShellExtInit
50 STDMETHOD(Initialize)(PCIDLIST_ABSOLUTE pidlFolder, IDataObject *pDataObj, HKEY hkeyProgID) override;
51
52 // IContextMenu
53 STDMETHOD(QueryContextMenu)(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) override;
55 STDMETHOD(GetCommandString)(UINT_PTR idCmd, UINT uType, UINT *pwReserved, LPSTR pszName, UINT cchMax) override;
56
57 // IShellPropSheetExt
59 STDMETHOD(ReplacePage)(UINT uPageID, LPFNADDPROPSHEETPAGE pfnReplacePage, LPARAM lParam) override;
60
61 // IObjectWithSite
62 STDMETHOD(SetSite)(IUnknown *punk) override;
63 STDMETHOD(GetSite)(REFIID iid, void **ppvSite) override;
64
67
69
71 COM_INTERFACE_ENTRY_IID(IID_IShellExtInit, IShellExtInit)
72 COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu)
73 COM_INTERFACE_ENTRY_IID(IID_IShellPropSheetExt, IShellPropSheetExt)
76};
77
78#endif /* _DRV_DEF_EXT_H_ */
UINT cchMax
#define STDMETHOD(m)
Definition: basetyps.h:62
static INT_PTR CALLBACK GeneralPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: drvdefext.cpp:505
VOID PaintStaticControls(HWND hwndDlg, LPDRAWITEMSTRUCT pDrawItem)
Definition: drvdefext.cpp:192
STDMETHOD() GetCommandString(UINT_PTR idCmd, UINT uType, UINT *pwReserved, LPSTR pszName, UINT cchMax) override
Definition: drvdefext.cpp:775
STDMETHOD() QueryContextMenu(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) override
Definition: drvdefext.cpp:761
static INT_PTR CALLBACK HardwarePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: drvdefext.cpp:665
UINT m_FreeSpacePerc
Definition: drvdefext.h:40
STDMETHOD() AddPages(LPFNADDPROPSHEETPAGE pfnAddPage, LPARAM lParam) override
Definition: drvdefext.cpp:804
static INT_PTR CALLBACK ExtraPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: drvdefext.cpp:603
STDMETHOD() SetSite(IUnknown *punk) override
Definition: drvdefext.cpp:863
STDMETHOD() InvokeCommand(LPCMINVOKECOMMANDINFO lpici) override
Definition: drvdefext.cpp:768
STDMETHOD() GetSite(REFIID iid, void **ppvSite) override
Definition: drvdefext.cpp:870
WCHAR m_wszDrive[MAX_PATH]
Definition: drvdefext.h:39
VOID InitGeneralPage(HWND hwndDlg)
Definition: drvdefext.cpp:394
STDMETHOD() ReplacePage(UINT uPageID, LPFNADDPROPSHEETPAGE pfnReplacePage, LPARAM lParam) override
Definition: drvdefext.cpp:856
HRESULT AddMainPage(LPFNADDPROPSHEETPAGE pfnAddPage, LPARAM lParam)
Definition: drvdefext.cpp:782
CComPtr< IDataObject > m_Multiple
Definition: drvdefext.h:41
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
UINT uFlags
Definition: api.c:59
#define MAX_PATH
Definition: compat.h:34
#define CALLBACK
Definition: compat.h:35
#define BEGIN_COM_MAP(x)
Definition: atlcom.h:581
#define COM_INTERFACE_ENTRY_IID(iid, x)
Definition: atlcom.h:601
#define DECLARE_PROTECT_FINAL_CONSTRUCT()
Definition: atlcom.h:679
#define DECLARE_NOT_AGGREGATABLE(x)
Definition: atlcom.h:651
#define DECLARE_REGISTRY_RESOURCEID(x)
Definition: atlcom.h:645
#define END_COM_MAP()
Definition: atlcom.h:592
const IID IID_IObjectWithSite
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
static HMENU hmenu
Definition: win.c:66
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
unsigned int UINT
Definition: ndis.h:50
BOOL(CALLBACK * LPFNADDPROPSHEETPAGE)(HPROPSHEETPAGE, LPARAM)
Definition: prsht.h:327
#define REFIID
Definition: guiddef.h:118
#define IDR_DRVDEFEXT
Definition: shresdef.h:929
int32_t INT_PTR
Definition: typedefs.h:64
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
static void Initialize()
Definition: xlate.c:212
char * LPSTR
Definition: xmlstorage.h:182
__wchar_t WCHAR
Definition: xmlstorage.h:180