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.

88 lines
2.4 KiB

  1. /****************************************************************************
  2. Copyright (c) Microsoft Corporation 1998
  3. All rights reserved
  4. File: PCH.H
  5. Precompiled header file.
  6. ***************************************************************************/
  7. #if DBG == 1
  8. #define DEBUG
  9. #endif
  10. #pragma warning(disable:4127) // condition expression is constant
  11. #pragma warning(disable:4706) // assignment within conditional
  12. #define SECURITY_WIN32
  13. #include <nt.h>
  14. #include <ntrtl.h>
  15. #include <nturtl.h>
  16. #include <windows.h>
  17. #include <windowsx.h>
  18. #include <commdlg.h>
  19. #include <shlwapi.h>
  20. #include <lm.h>
  21. #include <remboot.h>
  22. #include <setupapi.h>
  23. #include <stdio.h>
  24. extern "C" {
  25. #include "..\imirror\imirror.h"
  26. }
  27. #include "debug.h"
  28. #include "resource.h"
  29. #include "msg.h"
  30. // Globals
  31. extern HINSTANCE g_hinstance;
  32. extern HWND g_hCurrentWindow;
  33. extern WCHAR g_ServerName[ MAX_PATH ];
  34. extern WCHAR g_MirrorDir[ MAX_PATH ];
  35. extern WCHAR g_Language[ MAX_PATH ];
  36. extern WCHAR g_ImageName[ MAX_PATH ];
  37. extern WCHAR g_Architecture[ 16 ];
  38. extern WCHAR g_Description[ REMOTE_INSTALL_MAX_DESCRIPTION_CHAR_COUNT ];
  39. extern WCHAR g_HelpText[ REMOTE_INSTALL_MAX_HELPTEXT_CHAR_COUNT ];
  40. extern WCHAR g_SystemRoot[ MAX_PATH ];
  41. extern WCHAR g_WinntDirectory[ MAX_PATH ];
  42. extern DWORD g_dwWinntDirLength;
  43. extern BOOLEAN g_fQuietFlag;
  44. extern BOOLEAN g_fErrorOccurred;
  45. extern BOOLEAN g_fRebootOnExit;
  46. extern DWORD g_dwLogFileStartLow;
  47. extern DWORD g_dwLogFileStartHigh;
  48. extern PCRITICAL_SECTION g_pLogCritSect;
  49. extern HANDLE g_hLogFile;
  50. extern OSVERSIONINFO OsVersion;
  51. extern HINF g_hCompatibilityInf;
  52. extern WCHAR g_HalName[32];
  53. extern WCHAR g_ProductId[4];
  54. extern BOOLEAN g_OEMDesktop;
  55. //
  56. // Inc/decrements macros.
  57. //
  58. #define InterlockDecrement( _var ) --_var;
  59. #define InterlockIncrement( _var ) ++_var;
  60. // Array Macros
  61. #define ARRAYSIZE( _x ) ((UINT) (sizeof(_x) / sizeof(_x[0])))
  62. #define TERMINATE_BUFFER( _x ) ASSERT(sizeof(_x) > 4); _x[ARRAYSIZE(_x)-1] = 0;
  63. // Private Messages
  64. #define WM_ERROR WM_USER
  65. #define WM_UPDATE WM_USER + 1
  66. #define WM_CONTINUE WM_USER + 2
  67. #define WM_ERROR_OK WM_USER + 3
  68. //
  69. // Made-up DirID for the UserProfiles directory.
  70. //
  71. // If you change this value, you *must* also change
  72. // the corresponding value in riprep.inf
  73. //
  74. #define PROFILES_DIRID (0x8001)