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.

142 lines
2.9 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Filename :
  4. Network.h
  5. Abstract:
  6. Header for Network
  7. Author:
  8. Wally Ho (wallyho) 31-Jan-2000
  9. Revision History:
  10. Created
  11. --*/
  12. // Definition of constants
  13. #ifndef NETWORK_H
  14. #define NETWORK_H
  15. #include <windows.h>
  16. #include <stdlib.h>
  17. #include <malloc.h>
  18. #include "machines.h"
  19. typedef struct _INSTALL_DATA {
  20. // ComputerName WALLYHO_DEV
  21. // SystemBuild 2190
  22. // InstallingBuild 2195
  23. // MachineID 3212115354
  24. // Cdrom YES|NO
  25. // Network YES|NO
  26. // Type CLEAN|UPGRADE
  27. // Msi N
  28. TCHAR szComputerName[50];
  29. TCHAR szUserName[30];
  30. TCHAR szUserDomain[30];
  31. DWORD dwSku;
  32. // Added because of DTC functionality.
  33. DWORD dwSystemMajorVersion;
  34. DWORD dwSystemMinorVersion;
  35. DWORD dwSystemBuild;
  36. DWORD dwSystemBuildDelta;
  37. DWORD dwSystemSPBuild;
  38. TCHAR szSystemBuildSourceLocation[100];
  39. DWORD dwInstallingMajorVersion;
  40. DWORD dwInstallingMinorVersion;
  41. DWORD dwInstallingBuild;
  42. DWORD dwInstallingBuildDelta;
  43. DWORD dwInstallingSPBuild;
  44. TCHAR szInstallingBuildSourceLocation[100];
  45. DWORD dwMachineID;
  46. BOOL bCancel;
  47. BOOL bHydra;
  48. BOOL bCdrom;
  49. BOOL bNetwork;
  50. BOOL bClean;
  51. BOOL bUpgrade;
  52. BOOL bMsi;
  53. TCHAR szSPMethod[MAX_PATH]; // sp_patch, sp_full, sp_remove, sp_update
  54. BOOL bSPUninst;
  55. BOOL bSPPatch;
  56. BOOL bSPFull;
  57. BOOL bSPUpdate;
  58. BOOL bOEMImage;
  59. // Other data.
  60. TCHAR szCpu[6];
  61. TCHAR szArch[20];
  62. TCHAR szPlatform[40];
  63. TCHAR szIdwlogServer[200];
  64. TCHAR szLocaleId[4]; // locale abbreviation
  65. BOOL bIsServerOnline;
  66. UINT iStageSequence;
  67. BOOL bFindBLDFile;
  68. BOOL bCDBootInstall;
  69. LPTSTR szServerData;
  70. } INSTALL_DATA, *LPINSTALL_DATA;
  71. FILE* OpenCookieFile(VOID);
  72. VOID CloseCookieFile(IN FILE* fpOpenFile);
  73. VOID DeleteCookieFile( VOID );
  74. BOOL WriteIdwlogCookie( IN LPINSTALL_DATA pId);
  75. BOOL ReadIdwlogCookie ( OUT LPINSTALL_DATA lpId);
  76. BOOL ServerWriteMinimum (LPINSTALL_DATA pId,
  77. LPMACHINE_DETAILS pMd);
  78. BOOL ServerWriteMaximum (LPINSTALL_DATA pId,
  79. LPMACHINE_DETAILS pMd);
  80. DWORD WINAPI WriteThread(IN LPINSTALL_DATA pId);
  81. VOID DeleteIPCConnections( VOID );
  82. VOID DeleteDatafile (LPINSTALL_DATA);
  83. BOOL FileExistsEx( IN LPTSTR szFileName);
  84. BOOL WriteDataToAvailableServer (LPINSTALL_DATA pId,
  85. LPTSTR szServerData);
  86. BOOL SetCancelMutex ( VOID );
  87. BOOL ClearCancelMutex ( VOID );
  88. BOOL PauseForMutex( VOID );
  89. BOOL SetInstanceMutex ( VOID );
  90. BOOL ClearInstanceMutex ( VOID );
  91. //
  92. // Global declarations:
  93. // The INSTALL_DATA to be passed to the worker threads
  94. // Replaces id in idwlog.cpp, winmain()
  95. //
  96. extern INSTALL_DATA g_InstallData;
  97. //
  98. // Replaces szServerData in network.cpp, ServerWriteMinimum() and
  99. // ServerWriteMaximum()
  100. //
  101. extern TCHAR g_szServerData[4096];
  102. #endif