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.

69 lines
1.6 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation 1996-2001.
  5. //
  6. // File: laudit.cpp
  7. //
  8. // Contents: implementation of CLocalPolAudit
  9. //
  10. //----------------------------------------------------------------------------
  11. #include "stdafx.h"
  12. #include "wsecmgr.h"
  13. #include "attr.h"
  14. #include "resource.h"
  15. #include "snapmgr.h"
  16. #include "laudit.h"
  17. #include "util.h"
  18. #ifdef _DEBUG
  19. #define new DEBUG_NEW
  20. #undef THIS_FILE
  21. static char THIS_FILE[] = __FILE__;
  22. #endif
  23. /////////////////////////////////////////////////////////////////////////////
  24. // CLocalPolAudit dialog
  25. CLocalPolAudit::CLocalPolAudit()
  26. : CConfigAudit(IDD)
  27. {
  28. //{{AFX_DATA_INIT(CLocalPolAudit)
  29. //}}AFX_DATA_INIT
  30. m_pHelpIDs = (DWORD_PTR)a226HelpIDs;
  31. m_uTemplateResID = IDD;
  32. }
  33. /////////////////////////////////////////////////////////////////////////////
  34. // CLocalPolAudit message handlers
  35. BOOL CLocalPolAudit::OnApply()
  36. {
  37. if ( !m_bReadOnly )
  38. {
  39. DWORD dw = 0;
  40. DWORD status = 0;
  41. UpdateData(TRUE);
  42. if (m_bConfigure)
  43. {
  44. if (m_fSuccessful)
  45. dw |= AUDIT_SUCCESS;
  46. if (m_fFailed)
  47. dw |= AUDIT_FAILURE;
  48. m_pData->SetBase(dw);
  49. status = m_pSnapin->SetLocalPolInfo(m_pData->GetID(),dw);
  50. if (SCE_ERROR_VALUE != status)
  51. {
  52. m_pData->SetStatus(status);
  53. m_pData->Update(m_pSnapin);
  54. }
  55. }
  56. }
  57. // Class hieirarchy is bad - call CAttribute base method directly
  58. return CAttribute::OnApply();
  59. }