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.

74 lines
1.6 KiB

  1. // IISAppConfig.cpp : Implementation of CIISAppConfig
  2. #include "stdafx.h"
  3. #include "AppConfig.h"
  4. #include "IISAppConfig.h"
  5. #include "PropSheet.h"
  6. #include "MappingPage.h"
  7. #include "CacheOpt.h"
  8. #include "ProcessOpt.h"
  9. #include "AspMain.h"
  10. #include "AspDebug.h"
  11. /////////////////////////////////////////////////////////////////////////////
  12. // CIISAppConfig
  13. STDMETHODIMP CIISAppConfig::Run()
  14. {
  15. CAppPropSheet ps;
  16. CAppData data;
  17. HRESULT hr;
  18. data.m_ServerName = (LPCTSTR)m_ComputerName;
  19. data.m_UserName = (LPCTSTR)m_UserName;
  20. data.m_UserPassword = (LPCTSTR)m_UserPassword;
  21. data.m_MetaPath = (LPCTSTR)m_MetaPath;
  22. if (SUCCEEDED(hr = data.Load()))
  23. {
  24. CAppMappingPage map_page(&data);
  25. CAspMainPage asp_main(&data);
  26. CAspDebugPage asp_debug(&data);
  27. CCacheOptPage cache_page(&data);
  28. CProcessOptPage proc_page(&data);
  29. ps.AddPage(map_page);
  30. ps.AddPage(asp_main);
  31. ps.AddPage(asp_debug);
  32. if ( CMetabasePath::IsMasterInstance(data.m_MetaPath)
  33. || data.m_AppIsolated == eAppRunOutProcIsolated)
  34. {
  35. ps.AddPage(cache_page);
  36. ps.AddPage(proc_page);
  37. }
  38. if (IDOK == ps.DoModal())
  39. {
  40. hr = data.Save();
  41. }
  42. }
  43. return hr;
  44. }
  45. STDMETHODIMP CIISAppConfig::put_ComputerName(BSTR newVal)
  46. {
  47. m_ComputerName = newVal;
  48. return S_OK;
  49. }
  50. STDMETHODIMP CIISAppConfig::put_UserName(BSTR newVal)
  51. {
  52. m_UserName = newVal;
  53. return S_OK;
  54. }
  55. STDMETHODIMP CIISAppConfig::put_UserPassword(BSTR newVal)
  56. {
  57. m_UserPassword = newVal;
  58. return S_OK;
  59. }
  60. STDMETHODIMP CIISAppConfig::put_MetaPath(BSTR newVal)
  61. {
  62. m_MetaPath = newVal;
  63. return S_OK;
  64. }