From 3f95d417d9e623ac0c74df8ef11d7a01846392dd Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 17 Sep 2003 19:07:23 +0000 Subject: Initial Import --- Shutdown/BatchFileCmpt.h | 58 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 Shutdown/BatchFileCmpt.h (limited to 'Shutdown/BatchFileCmpt.h') diff --git a/Shutdown/BatchFileCmpt.h b/Shutdown/BatchFileCmpt.h new file mode 100644 index 0000000..745f5fd --- /dev/null +++ b/Shutdown/BatchFileCmpt.h @@ -0,0 +1,58 @@ +////////////////////////////////////////////////////////////////// +// +// 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_) -- cgit v1.2.3