Source code of Windows XP (NT5)
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.

140 lines
2.3 KiB

  1. //
  2. // NT Header Files
  3. //
  4. #include <nt.h>
  5. #include <ntrtl.h>
  6. #include <nturtl.h>
  7. #include <windows.h>
  8. #include <prsht.h>
  9. #include <commctrl.h>
  10. #include <setupapi.h>
  11. #include <spapip.h>
  12. #include <ocmanage.h>
  13. #include <setuplog.h>
  14. #include "ocmgrlib.h"
  15. #include "res.h"
  16. #include "msg.h"
  17. //
  18. // App instance.
  19. //
  20. extern HINSTANCE hInst;
  21. //
  22. // Global version information structure and macro to tell whether
  23. // the system is NT.
  24. //
  25. extern OSVERSIONINFO OsVersionInfo;
  26. #define IS_NT() (OsVersionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT)
  27. //
  28. // Source path for installation files, etc.
  29. //
  30. extern TCHAR SourcePath[MAX_PATH];
  31. extern TCHAR UnattendPath[MAX_PATH];
  32. extern BOOL bUnattendInstall;
  33. //
  34. // OC Manager context 'handle'
  35. //
  36. extern PVOID OcManagerContext;
  37. //
  38. // Generic app title string id.
  39. //
  40. extern UINT AppTitleStringId;
  41. //
  42. // Flag indicating whether a flag was passed on the cmd line
  43. // indicating that the oc setup wizard page should use the
  44. // external-type progress indicator at all times
  45. //
  46. extern BOOL ForceExternalProgressIndicator;
  47. extern BOOL AllowCancel;
  48. //
  49. // Whether to run without UI
  50. //
  51. extern BOOL QuietMode;
  52. //
  53. // Wizard routines.
  54. //
  55. BOOL
  56. DoWizard(
  57. IN PVOID OcManagerContext,
  58. IN HWND StartingMsgWindow,
  59. IN HCURSOR hOldCursor
  60. );
  61. //
  62. // Misc routines
  63. //
  64. VOID
  65. OcFillInSetupDataA(
  66. OUT PSETUP_DATAA SetupData
  67. );
  68. #ifdef UNICODE
  69. VOID
  70. OcFillInSetupDataW(
  71. OUT PSETUP_DATAW SetupData
  72. );
  73. #endif
  74. INT
  75. OcLogError(
  76. IN OcErrorLevel Level,
  77. IN LPCTSTR FormatString,
  78. ...
  79. );
  80. //
  81. // Resource-handling functions.
  82. //
  83. int
  84. MessageBoxFromMessageV(
  85. IN HWND Window,
  86. IN DWORD MessageId,
  87. IN BOOL SystemMessage,
  88. IN LPCTSTR CaptionString,
  89. IN UINT Style,
  90. IN va_list *Args
  91. );
  92. int
  93. MessageBoxFromMessage(
  94. IN HWND Window,
  95. IN DWORD MessageId,
  96. IN BOOL SystemMessage,
  97. IN LPCTSTR CaptionString,
  98. IN UINT Style,
  99. ...
  100. );
  101. int
  102. MessageBoxFromMessageAndSystemError(
  103. IN HWND Window,
  104. IN DWORD MessageId,
  105. IN DWORD SystemMessageId,
  106. IN LPCTSTR CaptionString,
  107. IN UINT Style,
  108. ...
  109. );
  110. #ifdef UNICODE
  111. #define pDbgPrintEx DbgPrintEx
  112. #else
  113. #define pDbgPrintEx
  114. #endif
  115. #define MyMalloc(sz) ((PVOID)LocalAlloc(LMEM_FIXED,sz))
  116. #define MyFree(ptr) (LocalFree(ptr))