Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygendrvdefext.h
Go to the documentation of this file.
00001 /* 00002 * Provides default drive shell extension 00003 * 00004 * Copyright 2012 Rafal Harabien 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2.1 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public 00017 * License along with this library; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 00019 */ 00020 00021 #ifndef _DRV_DEF_EXT_H_ 00022 #define _FILE_DEF_EXT_H_ 00023 00024 class CDrvDefExt : 00025 public CComCoClass<CDrvDefExt, &CLSID_ShellDrvDefExt>, 00026 public CComObjectRootEx<CComMultiThreadModelNoCS>, 00027 public IShellExtInit, 00028 public IContextMenu, 00029 public IShellPropSheetExt, 00030 public IObjectWithSite 00031 { 00032 private: 00033 VOID PaintStaticControls(HWND hwndDlg, LPDRAWITEMSTRUCT pDrawItem); 00034 VOID InitGeneralPage(HWND hwndDlg); 00035 static INT_PTR CALLBACK GeneralPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); 00036 static INT_PTR CALLBACK ExtraPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); 00037 static INT_PTR CALLBACK HardwarePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); 00038 00039 WCHAR m_wszDrive[MAX_PATH]; 00040 UINT m_FreeSpacePerc; 00041 00042 public: 00043 CDrvDefExt(); 00044 ~CDrvDefExt(); 00045 00046 // IShellExtInit 00047 virtual HRESULT STDMETHODCALLTYPE Initialize(LPCITEMIDLIST pidlFolder, IDataObject *pDataObj, HKEY hkeyProgID); 00048 00049 // IContextMenu 00050 virtual HRESULT WINAPI QueryContextMenu(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags); 00051 virtual HRESULT WINAPI InvokeCommand(LPCMINVOKECOMMANDINFO lpici); 00052 virtual HRESULT WINAPI GetCommandString(UINT_PTR idCmd, UINT uType, UINT *pwReserved, LPSTR pszName, UINT cchMax); 00053 00054 // IShellPropSheetExt 00055 virtual HRESULT WINAPI AddPages(LPFNADDPROPSHEETPAGE pfnAddPage, LPARAM lParam); 00056 virtual HRESULT WINAPI ReplacePage(UINT uPageID, LPFNADDPROPSHEETPAGE pfnReplacePage, LPARAM lParam); 00057 00058 // IObjectWithSite 00059 virtual HRESULT WINAPI SetSite(IUnknown *punk); 00060 virtual HRESULT WINAPI GetSite(REFIID iid, void **ppvSite); 00061 00062 DECLARE_REGISTRY_RESOURCEID(IDR_DRVDEFEXT) 00063 DECLARE_NOT_AGGREGATABLE(CDrvDefExt) 00064 00065 DECLARE_PROTECT_FINAL_CONSTRUCT() 00066 00067 BEGIN_COM_MAP(CDrvDefExt) 00068 COM_INTERFACE_ENTRY_IID(IID_IShellExtInit, IShellExtInit) 00069 COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu) 00070 COM_INTERFACE_ENTRY_IID(IID_IShellPropSheetExt, IShellPropSheetExt) 00071 COM_INTERFACE_ENTRY_IID(IID_IObjectWithSite, IObjectWithSite) 00072 END_COM_MAP() 00073 }; 00074 00075 #endif // _FILE_DEF_EXT_H_ 00076 Generated on Sat May 26 2012 04:24:54 for ReactOS by
1.7.6.1
|