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.

162 lines
5.1 KiB

  1. //**********************************************************************
  2. // File name: icwconn1.h
  3. //
  4. // Copyright (c) 1992 - 1996 Microsoft Corporation. All rights reserved.
  5. //**********************************************************************
  6. #ifdef WIN32
  7. #define EXPORT
  8. #else
  9. #define EXPORT __export
  10. #endif
  11. #define MAX_STRING 128
  12. #define WIZ97_TITLE_FONT_PTS 12
  13. #define WM_MYINITDIALOG WM_USER
  14. #define WM_USER_DOWNLOADCOMPLETE ((WM_USER) + 1)
  15. #define CONNWIZAPPNAME TEXT("InternetConnectionWizardWClass")
  16. #define SETUPPATH_NONE TEXT("current")
  17. #define SETUPPATH_MANUAL TEXT("manual")
  18. #define SETUPPATH_AUTO TEXT("automatic")
  19. #define MAX_SETUPPATH_TOKEN 200
  20. #define MAX_PROMO 64
  21. #define SMART_QUITICW FALSE
  22. // Trace flags
  23. #define TF_ICWCONN1 0x00000010 // General ICWCONN1 stuff
  24. #define TF_GENDLG 0x00000020
  25. #define TF_ICWEXTSN 0x00000040
  26. extern INT _convert;
  27. extern HINSTANCE g_hInstance;
  28. extern WIZARDSTATE *gpWizardState;
  29. extern BOOL g_bHelpShown;
  30. extern DWORD *g_pdwDialogIDList;
  31. extern DWORD g_dwDialogIDListSize;
  32. extern BOOL gfQuitWizard;
  33. extern BOOL gfUserCancelled;
  34. extern BOOL gfUserBackedOut;
  35. extern BOOL gfUserFinished;
  36. extern BOOL gfBackedUp;
  37. extern BOOL gfReboot;
  38. extern BOOL g_bReboot;
  39. extern BOOL g_bRunOnce;
  40. extern BOOL g_bAllowCancel;
  41. extern PAGEINFO PageInfo[];
  42. extern BOOL g_fICWCONNUILoaded;
  43. extern BOOL g_fINETCFGLoaded;
  44. extern BOOL g_bRunDefaultHtm;
  45. extern TCHAR g_szShellNext[];
  46. extern TCHAR g_szBrandedHTML[];
  47. #define ICWSETTINGSPATH TEXT("Software\\Microsoft\\Internet Connection Wizard")
  48. #define ICWDESKTOPCHANGED TEXT("DesktopChanged")
  49. typedef DWORD (WINAPI *PFNIsSmartStart)(void);
  50. typedef DWORD (WINAPI *PFNIsSmartStartEx)(LPTSTR, DWORD);
  51. #define STR_BSTR 0
  52. #define STR_OLESTR 1
  53. #define BSTRFROMANSI(x) (BSTR)MakeWideStrFromAnsi((LPTSTR)(x), STR_BSTR)
  54. #define ANSIFROMOLE(x) (LPTSTR)MakeAnsiStrFromWide((LPCWSTR)(x))
  55. #define TO_ASCII(x) (TCHAR)((unsigned TCHAR)x + 0x30)
  56. LPWSTR MakeWideStrFromAnsi (LPTSTR psz, BYTE bType);
  57. LPTSTR MakeAnsiStrFromWide (LPCWSTR lpwstr);
  58. int PASCAL WinMainT(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPTSTR lpCmdLine,int nCmdShow);
  59. BOOL InitApplication(HANDLE hInstance);
  60. BOOL InitInstance(HANDLE hInstance, int nCmdShow);
  61. long FAR PASCAL EXPORT MainWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
  62. long FAR PASCAL EXPORT DocWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
  63. BOOL FAR PASCAL EXPORT About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  64. #ifdef ICWDEBUG
  65. void RemoveTempOfferDirectory (void);
  66. #endif
  67. void RemoveDownloadDirectory (void);
  68. void DeleteDirectory (LPCTSTR szDirName);
  69. BOOL DialogIDAlreadyInUse( UINT uDlgID );
  70. BOOL SetDialogIDInUse( UINT uDlgID, BOOL fInUse );
  71. BOOL WINAPI ConfigureSystem(HWND hDlg);
  72. BOOL DoesUserHaveAdminPrivleges(HINSTANCE hInstance);
  73. BOOL CheckForIEAKRestriction(HINSTANCE hInstance);
  74. BOOL CheckForOemConfigFailure(HINSTANCE hInstance);
  75. BOOL RunOemconfigIns();
  76. // Function avalable in UTIL.CPP
  77. int MsgBox(HWND hWnd,UINT nMsgID,UINT uIcon,UINT uButtons);
  78. int MsgBoxSz(HWND hWnd,LPTSTR szText,UINT uIcon,UINT uButtons);
  79. void SetICWComplete(void);
  80. void OlsFinish(void);
  81. LPTSTR GetSz(WORD wszID);
  82. BOOL ConfirmCancel(HWND hWnd);
  83. BOOL Restart(HWND hWnd);
  84. void Reboot(HWND hWnd);
  85. // String conversion in UTIL.CPP
  86. LPWSTR WINAPI A2WHelper(LPWSTR lpw, LPCSTR lpa, int nChars);
  87. LPTSTR WINAPI W2AHelper(LPTSTR lpa, LPCWSTR lpw, int nChars);
  88. #ifndef A2WHELPER
  89. #define A2WHELPER A2WHelper
  90. #define W2AHELPER W2AHelper
  91. #endif
  92. #ifdef UNICODE
  93. #define A2W(lpa) (lpa)
  94. #define W2A(lpw) (lpw)
  95. #else // UNICODE
  96. #define A2W(lpa) (\
  97. ((LPCSTR)lpa == NULL) ? NULL : (\
  98. _convert = (lstrlenA(lpa)+1),\
  99. A2WHELPER((LPWSTR) alloca(_convert*2), lpa, _convert)))
  100. #define W2A(lpw) (\
  101. ((LPCWSTR)lpw == NULL) ? NULL : (\
  102. _convert = (lstrlenW(lpw)+1)*2,\
  103. W2AHELPER((LPTSTR) alloca(_convert), lpw, _convert)))
  104. #endif // UNICODE
  105. #define A2CW(lpa) ((LPCWSTR)A2W(lpa))
  106. #define W2CA(lpw) ((LPCSTR)W2A(lpw))
  107. // For events
  108. HRESULT ConnectToICWConnectionPoint(
  109. IUnknown *punkThis,
  110. REFIID riidEvent,
  111. BOOL fConnect,
  112. IUnknown *punkTarget,
  113. DWORD *pdwCookie,
  114. IConnectionPoint **ppcpOut
  115. );
  116. // In reboot.cpp
  117. BOOL SetupForReboot(long lRebootType);
  118. void DeleteStartUpCommand();
  119. // In Desktop.cpp
  120. void UpdateWelcomeRegSetting(BOOL bSetBit);
  121. BOOL GetCompletedBit();
  122. void UndoDesktopChanges(HINSTANCE hAppInst);
  123. void QuickCompleteSignup();
  124. void ICWCleanup();
  125. void WINAPI FillWindowWithAppBackground(HWND hWndToFill, HDC hdc);
  126. void FillDCRectWithAppBackground(LPRECT lpRectDC, LPRECT lpRectApp, HDC hdc);
  127. #define MAX_PROMO 64