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.

288 lines
4.0 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. ntoc.h
  5. Abstract:
  6. This file contains the ntoc header stuff.
  7. Environment:
  8. WIN32 User Mode
  9. Author:
  10. Wesley Witt (wesw) 7-Aug-1997
  11. --*/
  12. #include <nt.h>
  13. #include <ntrtl.h>
  14. #include <nturtl.h>
  15. #include <windows.h>
  16. #include <windowsx.h>
  17. #include <commctrl.h>
  18. #include <wingdip.h>
  19. #include <setupapi.h>
  20. #include <ocmanage.h>
  21. #include <tapi.h>
  22. #include <stdio.h>
  23. #include <stdlib.h>
  24. #include "resource.h"
  25. #include "ntocmsg.h"
  26. typedef enum {
  27. WizPageTapiLoc,
  28. //WizPageDisplay,
  29. WizPageDateTime,
  30. WizPageWelcome,
  31. //WizPageReinstall,
  32. WizPageFinal,
  33. WizPageMaximum
  34. } WizPage;
  35. extern HINSTANCE hInstance;
  36. extern SETUP_INIT_COMPONENT SetupInitComponent;
  37. #if DBG
  38. #define Assert(exp) if(!(exp)) {AssertError(TEXT(#exp),TEXT(__FILE__),__LINE__);}
  39. #define DebugPrint(_x_) dprintf _x_
  40. #define DebugStop(_x_) {\
  41. dprintf _x_;\
  42. dprintf(TEXT("Stopping at %s @ %d"),TEXT(__FILE__),__LINE__);\
  43. __try {\
  44. DebugBreak();\
  45. } __except (UnhandledExceptionFilter(GetExceptionInformation())) {\
  46. }\
  47. }
  48. #else
  49. #define Assert(exp)
  50. #define DebugPrint(_x_)
  51. #define DebugStop(_x_)
  52. #endif
  53. void
  54. dprintf(
  55. LPTSTR Format,
  56. ...
  57. );
  58. VOID
  59. AssertError(
  60. LPTSTR Expression,
  61. LPTSTR File,
  62. ULONG LineNumber
  63. );
  64. //
  65. // prototypes
  66. //
  67. LRESULT
  68. CommonWizardProc(
  69. HWND hwnd,
  70. UINT message,
  71. WPARAM wParam,
  72. LPARAM lParam,
  73. DWORD buttonFlags
  74. );
  75. void
  76. WelcomeInit(
  77. void
  78. );
  79. void
  80. WelcomeCommit(
  81. void
  82. );
  83. INT_PTR CALLBACK
  84. WelcomeDlgProc(
  85. HWND hwnd,
  86. UINT message,
  87. WPARAM wParam,
  88. LPARAM lParam
  89. );
  90. void
  91. ReinstallInit(
  92. void
  93. );
  94. void
  95. ReinstallCommit(
  96. void
  97. );
  98. INT_PTR CALLBACK
  99. ReinstallDlgProc(
  100. HWND hwnd,
  101. UINT message,
  102. WPARAM wParam,
  103. LPARAM lParam
  104. );
  105. void
  106. FinishInit(
  107. void
  108. );
  109. void
  110. FinishCommit(
  111. void
  112. );
  113. INT_PTR CALLBACK
  114. FinishDlgProc(
  115. HWND hwnd,
  116. UINT message,
  117. WPARAM wParam,
  118. LPARAM lParam
  119. );
  120. void
  121. TapiInit(
  122. void
  123. );
  124. void
  125. TapiCommitChanges(
  126. void
  127. );
  128. INT_PTR CALLBACK
  129. TapiLocDlgProc(
  130. HWND hwnd,
  131. UINT message,
  132. WPARAM wParam,
  133. LPARAM lParam
  134. );
  135. void
  136. DisplayInit(
  137. void
  138. );
  139. void
  140. DisplayCommitChanges(
  141. void
  142. );
  143. INT_PTR CALLBACK
  144. DisplayDlgProc(
  145. HWND hwnd,
  146. UINT message,
  147. WPARAM wParam,
  148. LPARAM lParam
  149. );
  150. void
  151. DateTimeInit(
  152. void
  153. );
  154. void
  155. DateTimeCommitChanges(
  156. void
  157. );
  158. INT_PTR CALLBACK
  159. DateTimeDlgProc(
  160. HWND hwnd,
  161. UINT message,
  162. WPARAM wParam,
  163. LPARAM lParam
  164. );
  165. HKEY
  166. OpenRegistryKey(
  167. HKEY hKey,
  168. LPTSTR KeyName,
  169. BOOL CreateNewKey,
  170. REGSAM SamDesired
  171. );
  172. LPTSTR
  173. GetRegistryString(
  174. HKEY hKey,
  175. LPTSTR ValueName,
  176. LPTSTR DefaultValue
  177. );
  178. LPTSTR
  179. GetRegistryStringExpand(
  180. HKEY hKey,
  181. LPTSTR ValueName,
  182. LPTSTR DefaultValue
  183. );
  184. DWORD
  185. GetRegistryDword(
  186. HKEY hKey,
  187. LPTSTR ValueName
  188. );
  189. BOOL
  190. SetRegistryDword(
  191. HKEY hKey,
  192. LPTSTR ValueName,
  193. DWORD Value
  194. );
  195. BOOL
  196. SetRegistryString(
  197. HKEY hKey,
  198. LPTSTR ValueName,
  199. LPTSTR Value
  200. );
  201. BOOL
  202. SetRegistryStringExpand(
  203. HKEY hKey,
  204. LPTSTR ValueName,
  205. LPTSTR Value
  206. );
  207. BOOL
  208. SetRegistryStringMultiSz(
  209. HKEY hKey,
  210. LPTSTR ValueName,
  211. LPTSTR Value,
  212. DWORD Length
  213. );
  214. BOOL
  215. RunningAsAdministrator(
  216. VOID
  217. );
  218. int
  219. FmtMessageBox(
  220. HWND hwnd,
  221. UINT fuStyle,
  222. BOOL fSound,
  223. DWORD dwTitleID,
  224. DWORD dwTextID,
  225. ...
  226. );