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.

103 lines
2.2 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. valwait.cpp
  5. Abstract:
  6. Implements Validate Wait Dialog class
  7. Author:
  8. Ran Kalach [rankala] 23-May-2000
  9. Revision History:
  10. --*/
  11. // valwait.cpp : implementation file
  12. //
  13. #include "stdafx.h"
  14. #include "valwait.h"
  15. #include "wzunmang.h"
  16. /////////////////////////////////////////////////////////////////////////////
  17. // CValWaitDlg dialog
  18. CValWaitDlg::CValWaitDlg(CUnmanageWizard *pSheet, CWnd* pParent)
  19. : CDialog(CValWaitDlg::IDD, pParent)
  20. {
  21. WsbTraceIn( L"CValWaitDlg::CValWaitDlg", L"" );
  22. //{{AFX_DATA_INIT(CValWaitDlg)
  23. // NOTE: the ClassWizard will add member initialization here
  24. //}}AFX_DATA_INIT
  25. // Store volume name
  26. m_pSheet = pSheet;
  27. WsbTraceOut( L"CValWaitDlg::CValWaitDlg", L"" );
  28. }
  29. void CValWaitDlg::DoDataExchange(CDataExchange* pDX)
  30. {
  31. CDialog::DoDataExchange(pDX);
  32. //{{AFX_DATA_MAP(CValWaitDlg)
  33. DDX_Control(pDX, IDC_ANIMATE_VALIDATE, m_Animation);
  34. //}}AFX_DATA_MAP
  35. }
  36. BEGIN_MESSAGE_MAP(CValWaitDlg, CDialog)
  37. //{{AFX_MSG_MAP(CValWaitDlg)
  38. //}}AFX_MSG_MAP
  39. END_MESSAGE_MAP()
  40. /////////////////////////////////////////////////////////////////////////////
  41. // CValWaitDlg message handlers
  42. void CValWaitDlg::OnCancel()
  43. {
  44. WsbTraceIn( L"CValWaitDlg::OnCancel", L"" );
  45. HRESULT hr = S_OK;
  46. try {
  47. CComPtr<IHsmServer> pHsmServer;
  48. // Cancel the Validate job - the wizard will close this dialog when the job finishes
  49. WsbAffirmPointer(m_pSheet);
  50. WsbAffirmHrOk(m_pSheet->GetHsmServer(&pHsmServer));
  51. WsbAffirmHr(RsCancelDirectFsaJob(HSM_JOB_DEF_TYPE_VALIDATE, pHsmServer,
  52. m_pSheet->m_pFsaResource));
  53. } WsbCatch(hr);
  54. WsbTraceOut( L"CValWaitDlg::OnCancel", L"" );
  55. }
  56. void CValWaitDlg::PostNcDestroy()
  57. {
  58. CDialog::PostNcDestroy();
  59. // Delete the object - required for modeless dialogbox
  60. delete( this );
  61. }
  62. BOOL CValWaitDlg::OnInitDialog()
  63. {
  64. CDialog::OnInitDialog();
  65. // Start up the animation
  66. if (m_Animation.Open( IDR_VALIDATE_ANIM )) {
  67. m_Animation.Play( 0, -1, -1 );
  68. }
  69. return TRUE;
  70. }