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.

241 lines
6.8 KiB

  1. //****************************************************************************
  2. //
  3. // Module: ISIGNUP.EXE
  4. // File: isignup.h
  5. // Content: This is the "main" include file for the internet signup "wizard".
  6. // History:
  7. // Sat 10-Mar-1996 23:50:40 -by- Mark MacLin [mmaclin]
  8. //
  9. // Copyright (c) Microsoft Corporation 1991-1996
  10. //
  11. //****************************************************************************
  12. #ifndef ISIGNUP_H
  13. #define ISIGNUP_H
  14. #ifdef DEBUG
  15. #define DebugOut(sz) OutputDebugString(sz)
  16. void _ISIGN32_Assert(LPCTSTR, unsigned);
  17. #define ISIGN32_ASSERT(f) \
  18. if (f) \
  19. {} \
  20. else \
  21. _ISIGN32_Assert(TEXT(__FILE__), __LINE__)
  22. #else
  23. #define DebugOut(sz)
  24. #define ISIGN32_ASSERT(f)
  25. #endif
  26. #include <windows.h>
  27. #ifdef WIN32
  28. #include <regstr.h>
  29. #endif
  30. #ifdef WIN32
  31. #include <ras.h>
  32. #include <raserror.h>
  33. //#include <rnaph.h>
  34. #include "ras2.h"
  35. #else
  36. #include <rasc.h>
  37. #include <raserr.h>
  38. #endif
  39. #ifdef WIN32
  40. #define EXPORT
  41. #else
  42. //typedef DWORD HRESULT;
  43. #include <shellapi.h>
  44. #include <ctype.h>
  45. #include <win16def.h>
  46. #define CharPrev(start, current) (((LPTSTR)(current)) - 1)
  47. #define CharNext(current) (((LPTSTR)(current)) + 1)
  48. #define LocalAlloc(flag, size) MyLocalAlloc(flag, size)
  49. #define LocalFree(lpv) MyLocalFree(lpv)
  50. //#define ERROR_PATH_NOT_FOUND ERROR_CANTOPEN
  51. #define EXPORT _export
  52. #endif
  53. #include "icwunicd.h"
  54. #include "..\inc\inetcfg.h"
  55. #include "extfunc.h"
  56. #include "rsrc.h"
  57. #define WM_PROCESSISP WM_USER + 1 //used by IE OLE Automation
  58. // 8/19/96 jmazner Normandy #4571
  59. #ifdef WIN32
  60. // Note that bryanst and marcl have confirmed that this key will work for IE 3 and IE 4
  61. #define IE_PATHKEY TEXT("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\IEXPLORE.EXE")
  62. #define ICW20_PATHKEY TEXT("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\ICWCONN1.EXE")
  63. // Lowest IE we want to work with is IE 3,
  64. // which has major.minor.release.build version # > 4.70.0.1155
  65. // (note that IE 2 has major.minor of 4.40)
  66. //
  67. // The HUMAN_READABLE string will be inserted into the IDS_IELOWVERSION string. Keep it in sync
  68. // with the major.minor version numbers
  69. #define IE_MINIMUM_VERSION_HUMAN_READABLE TEXT("3.0")
  70. #define IE_MINIMUM_MAJOR_VERSION (UINT) 4
  71. #define IE_MINIMUM_MINOR_VERSION (UINT) 70
  72. #define IE_MINIMUM_RELEASE_VERSION (UINT) 0
  73. #define IE_MINIMUM_BUILD_VERSION (UINT) 1155
  74. #define IE_MINIMUM_VERSIONMS (DWORD) ((IE_MINIMUM_MAJOR_VERSION << 16) | IE_MINIMUM_MINOR_VERSION)
  75. #define IE_MINIMUM_VERSIONLS (DWORD) ((IE_MINIMUM_RELEASE_VERSION << 16) | IE_MINIMUM_BUILD_VERSION)
  76. #define ICW20_MINIMUM_VERSION_HUMAN_READABLE TEXT("4.0")
  77. #define ICW20_MINIMUM_MAJOR_VERSION (UINT) 4
  78. #define ICW20_MINIMUM_MINOR_VERSION (UINT) 72
  79. #define ICW20_MINIMUM_RELEASE_VERSION (UINT) 0
  80. #define ICW20_MINIMUM_BUILD_VERSION (UINT) 3012
  81. #define ICW20_MINIMUM_VERSIONMS (DWORD) ((ICW20_MINIMUM_MAJOR_VERSION << 16) | ICW20_MINIMUM_MINOR_VERSION)
  82. #define ICW20_MINIMUM_VERSIONLS (DWORD) ((ICW20_MINIMUM_RELEASE_VERSION << 16) | ICW20_MINIMUM_BUILD_VERSION)
  83. #endif
  84. #define ACCTMGR_PATHKEY TEXT("SOFTWARE\\Microsoft\\Internet Account Manager")
  85. #define ACCTMGR_DLLPATH TEXT("DllPath")
  86. #define MAX_URL 1024
  87. //#define REGSTR_PATH_IEXPLORER "Software\\Microsoft\\Internet Explorer"
  88. //#define REGSTR_PATH_IE_MAIN REGSTR_PATH_IEXPLORER "\\Main"
  89. #define SIZEOF_TCHAR_BUFFER(buf) ((sizeof(buf) / sizeof(TCHAR)))
  90. #define NULL_TERM_TCHAR_BUFFER(buf); {buf[SIZEOF_TCHAR_BUFFER(buf)-1] = TEXT('\0');}
  91. typedef struct
  92. {
  93. TCHAR szEntryName[RAS_MaxEntryName+1];
  94. TCHAR szUserName[UNLEN+1];
  95. TCHAR szPassword[PWLEN+1];
  96. TCHAR szScriptFile[_MAX_PATH+1];
  97. RASENTRY RasEntry;
  98. } ICONNECTION, FAR * LPICONNECTION;
  99. extern DWORD ConfigureClient(
  100. HWND hwnd,
  101. LPCTSTR lpszFile,
  102. LPBOOL lpfNeedsRestart,
  103. LPBOOL fConnectiodCreated,
  104. BOOL fHookAutodial,
  105. LPTSTR szConnectoidName,
  106. DWORD dwConnectoidNameSize
  107. );
  108. extern DWORD ImportFile (
  109. LPCTSTR lpszImportFile,
  110. LPCTSTR lpszSection,
  111. LPCTSTR lpszOutputFile);
  112. extern DWORD ImportConnection (
  113. LPCTSTR szFileName,
  114. LPICONNECTION lpConnection);
  115. extern DWORD ImportClientInfo (
  116. LPCTSTR lpszFileName,
  117. LPINETCLIENTINFO lpClientInfo);
  118. extern DWORD ImportCustomInfo (
  119. LPCTSTR lpszImportFile,
  120. LPTSTR lpszExecutable,
  121. DWORD cbExecutable,
  122. LPTSTR lpszArgument,
  123. DWORD cbArgument);
  124. extern DWORD ImportCustomFile (LPCTSTR lpszFileName);
  125. extern DWORD ImportFavorites (LPCTSTR lpszFileName);
  126. extern DWORD ImportBrandingInfo (LPCTSTR pszIns, LPCTSTR lpszConnectoidName);
  127. #ifdef WIN32
  128. extern DWORD CallSBSConfig(HWND hwnd, LPCTSTR lpszINSFile);
  129. #endif
  130. //extern DWORD ImportProxySettings(LPCTSTR lpszFile);
  131. extern BOOL WantsExchangeInstalled(LPCTSTR lpszFile);
  132. extern BOOL ProcessISP(HWND hwnd, LPCTSTR lpszFile);
  133. extern BOOL WarningMsg(HWND hwnd, UINT uId);
  134. extern void ErrorMsg(HWND hwnd, UINT uId);
  135. extern void ErrorMsg1(HWND hwnd, UINT uId, LPCTSTR lpszArg);
  136. extern void InfoMsg(HWND hwnd, UINT uId);
  137. extern BOOL PromptRestart(HWND hwnd);
  138. extern BOOL PromptRestartNow(HWND hwnd);
  139. extern VOID CenterWindow(HWND hwndChild, HWND hwndParent);
  140. // 8/16/96 jmazner Normandy #4593 This is what puts up the huge background "screen o death"
  141. //extern HWND SplashInit(HWND hwnd);
  142. extern HWND ProgressInit(HWND hwnd);
  143. extern DWORD SignupLogon(HWND hwndParent);
  144. extern TCHAR FAR cszWndClassName[];
  145. extern TCHAR FAR cszAppName[];
  146. extern HINSTANCE ghInstance;
  147. #ifdef WIN16
  148. CHAR* GetPassword();
  149. #else
  150. TCHAR* GetPassword();
  151. BOOL IsRASReady();
  152. #endif
  153. HWND GetHwndMain();
  154. BOOL IsCurrentlyProcessingISP();
  155. BOOL NeedBackupSecurity();
  156. extern HRESULT WINAPI StatusMessageCallback(DWORD dwStatus, LPTSTR pszBuffer, DWORD dwBufferSize);
  157. extern HRESULT LoadDialErrorString(HRESULT hrIN,LPTSTR lpszBuff, DWORD dwBufferSize);
  158. #ifdef WIN16
  159. extern LPVOID MyLocalAlloc(DWORD flag, DWORD size);
  160. extern LPVOID MyLocalFree(LPVOID lpv);
  161. #endif
  162. int DDEInit(HINSTANCE);
  163. void DDEClose(void);
  164. int OpenURL(LPCTSTR);
  165. #if !defined(WIN16)
  166. extern BOOL LclSetEntryScriptPatch(LPTSTR lpszScript,LPTSTR lpszEntry);
  167. extern DWORD ConfigRasEntryDevice( LPRASENTRY lpRasEntry );
  168. extern BOOL IsNT(void);
  169. inline BOOL IsNT(void)
  170. {
  171. OSVERSIONINFO OsVersionInfo;
  172. ZeroMemory(&OsVersionInfo, sizeof(OSVERSIONINFO));
  173. OsVersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
  174. GetVersionEx(&OsVersionInfo);
  175. return (VER_PLATFORM_WIN32_NT == OsVersionInfo.dwPlatformId);
  176. }
  177. #endif //!win16
  178. typedef enum
  179. {
  180. UNKNOWN_FILE,
  181. INS_FILE,
  182. ISP_FILE,
  183. HTML_FILE
  184. } INET_FILETYPE;
  185. #define HARDCODED_IEAK_ISP_FILENAME TEXT("signup.isp")
  186. #endif /* ISIGNUP_H */