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.

98 lines
3.4 KiB

  1. //----------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 2001.
  5. //
  6. // File: Wiz97run.cpp
  7. //
  8. // Contents: WiF Policy Snapin - implementation of the wiz97 helper/runner functions
  9. //
  10. //
  11. // History: TaroonM
  12. // 10/30/01
  13. //
  14. //----------------------------------------------------------------------------
  15. #include "stdafx.h"
  16. #include "Wiz97run.h"
  17. //#include "Wiz97sht.h"
  18. #include "Wiz97Pol.h"
  19. //#include "Wiz97rul.h"
  20. // Rule pages includes (not in Wiz97pg.h)
  21. //#include "nfaam.h"
  22. //#include "nfaf.h"
  23. //#include "nfanp.h"
  24. #include "nfaa.h"
  25. //#include "nfatep.h"
  26. // NegPol pages
  27. //#include "negpage.h"
  28. //#include "smSimple.h"
  29. // Filter pages
  30. //#include "fnpage.h"
  31. //#include "fppage.h"
  32. //#include "fdmpage.h"
  33. //**
  34. //** Read this!!!! Wizard implementation note:
  35. //** When implementing wizards you MUST insure that ALL the pages in the
  36. //** wizard derive exclusively from either CWiz97BasePage or CSnapPage.
  37. //** This is a requirement because all pages must have the same callback
  38. //** function when MMCPropPageCallback is used.
  39. //**
  40. //** If you mix classes derived from CWiz97BasePage and CSnapPage an access
  41. //** violation will probably occur in the callback when it tries to call
  42. //** CWiz97BasePage::OnWizardRelease, but the class isn't derived from
  43. //** CWiz97BasePage.
  44. //**
  45. #ifdef WIZ97WIZARDS
  46. HRESULT CreateSecPolItemWiz97PropertyPages(CComObject<CSecPolItem> *pSecPolItem, PWIRELESS_PS_DATA pWirelessPSData, LPPROPERTYSHEETCALLBACK lpProvider)
  47. {
  48. // Create the property page(s); gets deleted when the window is destroyed
  49. CWiz97BasePage* pPolicyWelcome = new CWiz97BasePage(IDD_PROPPAGE_P_WELCOME, TRUE);
  50. CWiz97WirelessPolGenPage* pGeneralNameDescription = new CWiz97WirelessPolGenPage(IDD_PROPPAGE_G_NAMEDESCRIPTION, 0, TRUE);
  51. CWiz97PolicyDonePage* pPolicyDone = new CWiz97PolicyDonePage(IDD_PROPPAGE_N_DONE, TRUE);
  52. if ((pPolicyWelcome == NULL) ||
  53. (pGeneralNameDescription == NULL) ||
  54. (pPolicyDone == NULL))
  55. {
  56. // must be a memory condition
  57. return E_UNEXPECTED;
  58. }
  59. pPolicyWelcome->InitWiz97 (pSecPolItem, PSP_DEFAULT | PSP_HIDEHEADER, PSWIZB_NEXT, 0, 0);
  60. pGeneralNameDescription->InitWiz97 (pSecPolItem, PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE, PSWIZB_BACK | PSWIZB_NEXT,IDS_WIRELESS_PROPPAGE_PI_T_NAME, IDS_WIRELESS_PROPPAGE_PI_ST_NAME);
  61. pPolicyDone->InitWiz97 (pSecPolItem, PSP_DEFAULT | PSP_HIDEHEADER, PSWIZB_BACK | PSWIZB_FINISH,0,0);
  62. HPROPSHEETPAGE hPolicyWelcome = MyCreatePropertySheetPage(&(pPolicyWelcome->m_psp));
  63. HPROPSHEETPAGE hGeneralNameDescription = MyCreatePropertySheetPage(&(pGeneralNameDescription->m_psp));
  64. HPROPSHEETPAGE hPolicyDone = MyCreatePropertySheetPage(&(pPolicyDone->m_psp));
  65. if ((hPolicyWelcome == NULL) ||
  66. (hGeneralNameDescription == NULL) ||
  67. (hPolicyDone == NULL))
  68. {
  69. // TODO: we are leaking all these pages by bailing now
  70. return E_UNEXPECTED;
  71. }
  72. // add all the pages
  73. lpProvider->AddPage(hPolicyWelcome);
  74. lpProvider->AddPage(hGeneralNameDescription);
  75. lpProvider->AddPage(hPolicyDone);
  76. // the base class CSnapPage deletes these pages in its PropertyPageCallback
  77. return S_OK;
  78. }
  79. #endif