// DeleteSwapFile.cpp : Implementation of CDeleteSwapFile #include "stdafx.h" #include "NSCmpts.h" #include "DeleteSwapFile.h" #include "../Common/Defines.h" #include #include ///////////////////////////////////////////////////////////////////////////// // CDeleteSwapFile STDMETHODIMP CDeleteSwapFile::InterfaceSupportsErrorInfo(REFIID riid) { static const IID* arr[] = { &IID_ISecureShutdownDOS, }; for (int i=0;i= 0x80000000); // Format and return string string sRetVal; string sWinFolder; if(!GetWindowsDirectory(sWinFolder.get_buffer(MAX_PATH), MAX_PATH)) sWinFolder = _T("C:\\WINDOWS"); sRetVal.format(IDS_DELSWAP_BATCHTEXT, (LPCTSTR)sWinFolder, (LPCTSTR)sWinFolder); CComBSTR bsRet(sRetVal); *psText = bsRet.Detach(); return S_OK; } //////////////////////////////////////////////////////// // Called to initialize our data object STDMETHODIMP CDeleteSwapFile::SetData(IUnknown* pUnk) { // Just let CProperty Bag do it return m_Data.Initialize(pUnk); } //////////////////////////////////////////////////////// // Returns Info about our object STDMETHODIMP CDeleteSwapFile::get_Info(NightSecInfo nsItem, VARIANT* pvVal) { ::VariantClear(pvVal); CComBSTR bsRetVal; switch(nsItem) { case nsName: pvVal->vt = VT_BSTR; bsRetVal.LoadString(IDS_DELSWAP_NAME); pvVal->bstrVal = bsRetVal.Detach(); return S_OK; case nsHelpText: pvVal->vt = VT_BSTR; bsRetVal.LoadString(IDS_DELSWAP_DESC); pvVal->bstrVal = bsRetVal.Detach(); return S_OK; } ::VariantClear(pvVal); return S_FALSE; }