www.pudn.com > pdiusbd12 source.rar > D12TestDlg.h


// D12TestDlg.h : header file 
// 
 
///////////////////////////////////////////////////////////////////////////// 
// CD12TestDlg dialog 
class CD12TestDlg; 
 
struct CThreadParam { 
	HANDLE hThread; 
	CD12TestDlg* testDlg; 
	BOOLEAN bInThread; 
	BOOLEAN bUpdate; 
	UINT uiLength; 
	ULONG ulCount; 
	ULONG ulData[3]; 
	ULONG cur_rate; 
	ULONG max_rate; 
	ULONG total_time; 
    unsigned char * pcIoBuffer; 
	char driver_name[20]; 
	char pipe_name[20]; 
}; 
 
struct CKillDialogParam { 
	CThreadParam *tp[3]; 
	CD12TestDlg* testDlg; 
}; 
 
 
#define D12_DRIVERLOAD		0x01 
#define D12_DRIVERUNLOAD	0x02 
#define D12_KEYSTATUS		0x04 
 
class CD12TestDlg : public CDialog 
{ 
// Construction 
public: 
	CD12TestDlg(CWnd* pParent = NULL);	// standard constructor 
 
// Dialog Data 
	//{{AFX_DATA(CD12TestDlg) 
	enum { IDD = IDD_D12TEST_DIALOG }; 
	CButton	m_ctrlLED4; 
	CButton	m_ctrlLED3; 
	CButton	m_LoopStopBtn; 
	CButton	m_LoopStartBtn; 
	CButton	m_InStopBtn; 
	CButton	m_InStartBtn; 
	CButton	m_OutStopBtn; 
	CButton	m_OutStartBtn; 
	CString	m_OutBufferSize; 
	CString	m_InBufferSize; 
	CString	m_OutTotalBytes; 
	CString	m_OutCurSpeed; 
	CString	m_OutAverageSpeed; 
	CString	m_OutMaxSpeed; 
	CString	m_InTotalBytes; 
	CString	m_InCurSpeed; 
	CString	m_InAverageSpeed; 
	CString	m_InMaxSpeed; 
	CString	m_KeyStatus; 
	CString	m_PassCount; 
	CString	m_FailCount; 
	CString	m_LoopBufSize; 
	BOOL	m_LED1; 
	BOOL	m_LED2; 
	BOOL	m_LED3; 
	BOOL	m_LED4; 
	CString	m_LoopTotalBytes; 
	CString	m_LoopRepeatTimes; 
	//}}AFX_DATA 
 
	// ClassWizard generated virtual function overrides 
	//{{AFX_VIRTUAL(CD12TestDlg) 
	public: 
	virtual BOOL DestroyWindow(); 
	protected: 
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support 
	//}}AFX_VIRTUAL 
 
// Implementation 
protected: 
	HICON m_hIcon; 
 
	CThreadParam  m_MainRead, m_MainWrite, m_ReadWrite, m_InterruptIn, m_GenericOut; 
	CKillDialogParam m_KillDialog; 
	void 	ChangeLED(); 
 
	// Generated message map functions 
	//{{AFX_MSG(CD12TestDlg) 
	virtual BOOL OnInitDialog(); 
	virtual void OnOK( ); 
	virtual void OnCancel( ); 
 
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam); 
	afx_msg void OnPaint(); 
	afx_msg HCURSOR OnQueryDragIcon(); 
	afx_msg void OnOutStart(); 
	afx_msg void OnOutStop(); 
	afx_msg void OnInStart(); 
	afx_msg void OnInStop(); 
	afx_msg void OnOutBufferSize(); 
	afx_msg void OnInBufferSize(); 
	afx_msg void OnTimer(UINT nIDEvent); 
	afx_msg void OnLoopStart(); 
	afx_msg void OnLoopStop(); 
	afx_msg void OnLoopBufSize(); 
	afx_msg void OnLED1(); 
	afx_msg void OnLED2(); 
	afx_msg void OnLED3(); 
	afx_msg void OnLED4(); 
	afx_msg void OnLoopRepeatTimes(); 
	//}}AFX_MSG 
	DECLARE_MESSAGE_MAP() 
};