Error 2501

  • Themenstarter Themenstarter thetank
  • Beginndatum Beginndatum
erstes h.file
Code:
#if !defined(AFX_BASETHRDWORKER_H__2F3F46E8_48D8_410A_AF63_A1CDE73DDDC0__INCLUDED_)
#define AFX_BASETHRDWORKER_H__2F3F46E8_48D8_410A_AF63_A1CDE73DDDC0__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// BaseThrdWorker.h : Header-Datei
//

#include "SpsThrdMaster.h"				// ID 0..999

#include "Utilities\Include\IniEx.h"
#include "Utilities\Include\Logfile.h"

#include "Utilities\Include\DBTime.h"
#include "Utilities\Include\DBAccess.h"

/////////////////////////////////////////////////////////////////////////////
// Thread CBaseThrdWorker 

class CBaseThrdWorker : public CWinThread
{
	DECLARE_DYNCREATE(CBaseThrdWorker)
protected:
	CBaseThrdWorker();           // Dynamische Erstellung verwendet geschützten Konstruktor

// Attribute
public:
	bool m_bInitDone;
	bool m_bInitOk;
	CStringArray* m_pError;

	short m_nDebugLevel;
	short m_nBlockSize;

// Operationen
public:

// Überschreibungen
	// Vom Klassen-Assistenten generierte virtuelle Funktionsüberschreibungen
	//{{AFX_VIRTUAL(CBaseThrdWorker)
	public:
	virtual BOOL InitInstance();
	virtual int ExitInstance();
	//}}AFX_VIRTUAL

// Implementierung
protected:
	virtual ~CBaseThrdWorker();
	void SendDebugMsg ();
	bool SqlCmdError (int nCmd);

	void OnThreadQuit (WPARAM wParam, LPARAM lParam);
	void OnThreadMessage (WPARAM wParam, LPARAM lParam);
	void OnThreadKeepAlive (WPARAM wParam, LPARAM lParam);

	void OnThreadMessage_Sps (int nThread, CMessage* pMsg);

	void CheckConnections ();
	void CheckController (int nDataSet);

	// Generierte Nachrichtenzuordnungsfunktionen
	//{{AFX_MSG(CBaseThrdWorker)
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()

//	void SendAllActiveDisplays ();
//	void GetDisplayData (long nType, CString& strDspList, CString& strPortList, CString& strCmdList);

//	void ScanForChangedContent (char nDspType);
//	CString RetrieveLayoutDate (CString& strLink, long nController);
//	void RetrieveLayoutFile (LPCTSTR lpLink, long nLayout, long nController);

protected:
	CString m_strError;
	CIniEx m_cIniFile;

	CDatabase m_cDb;
	CStatement m_cSt;

	CSpsThrdMaster m_cSpsThrd;
	CEngelSpsThreadMaster m_cEngelSpsThread;

private:
	CString m_strDatabase;
	CString m_strUser;
	CString m_strPswd;
	CString m_strType;
	CString m_strFile;
	long m_nConnectIv;
	long m_nRequestIv;

	CString m_strDb;
	CStringArray m_saConnected;
	CStringArray m_saToConnect;
	long m_nConnectTm;
	long m_nCtlScanTm;
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ fügt unmittelbar vor der vorhergehenden Zeile zusätzliche Deklarationen ein.

#endif // AFX_BASETHRDWORKER_H__2F3F46E8_48D8_410A_AF63_A1CDE73DDDC0__INCLUDED_

2 h.file
Code:
// EngelSpsThreadMaster.h: Schnittstelle für die Klasse CEngelSpsThreadMaster.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_ENGELSPSTHREADMASTER_H__B6D55413_E6A1_4CA0_A5F0_FE550EAB30BB__INCLUDED_)
#define AFX_ENGELSPSTHREADMASTER_H__B6D55413_E6A1_4CA0_A5F0_FE550EAB30BB__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "EngelSpsThreadWorker.h"
#include "Utilities\Include\Tcpip\Message.h"


class CEngelSpsThreadMaster  
{
public:
	CEngelSpsThreadMaster();
	~CEngelSpsThreadMaster();


	short StartThread(CString& strData);
	bool StopThread (short nThreadId = -1);
	bool PostMessage (short nThreadId, WPARAM wParam, CMessage* pData);
	bool PostKeepAlive (WPARAM wParam, LPARAM lParam);
	bool IsActive (short nThreadId);

	void SetCommonParams(CWinThread* pMaster, CStringArray* pMessage, short nDbgLevel, long nRequestIv);

	short GetThread (CString& strData);
	CString GetData (short nThreadId);

protected:
	CEngelSpsThreadWorker*	m_pChldThrd;
	CPtrArray				m_paChldThrd;

	CStringArray*			m_pErrorMsg;
	CWinThread*				m_pMasterThread;
	short					m_nDebugLevel;
	long					m_nRequestIv;

	CStringArray m_saCtlId;
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ fügt unmittelbar vor der vorhergehenden Zeile zusätzliche Deklarationen ein.

#endif // AFX_ENGELSPSTHREADMASTER_H__B6D55413_E6A1_4CA0_A5F0_FE550EAB30BB__INCLUDED_
 
Das setzt zwingend voraus, dass überall immer der zweite Header vor dem ersten includiert wird. Besser wäre es die Klasse CEngelSpsThreadMaster im ersten Header vorwärts zu deklarieren und darin dann einen Zeiger darauf zu verwenden.
 
Zurück