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.6 KiB

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