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.

148 lines
3.2 KiB

  1. /*++
  2. Copyright (c) 1994-2000 Microsoft Corporation
  3. Module Name :
  4. IISAppConfig.cpp
  5. Abstract:
  6. Implementation of CIISAppConfig
  7. Author:
  8. Sergei Antonov (sergeia)
  9. Project:
  10. Internet Services Manager
  11. Revision History:
  12. --*/
  13. #include "stdafx.h"
  14. #include "AppConfig.h"
  15. #include "IISAppConfig.h"
  16. #include "PropSheet.h"
  17. #include "MappingPage.h"
  18. #include "CacheOpt.h"
  19. #include "ProcessOpt.h"
  20. #include "AspMain.h"
  21. #include "AspDebug.h"
  22. /////////////////////////////////////////////////////////////////////////////
  23. // CIISAppConfig
  24. STDMETHODIMP CIISAppConfig::Run()
  25. {
  26. CAppPropSheet ps;
  27. CAppData data;
  28. HRESULT hr;
  29. data.m_ServerName = (LPCTSTR)m_ComputerName;
  30. data.m_UserName = (LPCTSTR)m_UserName;
  31. data.m_UserPassword = (LPCTSTR)m_UserPassword;
  32. data.m_MetaPath = (LPCTSTR)m_MetaPath;
  33. data.m_HelpPath = (LPCTSTR)m_HelpPath;
  34. data.m_dwVersion = m_Version;
  35. data.m_fCompatMode = m_CompatMode;
  36. data.m_pSheet = &ps;
  37. if (SUCCEEDED(hr = data.Load()))
  38. {
  39. CAppMappingPage map_page(&data);
  40. CAspMainPage asp_main(&data);
  41. CAspDebugPage asp_debug(&data);
  42. CCacheOptPage cache_page(&data);
  43. CCacheOptPage_iis5 cache_page_iis5(&data);
  44. CProcessOptPage proc_page(&data);
  45. ps.m_psh.dwFlags |= PSH_HASHELP;
  46. ps.m_psh.dwFlags |= PSH_NOCONTEXTHELP;
  47. map_page.m_psp.dwFlags |= PSP_HASHELP;
  48. asp_main.m_psp.dwFlags |= PSP_HASHELP;
  49. asp_debug.m_psp.dwFlags |= PSP_HASHELP;
  50. cache_page.m_psp.dwFlags |= PSP_HASHELP;
  51. cache_page_iis5.m_psp.dwFlags |= PSP_HASHELP;
  52. proc_page.m_psp.dwFlags |= PSP_HASHELP;
  53. ps.AddPage(map_page);
  54. ps.AddPage(asp_main);
  55. ps.AddPage(asp_debug);
  56. if ( (LOWORD(m_Version) >= 6 && m_CompatMode)
  57. || LOWORD(m_Version) < 6
  58. )
  59. {
  60. if ( CMetabasePath::IsMasterInstance(data.m_MetaPath)
  61. || data.m_AppIsolated == eAppRunOutProcIsolated
  62. )
  63. {
  64. if (LOWORD(m_Version) == 5 && HIWORD(m_Version) == 0)
  65. {
  66. ps.AddPage(cache_page_iis5);
  67. }
  68. else
  69. {
  70. ps.AddPage(cache_page);
  71. }
  72. }
  73. }
  74. if ( (LOWORD(m_Version) >= 6 && m_CompatMode)
  75. || LOWORD(m_Version) < 6
  76. )
  77. {
  78. if ( CMetabasePath::IsMasterInstance(data.m_MetaPath)
  79. || data.m_AppIsolated == eAppRunOutProcIsolated
  80. )
  81. {
  82. ps.AddPage(proc_page);
  83. }
  84. }
  85. if (IDOK == ps.DoModal())
  86. {
  87. hr = data.Save();
  88. }
  89. }
  90. return hr;
  91. }
  92. STDMETHODIMP CIISAppConfig::put_ComputerName(BSTR newVal)
  93. {
  94. m_ComputerName = newVal;
  95. return S_OK;
  96. }
  97. STDMETHODIMP CIISAppConfig::put_UserName(BSTR newVal)
  98. {
  99. m_UserName = newVal;
  100. return S_OK;
  101. }
  102. STDMETHODIMP CIISAppConfig::put_UserPassword(BSTR newVal)
  103. {
  104. m_UserPassword = newVal;
  105. return S_OK;
  106. }
  107. STDMETHODIMP CIISAppConfig::put_MetaPath(BSTR newVal)
  108. {
  109. m_MetaPath = newVal;
  110. return S_OK;
  111. }
  112. STDMETHODIMP CIISAppConfig::put_HelpPath(BSTR newVal)
  113. {
  114. m_HelpPath = newVal;
  115. return S_OK;
  116. }
  117. STDMETHODIMP CIISAppConfig::put_ServiceVersion(DWORD newVal)
  118. {
  119. m_Version = newVal;
  120. return S_OK;
  121. }
  122. STDMETHODIMP CIISAppConfig::put_ServiceCompatMode(BOOL newVal)
  123. {
  124. m_CompatMode = newVal;
  125. return S_OK;
  126. }