// WipefreeSpace.h : Declaration of the CWipefreeSpace #ifndef __WIPEFREESPACE_H_ #define __WIPEFREESPACE_H_ #include "resource.h" // main symbols #include "../Common/CmptData.h" #include #define MAX_DRIVES 15 ///////////////////////////////////////////////////////////////////////////// // CWipefreeSpace class ATL_NO_VTABLE CWipefreeSpace : public CComObjectRootEx, public CComCoClass, public ISupportErrorInfo, public IDispatchImpl, public IPropertyPageImpl, // public CDialogImpl public CDialogImplEx, public CContextHelp { // Construction public: CWipefreeSpace() : CDialogImplEx(IDD) { m_dwTitleID = IDS_TITLEWipeFreeSpace; m_dwHelpFileID = IDS_NSHELPFILE; m_dwDocStringID = IDS_DOCSTRINGWipeFreeSpace; m_bCustomDrives = true; } ~CWipefreeSpace() { ATLTRACE(_T("Destroying WipefreeSpace\n")); } DECLARE_REGISTRY_RESOURCEID(IDR_WIPEFREESPACE) BEGIN_COM_MAP(CWipefreeSpace) COM_INTERFACE_ENTRY(ISecureShutdownDOS) COM_INTERFACE_ENTRY(IDispatch) COM_INTERFACE_ENTRY(ISupportErrorInfo) COM_INTERFACE_ENTRY_IMPL(IPropertyPage) END_COM_MAP() // ISupportsErrorInfo STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid); // ISecureShutdownDOS public: STDMETHOD(get_Info)(/*[in]*/ NightSecInfo nsItem, /*[out, retval]*/ VARIANT* pvVal); STDMETHOD(GetBatchText)(/*[out, retval]*/ BSTR* psText); STDMETHOD(SetData)(/*[in]*/ IUnknown* pUnk); // Data protected: bool m_bCustomDrives; int m_nDrives; CPropertyBag m_Data; /////////////////////////////////////////////////////////////////// // Property Sheet Stuff public: enum {IDD = IDD_WIPEFREESPACE}; BEGIN_MSG_MAP(CWipefreeSpace) MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) COMMAND_RANGE_HANDLER(IDC_FIRST_DRIVE, IDC_FIRST_DRIVE + MAX_DRIVES - 1, OnDrivesChange) CHAIN_MSG_MAP(IPropertyPageImpl) CHAIN_MSG_MAP(CContextHelp) END_MSG_MAP() BEGIN_HELP_MAP(NS_HELP_FILE) HELP_ID(IDC_FIRST_DRIVE, 4024) HELP_ID(IDC_FIRST_DRIVE2, 4024) HELP_ID(IDC_FIRST_DRIVE3, 4024) HELP_ID(IDC_FIRST_DRIVE4, 4024) HELP_ID(IDC_FIRST_DRIVE5, 4024) HELP_ID(IDC_FIRST_DRIVE6, 4024) HELP_ID(IDC_FIRST_DRIVE7, 4024) HELP_ID(IDC_FIRST_DRIVE8, 4024) HELP_ID(IDC_FIRST_DRIVE9, 4024) HELP_ID(IDC_FIRST_DRIVE10, 4024) HELP_ID(IDC_FIRST_DRIVE11, 4024) HELP_ID(IDC_FIRST_DRIVE12, 4024) HELP_ID(IDC_FIRST_DRIVE13, 4024) HELP_ID(IDC_FIRST_DRIVE14, 4024) HELP_ID(IDC_FIRST_DRIVE15, 4024) END_HELP_MAP // Property Sheet Messages LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); LRESULT OnDrivesChange(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); public: STDMETHOD(Apply)(void); }; #endif //__WIPEFREESPACE_H_