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.

101 lines
3.6 KiB

  1. //*********************************************************************
  2. //* Microsoft Windows **
  3. //* Copyright(c) Microsoft Corp., 1994 **
  4. //*********************************************************************
  5. //
  6. // ISPERR.CPP - Functions for ISP error dialog page
  7. //
  8. // HISTORY:
  9. //
  10. // 08/14/98 vyung created
  11. //
  12. //*********************************************************************
  13. #include "pre.h"
  14. #include "icwextsn.h"
  15. /*******************************************************************
  16. NAME: ISPErrorInitProc
  17. SYNOPSIS: This is a transparent page.
  18. ENTRY: hDlg - dialog window
  19. fFirstInit - TRUE if this is the first time the dialog
  20. is initialized, FALSE if this InitProc has been called
  21. before (e.g. went past this page and backed up)
  22. ********************************************************************/
  23. BOOL CALLBACK ISPErrorInitProc
  24. (
  25. HWND hDlg,
  26. BOOL fFirstInit,
  27. UINT *puNextPage
  28. )
  29. {
  30. // This is a transparent page to determine which page to go
  31. // next based on error condition
  32. if (!fFirstInit)
  33. {
  34. if (gpICWCONNApprentice)
  35. gpICWCONNApprentice->SetStateDataFromDllToExe( &gpWizardState->cmnStateData);
  36. // if we've travelled through external apprentice pages,
  37. // it's easy for our current page pointer to get munged,
  38. // so reset it here for sanity's sake.
  39. if (gpWizardState->cmnStateData.bOEMCustom)
  40. gpWizardState->uCurrentPage = ORD_PAGE_ENDOEMCUSTOM;
  41. else
  42. gpWizardState->uCurrentPage = ORD_PAGE_END;
  43. // there was a data corruption in download, go to server error page
  44. if (gpWizardState->cmnStateData.bParseIspinfo)
  45. {
  46. // Re-build the history list since we substract 1 in refdial
  47. gpWizardState->uPagesCompleted++;
  48. *puNextPage = ORD_PAGE_REFSERVERR;
  49. }
  50. else if (gpWizardState->cmnStateData.bPhoneManualWiz)
  51. {
  52. // If we are in OEM custom mode, then goto the manual page
  53. // which will handle switching to the external manual wizard
  54. if (gpWizardState->cmnStateData.bOEMCustom)
  55. {
  56. *puNextPage = ORD_PAGE_MANUALOPTIONS;
  57. }
  58. else
  59. {
  60. if (LoadInetCfgUI( hDlg,
  61. IDD_PAGE_REFSERVDIAL,
  62. IDD_PAGE_END,
  63. WIZ_HOST_ICW_PHONE))
  64. {
  65. if( DialogIDAlreadyInUse( g_uICWCONNUIFirst) )
  66. {
  67. // Re-build the history list since we substract 1 in refdial
  68. gpWizardState->uPagesCompleted++;
  69. // we're about to jump into the external apprentice, and we don't want
  70. // this page to show up in our history list
  71. *puNextPage = g_uICWCONNUIFirst;
  72. g_bAllowCancel = TRUE;
  73. }
  74. }
  75. gpWizardState->cmnStateData.bPhoneManualWiz = FALSE;
  76. gpICWCONNApprentice->SetStateDataFromExeToDll( &gpWizardState->cmnStateData);
  77. }
  78. }
  79. else
  80. {
  81. // Normal case goes to End page
  82. if (gpWizardState->cmnStateData.bOEMCustom)
  83. *puNextPage = ORD_PAGE_ENDOEMCUSTOM;
  84. else
  85. *puNextPage = ORD_PAGE_END;
  86. }
  87. }
  88. return TRUE;
  89. }