PortScanDlg.h
上传用户:zhyl198712
上传日期:2013-02-03
资源大小:35k
文件大小:2k
源码类别:

扫描程序

开发平台:

Visual C++

  1. // PortScanDlg.h : header file
  2. //
  3. #if !defined(AFX_PORTSCANDLG_H__6D0BE731_BC6F_4487_8F34_515E9958FC86__INCLUDED_)
  4. #define AFX_PORTSCANDLG_H__6D0BE731_BC6F_4487_8F34_515E9958FC86__INCLUDED_
  5. #if _MSC_VER > 1000
  6. #pragma once
  7. #endif // _MSC_VER > 1000
  8. #define WM_USER_PRINT_START (WM_USER+2)
  9. /////////////////////////////////////////////////////////////////////////////
  10. // CPortScanDlg dialog
  11. #define WM_USER_PRINT_START (WM_USER+2)
  12.  
  13. typedef struct
  14. {
  15. int nAttempts;
  16. CString ipAddress;
  17. CString port;
  18. BOOL bStatus;
  19. }ScanInfo;
  20. struct thread
  21. {
  22. HWND m_hwnd;
  23. CString ip;
  24. };
  25. UINT threadA(LPVOID pParam);
  26. UINT threadM(LPVOID pParam);
  27. class CPortScanDlg : public CDialog
  28. {
  29. // Construction
  30. public:
  31. CPortScanDlg(CWnd* pParent = NULL); // standard constructor
  32. ~CPortScanDlg();
  33. // Dialog Data
  34. //{{AFX_DATA(CPortScanDlg)
  35. enum { IDD = IDD_PORTSCAN_DIALOG };
  36. CEdit m_threadNumber;
  37. CButton m_buttonStop;
  38. CButton m_buttonStart;
  39. CStatic m_prompt;
  40. CProgressCtrl m_progressScan;
  41. CEdit m_portFrom;
  42. CEdit m_portTo;
  43. CEdit m_singlePort;
  44. CIPAddressCtrl m_IP;
  45. CListCtrl m_listInfo;
  46. //}}AFX_DATA
  47. // ClassWizard generated virtual function overrides
  48. //{{AFX_VIRTUAL(CPortScanDlg)
  49. protected:
  50. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  51. //}}AFX_VIRTUAL
  52. // Implementation
  53. protected:
  54. HICON m_hIcon;
  55. LRESULT OnPrintStart(WPARAM wParam,LPARAM lParam);
  56. // Generated message map functions
  57. //{{AFX_MSG(CPortScanDlg)
  58. virtual BOOL OnInitDialog();
  59. afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
  60. afx_msg void OnPaint();
  61. afx_msg HCURSOR OnQueryDragIcon();
  62. afx_msg void OnRadioSingle();
  63. afx_msg void OnRadioMulti();
  64. afx_msg void OnButtonscan();
  65. afx_msg void OnButtonsave();
  66. afx_msg void OnButtonstop();
  67. afx_msg void OnButtonabout();
  68. //}}AFX_MSG
  69. DECLARE_MESSAGE_MAP()
  70. public:
  71. public:
  72. BOOL TestConnection(CString ip,UINT nCounter);
  73. };
  74. //{{AFX_INSERT_LOCATION}}
  75. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  76. #endif // !defined(AFX_PORTSCANDLG_H__6D0BE731_BC6F_4487_8F34_515E9958FC86__INCLUDED_)