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.

71 lines
1.9 KiB

  1. #if !defined(AFX_WMICTRSDLG_H__676668D2_5328_47AA_B52D_C85A39D60E7D__INCLUDED_)
  2. #define AFX_WMICTRSDLG_H__676668D2_5328_47AA_B52D_C85A39D60E7D__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // WmiCtrsDlg.h : header file
  7. //
  8. #include "SshWbemHelpers.h"
  9. #define NUM_COUNTERS 8
  10. #define WM_CLOSE_BUSY_DLG WM_USER+1976
  11. INT_PTR CALLBACK CtrDlgProc(HWND hwndDlg,
  12. UINT uMsg,
  13. WPARAM wParam,
  14. LPARAM lParam);
  15. DWORD WINAPI CountersThread(LPVOID lpParameter);
  16. INT_PTR CALLBACK BusyDlgProc(HWND hwndDlg,
  17. UINT uMsg,
  18. WPARAM wParam,
  19. LPARAM lParam);
  20. typedef struct {
  21. bool currUser;
  22. COAUTHIDENTITY *authIdent;
  23. TCHAR fullAcct[100];
  24. } CREDENTIALS;
  25. class CWmiCtrsDlg
  26. {
  27. // Construction
  28. public:
  29. CWmiCtrsDlg();
  30. CWmiCtrsDlg(LPCTSTR szMachineName, LOGIN_CREDENTIALS *credentials);
  31. virtual ~CWmiCtrsDlg(void);
  32. friend INT_PTR CALLBACK CtrDlgProc(HWND hwndDlg,
  33. UINT uMsg,
  34. WPARAM wParam,
  35. LPARAM lParam);
  36. friend DWORD WINAPI CountersThread(LPVOID lpParameter);
  37. friend INT_PTR CALLBACK BusyDlgProc(HWND hwndDlg,
  38. UINT uMsg,
  39. WPARAM wParam,
  40. LPARAM lParam);
  41. INT_PTR DoModal(HWND hWnd);
  42. INT_PTR DisplayBusyDialog(HWND hWnd);
  43. void CloseBusyDialog();
  44. protected:
  45. void InitDlg(HWND hDlg);
  46. void DisplayErrorMessage(UINT ErrorId);
  47. bool m_bRun;
  48. HANDLE m_hThread;
  49. TCHAR m_szMachineName[MAX_COMPUTERNAME_LENGTH + 2]; //just in case it doesn't include wacks
  50. LOGIN_CREDENTIALS *m_pCredentials;
  51. HWND *m_pDlg;
  52. HWND *m_hWndBusy;
  53. TCHAR m_szError[1024];
  54. HWND m_hWndCounters[NUM_COUNTERS];
  55. };
  56. #endif // !defined(AFX_WMICTRSDLG_H__676668D2_5328_47AA_B52D_C85A39D60E7D__INCLUDED_)