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.

124 lines
2.4 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997.
  5. //
  6. // File: R A S C L I . C P P
  7. //
  8. // Contents: Implementation of RAS Client configuration object.
  9. //
  10. // Notes:
  11. //
  12. // Author: shaunco 21 Mar 1997
  13. //
  14. //----------------------------------------------------------------------------
  15. #include "pch.h"
  16. #pragma hdrstop
  17. #include "ncmisc.h"
  18. #include "rasobj.h"
  19. extern const WCHAR c_szInfId_MS_NdisWan[];
  20. CRasCli::CRasCli ()
  21. {
  22. m_pnc = NULL;
  23. m_pnccMe = NULL;
  24. }
  25. CRasCli::~CRasCli ()
  26. {
  27. ReleaseObj (m_pnc);
  28. ReleaseObj (m_pnccMe);
  29. }
  30. //+---------------------------------------------------------------------------
  31. // INetCfgComponentControl
  32. //
  33. STDMETHODIMP
  34. CRasCli::Initialize (
  35. INetCfgComponent* pncc,
  36. INetCfg* pnc,
  37. BOOL fInstalling)
  38. {
  39. Validate_INetCfgNotify_Initialize (pncc, pnc, fInstalling);
  40. // Hold on to our the component representing us and our host
  41. // INetCfg object.
  42. AddRefObj (m_pnccMe = pncc);
  43. AddRefObj (m_pnc = pnc);
  44. return S_OK;
  45. }
  46. STDMETHODIMP
  47. CRasCli::Validate ()
  48. {
  49. return S_OK;
  50. }
  51. STDMETHODIMP
  52. CRasCli::CancelChanges ()
  53. {
  54. return S_OK;
  55. }
  56. STDMETHODIMP
  57. CRasCli::ApplyRegistryChanges ()
  58. {
  59. return S_OK;
  60. }
  61. //+---------------------------------------------------------------------------
  62. // INetCfgComponentSetup
  63. //
  64. STDMETHODIMP
  65. CRasCli::ReadAnswerFile (
  66. PCWSTR pszAnswerFile,
  67. PCWSTR pszAnswerSection)
  68. {
  69. return S_OK;
  70. }
  71. STDMETHODIMP
  72. CRasCli::Install (DWORD dwSetupFlags)
  73. {
  74. HRESULT hr;
  75. Validate_INetCfgNotify_Install(dwSetupFlags);
  76. // Install NdisWan.
  77. //
  78. hr = HrInstallComponentOboComponent (m_pnc, NULL,
  79. GUID_DEVCLASS_NETTRANS,
  80. c_szInfId_MS_NdisWan,
  81. m_pnccMe,
  82. NULL);
  83. TraceHr (ttidError, FAL, hr, FALSE, "CRasCli::Install");
  84. return hr;
  85. }
  86. STDMETHODIMP
  87. CRasCli::Removing ()
  88. {
  89. HRESULT hr;
  90. // Remove NdisWan.
  91. //
  92. hr = HrRemoveComponentOboComponent (m_pnc,
  93. GUID_DEVCLASS_NETTRANS,
  94. c_szInfId_MS_NdisWan,
  95. m_pnccMe);
  96. TraceHr (ttidError, FAL, hr, FALSE, "CRasCli::Removing");
  97. return hr;
  98. }
  99. STDMETHODIMP
  100. CRasCli::Upgrade (
  101. DWORD dwSetupFlags,
  102. DWORD dwUpgradeFromBuildNo)
  103. {
  104. return S_FALSE;
  105. }