Leaked source code of windows server 2003
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.

68 lines
1.9 KiB

  1. // WMICtrSysmonDlg.h : Declaration of the CWMICtrSysmonDlg
  2. #ifndef __WMICTRSYSMONDLG_H_
  3. #define __WMICTRSYSMONDLG_H_
  4. #include "resource.h" // main symbols
  5. #include <atlwin.h>
  6. #include <util.h>
  7. #include "sysmon.tlh" //#import "d:\\winnt\\system32\\sysmon.ocx"
  8. #include "WmiCtrsDlg.h"
  9. using namespace SystemMonitor;
  10. enum eStatusInfo
  11. {
  12. Status_CounterNotFound,
  13. Status_Success
  14. };
  15. /////////////////////////////////////////////////////////////////////////////
  16. // CWMICtrSysmonDlg
  17. class CWMICtrSysmonDlg :
  18. public CAxDialogImpl<CWMICtrSysmonDlg>
  19. {
  20. protected:
  21. TCHAR m_strMachineName[MAX_COMPUTERNAME_LENGTH + 2];
  22. eStatusInfo m_eStatus;
  23. HANDLE m_hThread;
  24. public:
  25. HWND *m_hWndBusy;
  26. CWMICtrSysmonDlg();
  27. CWMICtrSysmonDlg(LPCTSTR strMachName);
  28. ~CWMICtrSysmonDlg();
  29. enum { IDD = IDD_WMICTR_SYSMON };
  30. BEGIN_MSG_MAP(CWMICtrSysmonDlg)
  31. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  32. COMMAND_ID_HANDLER(IDOK, OnOK)
  33. COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
  34. END_MSG_MAP()
  35. // Handler prototypes:
  36. // LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  37. // LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  38. // LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
  39. eStatusInfo GetStatus() { return m_eStatus; }
  40. LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  41. LRESULT OnOK(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  42. LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  43. friend INT_PTR CALLBACK BusyAVIDlgProc(HWND hwndDlg,
  44. UINT uMsg,
  45. WPARAM wParam,
  46. LPARAM lParam);
  47. friend DWORD WINAPI BusyThread(LPVOID lpParameter);
  48. void DisplayBusyDialog();
  49. void CloseBusyDialog();
  50. };
  51. #endif //__WMICTRSYSMONDLG_H_