#if !defined(AFX_ERRORREPORT_H__F910F2E1_6CAB_11D1_AC26_B05E48C10000__INCLUDED_)
#define AFX_ERRORREPORT_H__F910F2E1_6CAB_11D1_AC26_B05E48C10000__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
// ErrorReport.h : header file
//

#include <afxmt.h>


/////////////////////////////////////////////////////////////////////////////
// CErrorReport thread

class CErrorReport : public CWinThread
{
	DECLARE_DYNCREATE(CErrorReport)
protected:
//	CErrorReport();           // protected constructor used by dynamic creation

// Attributes
public:
	PASCAL EXPORT CErrorReport();           // protected constructor used by dynamic creation
	virtual ~CErrorReport();
	CString	m_csWhatHappened;
	CString	m_csResult;
	CString	m_csCorrectiveAction;
	CString	m_csComments;

	CString	m_csCaption;
	CString	m_csCaption_WhatHappened;
	CString	m_csCaption_CorrectiveAction;
	CString	m_csCaption_Results;
	CString	m_csCaption_Comments;

	int		m_nTimeout;
	UINT	m_nErrorCode;
	UINT	m_nErrorType;
	UINT	m_nVarsWhat, m_nVarsResult, m_nVarsAction;
	HKEY	m_hAppKey;

// Operations
public:
	int PASCAL EXPORT	ReportError( HKEY hAppKey, ERRORMSG errMsg, UINT delay = 45, CString csCaptions = "" );
	void PASCAL EXPORT	ReportError( ERRORMSG errMsg, UINT delay, CPoint cPoint, WORD wAlign );	// for popups

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CErrorReport)
	public:
	virtual BOOL InitInstance();
	virtual int ExitInstance();
	//}}AFX_VIRTUAL

// Implementation
protected:
//	virtual ~CErrorReport();
	void	ParseString( ERRORTYPE, CString );
	void	ParseCaptions( CString csCaptions );
	void	LogError(  CString csCommentString );
	void	LogError();
	int	ReportUserError( UINT nTimeout );
	int	ReportInformation( UINT nTimeout );
	int	ReportNonCritical();
	int	ReportSevereError();
	int	ReportRetryError( UINT nTimeout );

	// Generated message map functions
	//{{AFX_MSG(CErrorReport)
		// NOTE - the ClassWizard will add and remove member functions here.
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_ERRORREPORT_H__F910F2E1_6CAB_11D1_AC26_B05E48C10000__INCLUDED_)

