Source code of Windows XP (NT5)
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.

79 lines
2.1 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation 1996-2001.
  5. //
  6. // File: applcnfg.cpp
  7. //
  8. // Contents: implementation of CApplyConfiguration
  9. //
  10. //----------------------------------------------------------------------------
  11. #include "stdafx.h"
  12. #include "wsecmgr.h"
  13. #include "wrapper.h"
  14. #include "snapmgr.h"
  15. #include "applcnfg.h"
  16. #ifdef _DEBUG
  17. #define new DEBUG_NEW
  18. #undef THIS_FILE
  19. static char THIS_FILE[] = __FILE__;
  20. #endif
  21. /////////////////////////////////////////////////////////////////////////////
  22. // CApplyConfiguration dialog
  23. CApplyConfiguration::CApplyConfiguration()
  24. : CPerformAnalysis(0, IDD)
  25. {
  26. //{{AFX_DATA_INIT(CApplyConfiguration)
  27. // NOTE: the ClassWizard will add member initialization here
  28. //}}AFX_DATA_INIT
  29. }
  30. void CApplyConfiguration::DoDataExchange(CDataExchange* pDX)
  31. {
  32. CPerformAnalysis::DoDataExchange(pDX);
  33. //{{AFX_DATA_MAP(CApplyConfiguration)
  34. // NOTE: the ClassWizard will add DDX and DDV calls here
  35. //}}AFX_DATA_MAP
  36. }
  37. BEGIN_MESSAGE_MAP(CApplyConfiguration, CPerformAnalysis)
  38. //{{AFX_MSG_MAP(CApplyConfiguration)
  39. //}}AFX_MSG_MAP
  40. END_MESSAGE_MAP()
  41. /////////////////////////////////////////////////////////////////////////////
  42. // CApplyConfiguration message handlers
  43. //+--------------------------------------------------------------------------
  44. //
  45. // Method: DoIt
  46. //
  47. // Synopsis: Actually configures the system (called from OnOK in the parent
  48. // class)
  49. //
  50. //---------------------------------------------------------------------------
  51. DWORD CApplyConfiguration::DoIt() {
  52. //
  53. // Store the log file we're using for next time
  54. //
  55. LPTSTR szLogFile = m_strLogFile.GetBuffer(0);
  56. m_pComponentData ->GetWorkingDir(GWD_CONFIGURE_LOG,&szLogFile,TRUE,TRUE);
  57. m_strLogFile.ReleaseBuffer();
  58. //
  59. // We don't wan't to pass a pointer to an empty string.
  60. //
  61. return ApplyTemplate(
  62. NULL,
  63. m_strDataBase.IsEmpty() ? NULL : (LPCTSTR)m_strDataBase,
  64. m_strLogFile.IsEmpty() ? NULL : (LPCTSTR)m_strLogFile,
  65. AREA_ALL
  66. );
  67. }