Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

84 lines
2.1 KiB

  1. // StresDlg.h : header file
  2. //
  3. #define SLOW_ACTIVITY 640
  4. #define MEDIUM_ACTIVITY 320
  5. #define HIGH_ACTIVITY 80
  6. #define HOG_ACTIVITY 0
  7. /////////////////////////////////////////////////////////////////////////////
  8. // CStressDlg dialog
  9. class CStressDlg : public CDialog
  10. {
  11. // Construction
  12. public:
  13. CStressDlg(CWnd* pParent = NULL); // standard constructor
  14. // Dialog Data
  15. //{{AFX_DATA(CStressDlg)
  16. enum { IDD = IDD_CPU_STRESS_DIALOG };
  17. // NOTE: the ClassWizard will add data members here
  18. //}}AFX_DATA
  19. // ClassWizard generated virtual function overrides
  20. //{{AFX_VIRTUAL(CStressDlg)
  21. protected:
  22. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  23. //}}AFX_VIRTUAL
  24. // Implementation
  25. public:
  26. DWORD m_dwProcessPriority;
  27. DWORD m_ActivityValue[4];
  28. DWORD m_PriorityValue[4];
  29. DWORD m_Active[4];
  30. HANDLE m_ThreadHandle[4];
  31. DWORD m_dwLoopValue;
  32. // working memory variables
  33. LPDWORD m_pMemory;
  34. DWORD m_dwVASize; // in DWORD elements
  35. DWORD m_dwRandomScale;
  36. protected:
  37. HICON m_hIcon;
  38. void CreateWorkerThread (DWORD);
  39. void SetThreadActivity (CComboBox *, DWORD);
  40. void SetThreadPriorityLevel (CComboBox *, DWORD);
  41. DWORD OnePercentCalibration(DWORD);
  42. // Generated message map functions
  43. //{{AFX_MSG(CStressDlg)
  44. virtual BOOL OnInitDialog();
  45. afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
  46. afx_msg void OnPaint();
  47. afx_msg HCURSOR OnQueryDragIcon();
  48. afx_msg void On1Active();
  49. afx_msg void OnSelchange1Activity();
  50. afx_msg void OnSelchange1Priority();
  51. afx_msg void On2Active();
  52. afx_msg void OnSelchange2Activity();
  53. afx_msg void OnSelchange2Priority();
  54. afx_msg void On3Active();
  55. afx_msg void OnSelchange3Activity();
  56. afx_msg void OnSelchange3Priority();
  57. afx_msg void On4Active();
  58. afx_msg void OnSelchange4Activity();
  59. afx_msg void OnSelchange4Priority();
  60. virtual void OnOK();
  61. afx_msg void OnSelchangeProcessPriority();
  62. afx_msg void OnKillfocusSharedMemSize();
  63. afx_msg void OnChangeSharedMemSize();
  64. afx_msg void OnUseMemory();
  65. afx_msg void OnClose();
  66. afx_msg void OnDestroy();
  67. //}}AFX_MSG
  68. DECLARE_MESSAGE_MAP()
  69. };
  70. typedef struct _ThreadInfoBlock {
  71. CStressDlg * Dlg;
  72. DWORD dwId;
  73. } THREAD_INFO_BLOCK, FAR * LPTHREAD_INFO_BLOCK;
  74.