////////////////////////////////////////////////////////////////// // // BatchFileCmpt.h: interface for the CBatchFileCmpt class. // // CBatchFileCmpt is a Host Implemented component only for this // program it derives from CComponentHolder so it can fit // into the main program array of components and then overrides // most of the funtions. // // It's DoShutdown function creates the batchfile for all the DOS // Components // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_BATCHFILECMPT_H__2DCE7A04_2D47_11D2_B2D4_0020182B97FC__INCLUDED_) #define AFX_BATCHFILECMPT_H__2DCE7A04_2D47_11D2_B2D4_0020182B97FC__INCLUDED_ #if _MSC_VER >= 1000 #pragma once #endif // _MSC_VER >= 1000 #include "..\common\ComponentHolder.h" class CBatchFileCmpt : public CComponentHolder { public: CBatchFileCmpt(); virtual ~CBatchFileCmpt(); // Override virtual HRESULT DoShutdown(DWORD dwMode, HWND hWndParent = NULL); protected: HRESULT ReportLastError(string sMessage); // Helper Functions HRESULT MakeBatchFile(); HRESULT GetCurBatchFile(const string& sFileName, string& sPreText, string& sPostText); HRESULT CallBatchFile(); bool m_bBatchFile; public: // Override these fellows to prevent problems virtual bool IsEnabled() { return true; }; virtual bool Enable(bool bEnable) { return bEnable; } ; virtual int GetPos() { return 20; } ; virtual bool SetPos(int nPos) { return false; } ; virtual HRESULT GetBatchText(string& sBatchText) { return E_NOTIMPL; }; virtual IUnknown* GetUnknown() { return NULL; }; virtual UINT GetType() { return COMPONENT_WIN; }; }; #endif // !defined(AFX_BATCHFILECMPT_H__2DCE7A04_2D47_11D2_B2D4_0020182B97FC__INCLUDED_)