diff options
author | Stef Walter <stef@thewalter.net> | 2003-09-17 19:07:23 +0000 |
---|---|---|
committer | Stef Walter <stef@thewalter.net> | 2003-09-17 19:07:23 +0000 |
commit | 3f95d417d9e623ac0c74df8ef11d7a01846392dd (patch) | |
tree | 45ec73f2dc07eafd7f41a6f62a8cdfbaa279469f /NSCmpts/DeleteSwapFile.h |
Diffstat (limited to 'NSCmpts/DeleteSwapFile.h')
-rw-r--r-- | NSCmpts/DeleteSwapFile.h | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/NSCmpts/DeleteSwapFile.h b/NSCmpts/DeleteSwapFile.h new file mode 100644 index 0000000..4483466 --- /dev/null +++ b/NSCmpts/DeleteSwapFile.h @@ -0,0 +1,71 @@ +// DeleteSwapFile.h : Declaration of the CDeleteSwapFile + +#ifndef __DELETESWAPFILE_H_ +#define __DELETESWAPFILE_H_ + +#include "resource.h" // main symbols +#include "..\Common\CmptData.h" + +#include "appmisc.h" + +///////////////////////////////////////////////////////////////////////////// +// CDeleteSwapFile +class ATL_NO_VTABLE CDeleteSwapFile : + public CComObjectRootEx<CComSingleThreadModel>, + public CComCoClass<CDeleteSwapFile, &CLSID_DeleteSwapFile>, + public ISupportErrorInfo, + public IDispatchImpl<ISecureShutdownDOS, &IID_ISecureShutdownDOS, &LIBID_NightSecCmpts> +{ +// Construction +public: + CDeleteSwapFile() { } + ~CDeleteSwapFile() + { ATLTRACE(_T("Destroying DeleteSwapFile\n")); } + HRESULT FinalConstruct(); + +DECLARE_REGISTRY_RESOURCEID(IDR_DELETESWAPFILE) + +BEGIN_COM_MAP(CDeleteSwapFile) +// COM_INTERFACE_ENTRY_FUNC(ISecureShutdownDOS, 0, ComMapDOS) +// COM_INTERFACE_ENTRY_FUNC(ISecureShutdownWin, 0, ComMapWin) + COM_INTERFACE_ENTRY(ISecureShutdownDOS) + COM_INTERFACE_ENTRY(IDispatch) + COM_INTERFACE_ENTRY(ISupportErrorInfo) +END_COM_MAP() + + /*HRESULT WINAPI ComMapDOS(void* pv, REFIID riid, LPVOID* ppv, DWORD dw) + { + if(::GetPlatform() == VER_PLATFORM_WIN32_NT) + return S_FALSE; + + ASSERT(::IsEqualGUID(riid, IID_ISecureShutdownDOS)); + + *ppv = pv + (DWORD)offsetofclass(ISecureShutdownDOS, _ComMapClass); + } + + HRESULT WINAPI ComMapDOS(void* pv, REFIID riid, LPVOID* ppv, DWORD dw) + { + if(::GetPlatform() == VER_PLATFORM_WIN32_NT) + return S_FALSE; + + ASSERT(::IsEqualGUID(riid, IID_ISecureShutdownDOS)); + + *ppv = pv + (DWORD)offsetofclass(ISecureShutdownDOS, _ComMapClass); + }*/ + +// ISupportsErrorInfo + STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid); + +// ISecureShutdownDOS +public: + STDMETHOD(SetData)(/*[in]*/ IUnknown* pUnk); + STDMETHOD(GetBatchText)(/*[out, retval]*/ BSTR* psText); + STDMETHOD(get_Info)(/*[in]*/ NightSecInfo nsItem, /*[out, retval]*/ VARIANT* pvVal); + +// Data +protected: + CPropertyBag m_Data; + +}; + +#endif //__DELETESWAPFILE_H_ |