2 * Provides default drive shell extension
4 * Copyright 2012 Rafal Harabien
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.
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.
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
21 #ifndef _DRV_DEF_EXT_H_
22 #define _DRV_DEF_EXT_H_
25 public CComCoClass
<CDrvDefExt
, &CLSID_ShellDrvDefExt
>,
26 public CComObjectRootEx
<CComMultiThreadModelNoCS
>,
29 public IShellPropSheetExt
,
30 public IObjectWithSite
33 VOID
PaintStaticControls(HWND hwndDlg
, LPDRAWITEMSTRUCT pDrawItem
);
34 VOID
InitGeneralPage(HWND hwndDlg
);
35 static INT_PTR CALLBACK
GeneralPageProc(HWND hwndDlg
, UINT uMsg
, WPARAM wParam
, LPARAM lParam
);
36 static INT_PTR CALLBACK
ExtraPageProc(HWND hwndDlg
, UINT uMsg
, WPARAM wParam
, LPARAM lParam
);
37 static INT_PTR CALLBACK
HardwarePageProc(HWND hwndDlg
, UINT uMsg
, WPARAM wParam
, LPARAM lParam
);
39 WCHAR m_wszDrive
[MAX_PATH
];
47 virtual HRESULT STDMETHODCALLTYPE
Initialize(LPCITEMIDLIST pidlFolder
, IDataObject
*pDataObj
, HKEY hkeyProgID
);
50 virtual HRESULT WINAPI
QueryContextMenu(HMENU hmenu
, UINT indexMenu
, UINT idCmdFirst
, UINT idCmdLast
, UINT uFlags
);
51 virtual HRESULT WINAPI
InvokeCommand(LPCMINVOKECOMMANDINFO lpici
);
52 virtual HRESULT WINAPI
GetCommandString(UINT_PTR idCmd
, UINT uType
, UINT
*pwReserved
, LPSTR pszName
, UINT cchMax
);
55 virtual HRESULT WINAPI
AddPages(LPFNADDPROPSHEETPAGE pfnAddPage
, LPARAM lParam
);
56 virtual HRESULT WINAPI
ReplacePage(UINT uPageID
, LPFNADDPROPSHEETPAGE pfnReplacePage
, LPARAM lParam
);
59 virtual HRESULT WINAPI
SetSite(IUnknown
*punk
);
60 virtual HRESULT WINAPI
GetSite(REFIID iid
, void **ppvSite
);
62 DECLARE_REGISTRY_RESOURCEID(IDR_DRVDEFEXT
)
63 DECLARE_NOT_AGGREGATABLE(CDrvDefExt
)
65 DECLARE_PROTECT_FINAL_CONSTRUCT()
67 BEGIN_COM_MAP(CDrvDefExt
)
68 COM_INTERFACE_ENTRY_IID(IID_IShellExtInit
, IShellExtInit
)
69 COM_INTERFACE_ENTRY_IID(IID_IContextMenu
, IContextMenu
)
70 COM_INTERFACE_ENTRY_IID(IID_IShellPropSheetExt
, IShellPropSheetExt
)
71 COM_INTERFACE_ENTRY_IID(IID_IObjectWithSite
, IObjectWithSite
)
75 #endif /* _DRV_DEF_EXT_H_ */