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.

1015 lines
26 KiB

  1. /*++
  2. Copyright (c) 1993 Microsoft Corporation
  3. Module Name:
  4. otnboot.H
  5. Abstract:
  6. Constant definitions for the Net Client Disk Utility.
  7. Author:
  8. Bob Watson (a-robw)
  9. Revision History:
  10. 17 Feb 94 Written
  11. --*/
  12. #ifndef _otnboot_H_
  13. #define _otnboot_H_
  14. #include <winioctl.h>
  15. #include <nddeapi.h>
  16. #ifndef DS_3DLOOK
  17. #define DS_3DLOOK 0x0004L
  18. #endif
  19. #ifdef JAPAN
  20. #define NCDU_DOSV_CHECK 1000
  21. #endif
  22. //Note: above NCDU_DOSV_CHECK should be added to file otnbtdlg.h, but that file cannot
  23. // be checked in to the SLM, so moved here.
  24. //
  25. //
  26. // Application specific windows messages
  27. //
  28. #define NCDU_SHOW_SW_CONFIG_DLG (WM_USER+11)
  29. #define NCDU_SHOW_TARGET_WS_DLG (WM_USER+12)
  30. #define NCDU_SHOW_SERVER_CFG_DLG (WM_USER+13)
  31. #define NCDU_SHOW_CONFIRM_DLG (WM_USER+14)
  32. #define NCDU_SHOW_CREATE_DISKS_DLG (WM_USER+15)
  33. #define NCDU_SHOW_SHARE_NET_SW_DLG (WM_USER+16)
  34. #define NCDU_SHOW_COPYING_DLG (WM_USER+17)
  35. #define NCDU_SHOW_EXIT_MESSAGE_DLG (WM_USER+18)
  36. #define NCDU_SHOW_COPY_ADMIN_UTILS (WM_USER+19)
  37. #define NCDU_CLEAR_DLG (WM_USER+20)
  38. #define NCDU_REGISTER_DLG (WM_USER+21)
  39. #define NCDU_UPDATE_WINDOW_POS (WM_USER+22)
  40. //
  41. // resource constant definitions
  42. //
  43. //#define NCDU_APP_ICON 0x7000
  44. #define NCDU_ID_ABOUT 0xFF10
  45. #define STRING_BASE 0x8000
  46. #ifdef TERMSRV
  47. #define WFC_STRING_BASE 0x9000
  48. #endif // TERMSRV
  49. #define NCDU_CANCEL_CAPTION (STRING_BASE + 1)
  50. #define NCDU_CANCEL_PROMPT (STRING_BASE + 2)
  51. #define NCDU_MAKING_FLOPPIES (STRING_BASE + 3)
  52. #define NCDU_LANMAN_MESSAGE (STRING_BASE + 4)
  53. #define NCDU_COPYING_TO_SHARE (STRING_BASE + 5)
  54. #define NCDU_INSERT_BOOTDISK_A (STRING_BASE + 6)
  55. #define NCDU_INSERT_BOOTDISK_B (STRING_BASE + 7)
  56. #define NCDU_SHARE_PATH_NOW (STRING_BASE + 8)
  57. #define NCDU_EXIT_SHARE_PATH (STRING_BASE + 9)
  58. #define NCDU_UNABLE_READ_DIR (STRING_BASE +10)
  59. #define NCDU_PATH_NOT_DIR (STRING_BASE +11)
  60. #define NCDU_PATH_CANNOT_BE_BLANK (STRING_BASE + 12)
  61. #define NCDU_SHARING_DIR (STRING_BASE +13)
  62. #define NCDU_NOT_REAL (STRING_BASE +14)
  63. #define NCDU_NOT_DIST_TREE (STRING_BASE +15)
  64. #define NCDU_NO_SHARE_NAME (STRING_BASE +16)
  65. #define NCDU_UNKNOWN_FLOPPY (STRING_BASE +17)
  66. #define NCDU_UNABLE_CONNECT_REG (STRING_BASE +18)
  67. #define NCDU_INVALID_MACHINENAME (STRING_BASE +19)
  68. #define NCDU_COPY_TO_FLOPPY (STRING_BASE +20)
  69. #define NCDU_DEST_NOT_FLOPPY (STRING_BASE +21)
  70. #define NCDU_INSUFFICIENT_DISK_SPACE (STRING_BASE +22)
  71. #define NCDU_DRIVE_NOT_BOOTDISK (STRING_BASE +23)
  72. #define NCDU_UNABLE_SHARE_UNC (STRING_BASE +24)
  73. #define NCDU_UNABLE_COPY_CLIENTS (STRING_BASE+25)
  74. #define NCDU_RU_SURE (STRING_BASE + 26)
  75. #define NCDU_BAD_SUBNET_MASK (STRING_BASE + 27)
  76. #define NCDU_BAD_IP_ADDR (STRING_BASE + 28)
  77. #define NCDU_FLOPPY_NOT_COMPLETE (STRING_BASE+ 29)
  78. #define NCDU_CHECK_PROTOCOL_INI (STRING_BASE + 30)
  79. #define NCDU_NO_CLIENTS_SELECTED (STRING_BASE + 31)
  80. #define NCDU_UNABLE_SHARE_DIR (STRING_BASE + 32)
  81. #define NCDU_BAD_DEFAULT_GATEWAY (STRING_BASE + 33)
  82. #define NCDU_COPY_NET_ADMIN (STRING_BASE + 34)
  83. #define NCDU_ERROR_NOMEMORY (STRING_BASE + 35)
  84. #define NCDU_USERNAME_ACCESS (STRING_BASE + 36)
  85. #define NCDU_UNSUP_PROTOCOL (STRING_BASE + 37)
  86. #define NCDU_NO_MEDIA (STRING_BASE + 38)
  87. #define NCDU_CONFIRM_FLOPPY (STRING_BASE + 39)
  88. #define NCDU_COPY_COMPLETE (STRING_BASE + 40)
  89. #define NCDU_FLOPPY_COMPLETE (STRING_BASE + 41)
  90. #define NCDU_NETUTILS_SHARED (STRING_BASE + 42)
  91. #define NCDU_NETBEUI_NOT_ROUT (STRING_BASE + 43)
  92. #define NCDU_CANNOT_SHARE_REMDIR (STRING_BASE + 46)
  93. #define NCDU_SHARE_IS_NOT_USED (STRING_BASE + 47)
  94. #define NCDU_SHARE_IS_CLIENT_TREE (STRING_BASE + 48)
  95. #define NCDU_SHARE_IS_SERVER_TOOLS (STRING_BASE + 49)
  96. #define NCDU_SHARE_IS_OTHER_DIR (STRING_BASE + 50)
  97. #define NCDU_SERVER_NOT_PRESENT (STRING_BASE + 51)
  98. #define NCDU_NO_SERVER (STRING_BASE + 52)
  99. #define NCDU_NOT_DOS_SHARE (STRING_BASE + 53)
  100. #define NCDU_NOT_TOOL_TREE (STRING_BASE + 54)
  101. #define NCDU_BROWSE_TOOL_DIST_PATH (STRING_BASE + 55)
  102. #define NCDU_BROWSE_CLIENT_DIST_PATH (STRING_BASE + 56)
  103. #define NCDU_BROWSE_COPY_DEST_PATH (STRING_BASE + 57)
  104. #define NCDU_FINDING_TOOLS_PATH (STRING_BASE + 58)
  105. #define NCDU_MAKE_COMP_NAME (STRING_BASE + 59)
  106. #define NCDU_DISK_NOT_DONE (STRING_BASE + 60)
  107. #define NCDU_DRIVE_NOT_AVAILABLE (STRING_BASE + 61)
  108. #define NCDU_UNABLE_GET_PATH_INFO (STRING_BASE + 62)
  109. #define NCDU_INSUF_MEM_AT_BOOT (STRING_BASE + 63)
  110. #define NCDU_NW_LINK_TRANSPORT (STRING_BASE + 66)
  111. #define NCDU_TCP_IP_TRANSPORT (STRING_BASE + 67)
  112. #define NCDU_NETBEUI_TRANSPORT (STRING_BASE + 68)
  113. #define NCDU_SYSTEM_MAY_NOT_FIT (STRING_BASE + 69)
  114. #define NCDU_SMALL_DISK_WARN (STRING_BASE + 70)
  115. #define NCDU_CLEAN_DISK_REQUIRED (STRING_BASE + 71)
  116. #define FORMAT_BASE 0x9000
  117. #define SZ_APP_TITLE (FORMAT_BASE + 1)
  118. #define FMT_CREATE_SHARE_ERROR (FORMAT_BASE + 2)
  119. #define CSZ_ABOUT_ENTRY (FORMAT_BASE + 3)
  120. #define FMT_LOAD_NET_CLIENT (FORMAT_BASE + 4)
  121. #define FMT_CONFIRM_TARGET (FORMAT_BASE + 5)
  122. #define FMT_INSTALL_TARGET_CLIENT (FORMAT_BASE + 6)
  123. #define FMT_LOGON_USERNAME (FORMAT_BASE + 7)
  124. #define FMT_PROMPT_USERNAME (FORMAT_BASE + 8)
  125. #define FMT_CONFIRM_FLOPPY_IP (FORMAT_BASE + 9)
  126. #define FMT_USING_DHCP (FORMAT_BASE + 10)
  127. #define FMT_WORKING (FORMAT_BASE + 11)
  128. #define FMT_PERCENT_COMPLETE (FORMAT_BASE + 12)
  129. #define FMT_ZERO_PERCENT_COMPLETE (FORMAT_BASE + 13)
  130. #define FMT_PREPARE_TO_COPY (FORMAT_BASE + 14)
  131. #define FMT_CLIENT_DISK_AND_DRIVE (FORMAT_BASE + 16)
  132. #define FMT_CLIENT_DISPLAY_NAME (FORMAT_BASE + 17)
  133. #define FMT_COPY_COMPLETE_STATS (FORMAT_BASE + 18)
  134. #define FMT_INSERT_FLOPPY (FORMAT_BASE + 19)
  135. #define FMT_1_DISK_REQUIRED (FORMAT_BASE + 20)
  136. #define FMT_N_DISKS_REQUIRED (FORMAT_BASE + 21)
  137. #define FMT_INTERNAL_BUFFER (FORMAT_BASE + 22)
  138. #define FMT_CONNECTING_COMMENT (FORMAT_BASE + 23)
  139. #define FMT_RUNNING_SETUP_COMMENT (FORMAT_BASE + 24)
  140. #define FMT_OTN_COMMENT (FORMAT_BASE + 25)
  141. #define FMT_OTN_BOOT_FILES (FORMAT_BASE + 26)
  142. #define FMT_K_BYTES (FORMAT_BASE + 27)
  143. #define FMT_M_BYTES (FORMAT_BASE + 28)
  144. #define FMT_CLIENT_INFO_DISPLAY (FORMAT_BASE + 29)
  145. #define FMT_NONE (FORMAT_BASE + 30)
  146. #define FMT_SHARE_REMARK (FORMAT_BASE + 31)
  147. #define FMT_SHARE_TOOLS_REMARK (FORMAT_BASE + 32)
  148. #define FMT_SHARE_IS_CLIENT_TREE (FORMAT_BASE + 33)
  149. #define FMT_SHARE_IS_ALREADY_USED (FORMAT_BASE + 34)
  150. #define CSZ_SETUP_ADM (FORMAT_BASE + 35)
  151. #define FMT_SHARE_IS_TOOLS_DIR (FORMAT_BASE + 36)
  152. #define CSZ_SYSTEM_REGISTRY (FORMAT_BASE + 37)
  153. #define CSZ_SHARED_DIRS (FORMAT_BASE + 38)
  154. #define CSZ_HARD_DISK_DIRS (FORMAT_BASE + 39)
  155. #define CSZ_CD_ROM (FORMAT_BASE + 40)
  156. #define CSZ_LOCAL_MACHINE (FORMAT_BASE + 41)
  157. #define CSZ_DOMAIN_ADMINS (FORMAT_BASE + 43)
  158. #define CSZ_WINDOWS_FOR_WORKGROUPS (FORMAT_BASE + 44)
  159. #define CSZ_LAN_MANAGER (FORMAT_BASE + 45)
  160. #define CSZ_MS_NETWORK_CLIENT (FORMAT_BASE + 46)
  161. #define CSZ_BROWSE_DIST_PATH_TITLE (FORMAT_BASE + 47)
  162. #define CSZ_BROWSE_DEST_PATH_TITLE (FORMAT_BASE + 48)
  163. #define CSZ_BROWSE_COPY_DEST_PATH_TITLE (FORMAT_BASE + 49)
  164. #define CSZ_NW_LINK_PROTOCOL (FORMAT_BASE + 50)
  165. #define CSZ_TCP_IP_PROTOCOL (FORMAT_BASE + 51)
  166. #define CSZ_NETBEUI_PROTOCOL (FORMAT_BASE + 52)
  167. #define CSZ_COPYING_NET_UTILS (FORMAT_BASE + 53)
  168. #define CSZ_UNABLE_COPY (FORMAT_BASE + 54)
  169. #define CSZ_COPY_ERROR (FORMAT_BASE + 55)
  170. #define CSZ_ABOUT_TITLE (FORMAT_BASE + 56)
  171. #define CSZ_35_HD (FORMAT_BASE + 57)
  172. #define CSZ_525_HD (FORMAT_BASE + 58)
  173. #define CSZ_DEFAULT_CLIENT_SHARE (FORMAT_BASE + 59)
  174. #define CSZ_WINDOWS_95 (FORMAT_BASE + 60)
  175. #define CSZ_WINDOWS_NT (FORMAT_BASE + 61)
  176. #ifdef JAPAN
  177. #define FMT_LOAD_NET_CLIENT1 (FORMAT_BASE + 62)
  178. #define FMT_LOAD_NET_CLIENT2 (FORMAT_BASE + 63)
  179. #define FMT_LOAD_NET_CLIENT2_TITLE (FORMAT_BASE + 64)
  180. #define FMT_LOAD_AUTOEXEC_ECHO (FORMAT_BASE + 65)
  181. #define FMT_OTN_BOOT_FILES_DOSV (FORMAT_BASE + 66)
  182. #endif
  183. #ifdef TERMSRV
  184. #define FMT_COPY_COMPLETE_STATS1 (FORMAT_BASE + 67)
  185. #define FMT_COPY_COMPLETE_STATS2 (FORMAT_BASE + 68)
  186. #endif // TERMSRV
  187. #define DISK_FORMAT_BASE 0xA000
  188. #define IDS_APP_NAME (DISK_FORMAT_BASE + 1)
  189. #define IDS_FMIFSLOADERR (DISK_FORMAT_BASE + 2)
  190. #define IDS_DISKCOPYCONFIRM (DISK_FORMAT_BASE + 3)
  191. #define IDS_DISKCOPYCONFIRMTITLE (DISK_FORMAT_BASE + 4)
  192. #define IDS_FFERR (DISK_FORMAT_BASE + 5)
  193. #define IDS_FORMATTINGDEST (DISK_FORMAT_BASE + 6)
  194. #define IDS_COPYINGDISKTITLE (DISK_FORMAT_BASE + 7)
  195. #define IDS_QUICKFORMATTINGTITLE (DISK_FORMAT_BASE + 8)
  196. #define IDS_PERCENTCOMPLETE (DISK_FORMAT_BASE + 9)
  197. #define IDS_COPYDISK (DISK_FORMAT_BASE + 10)
  198. #define IDS_INSERTDEST (DISK_FORMAT_BASE + 11)
  199. #define IDS_INSERTSRC (DISK_FORMAT_BASE + 12)
  200. #define IDS_INSERTSRCDEST (DISK_FORMAT_BASE + 13)
  201. #define IDS_FFERR_INCFS (DISK_FORMAT_BASE + 14)
  202. #define IDS_FFERR_ACCESSDENIED (DISK_FORMAT_BASE + 15)
  203. #define IDS_FFERR_DISKWP (DISK_FORMAT_BASE + 16)
  204. #define IDS_FFERR_CANTLOCK (DISK_FORMAT_BASE + 17)
  205. #define IDS_FFERR_CANTQUICKF (DISK_FORMAT_BASE + 18)
  206. #define IDS_FFERR_SRCIOERR (DISK_FORMAT_BASE + 19)
  207. #define IDS_FFERR_DSTIOERR (DISK_FORMAT_BASE + 20)
  208. #define IDS_FFERR_SRCDSTIOERR (DISK_FORMAT_BASE + 21)
  209. #define IDS_FFERR_GENIOERR (DISK_FORMAT_BASE + 22)
  210. #define IDS_FFERR_MEDIASENSE (DISK_FORMAT_BASE + 23)
  211. #define IDS_FFERR_BADLABEL (DISK_FORMAT_BASE + 25)
  212. #define IDS_COPYSRCDESTINCOMPAT (DISK_FORMAT_BASE + 26)
  213. #define IDS_FORMATERR (DISK_FORMAT_BASE + 27)
  214. #define IDS_FORMATQUICKFAILURE (DISK_FORMAT_BASE + 28)
  215. //#define IDS_FORMATERRMSG (DISK_FORMAT_BASE + 29)
  216. //#define IDS_FORMATCURERR (DISK_FORMAT_BASE + 30)
  217. #define IDS_FORMATCOMPLETE (DISK_FORMAT_BASE + 31)
  218. #define IDS_FORMATANOTHER (DISK_FORMAT_BASE + 32)
  219. #define IDS_CORRECT_FMT_ERROR (DISK_FORMAT_BASE + 33)
  220. #define IDS_COPYERROR (DISK_FORMAT_BASE + 100)
  221. #define FUNC_COPY 1
  222. #define FUNC_MOVE 2
  223. #define FUNC_DELETE 3
  224. #define FUNC_RENAME 4
  225. #define FUNC_SETDRIVE 5
  226. #define FUNC_EXPAND 6
  227. #define FUNC_LABEL 7
  228. //
  229. // Application constant definitions
  230. //
  231. #define NCDU_CANCEL_STYLE (MB_ICONQUESTION | MB_YESNOCANCEL | MB_TASKMODAL)
  232. #define MAX_PATH_BYTES (MAX_PATH * sizeof(TCHAR))
  233. #define SMALL_BUFFER_SIZE 4096
  234. #define MEDIUM_BUFFER_SIZE (SMALL_BUFFER_SIZE * 4)
  235. #define MAX_EXITMSG 32
  236. #define MAX_SHARENAME 16
  237. #define NETCARD_KEY_SIZE 64
  238. #define MAXMESSAGELEN 80
  239. #define MAXTITLELEN 32
  240. #define MAXLABELLEN 11
  241. //
  242. // Common Message Box Button configurations
  243. //
  244. #define MB_OK_TASK_EXCL (MB_OK | MB_ICONEXCLAMATION | MB_TASKMODAL)
  245. #define MB_OK_TASK_INFO (MB_OK | MB_ICONINFORMATION | MB_TASKMODAL)
  246. #define MB_OKCANCEL_TASK_EXCL (MB_OKCANCEL | MB_ICONEXCLAMATION | MB_TASKMODAL)
  247. #define MB_OKCANCEL_TASK_INFO (MB_OKCANCEL | MB_ICONINFORMATION | MB_TASKMODAL)
  248. #define MB_OKCANCEL_TASK_EXCL_DEF2 (MB_OKCANCEL | MB_ICONEXCLAMATION | MB_TASKMODAL | MB_DEFBUTTON2)
  249. // button state definitions
  250. #define CHECKED 1
  251. #define UNCHECKED 0
  252. // Load Client List Type values
  253. #define CLT_ALL_BUT_HIDDEN 0
  254. #define CLT_OTNBOOT_FLOPPY 1
  255. #define CLT_FLOPPY_INSTALL 2
  256. #define NCDU_HELP_HOT_KEY 0x0BEE // whotkey id for f1 help
  257. // Copy Dir dwFlags values:
  258. #define CD_FLAGS_COPY_SUB_DIR 0x00000001 // copies all sub dir's as well
  259. #define CD_FLAGS_DONT_CREATE 0x00000002 // default is to create dirs as needed
  260. #define CD_FLAGS_IGNORE_ATTR 0x00000004 // ignore attributes
  261. #define CD_FLAGS_COPY_ATTR 0x00000008 // copy attributes as well (default
  262. // is for dest fils to be normal)
  263. #define CD_FLAGS_IGNORE_ERROR 0x00000010 // continue with copy even if errors occur
  264. #define CD_FLAGS_LONG_NAMES 0x00000040 // allows names longer than 8.3
  265. //
  266. // Main Window Extra Bytes
  267. //
  268. #define MAINWND_EXTRA_BYTES 0
  269. //
  270. // Macro definitions
  271. //
  272. #define FREE_IF_ALLOC(x) if (x != NULL) GlobalFree(x)
  273. #define BOOL_TO_STATUS(x) (x ? ERROR_SUCCESS : GetLastError())
  274. #ifndef CLEAR_FIRST_FOUR_BYTES
  275. #define CLEAR_FIRST_FOUR_BYTES(x) *(DWORD *)(x) = 0L
  276. #endif
  277. //
  278. // Data structure Definitions
  279. //
  280. typedef enum _INSTALL_TYPE {
  281. FloppyDiskInstall = 0,
  282. OverTheNetInstall,
  283. CopyNetAdminUtils,
  284. ShowRemoteBootInfo} INSTALL_TYPE;
  285. typedef enum _SOURCE_TYPE {
  286. SourceUndef = 0,
  287. ServerShare,
  288. DirectoryPath} SOURCE_TYPE;
  289. typedef enum _SHARE_TYPE {
  290. ShareExisting = 0,
  291. CopyAndShare} SHARE_TYPE;
  292. typedef struct _NETCARD_INFO {
  293. TCHAR szInf[MAX_PATH+1]; // inf file name
  294. TCHAR szName[MAX_PATH+1]; // description
  295. TCHAR szDriverFile[MAX_PATH+1]; // device driver FileName
  296. TCHAR szInfKey[NETCARD_KEY_SIZE]; // Netcard Key Name
  297. TCHAR szDeviceKey[NETCARD_KEY_SIZE]; // netcard device key
  298. TCHAR szNifKey[NETCARD_KEY_SIZE]; // Netcard Info Key
  299. BOOL bTokenRing; // TRUE = Token Ring Netcard
  300. } NETCARD_INFO, *PNETCARD_INFO;
  301. typedef struct _PROTOCOL_INFO {
  302. TCHAR szName[MAX_PATH+1];
  303. TCHAR szKey[MAX_PATH+1];
  304. TCHAR szDir[MAX_PATH+1];
  305. } PROTOCOL_INFO, *PPROTOCOL_INFO;
  306. typedef struct _TCPIP_INFO {
  307. USHORT IpAddr[4];
  308. USHORT SubNetMask[4];
  309. USHORT DefaultGateway[4];
  310. } TCPIP_INFO, *PTCPIP_INFO;
  311. typedef enum _MACHINE_TYPE {
  312. UnknownSoftwareType = 0,
  313. AdvancedServer,
  314. NtWorkstation} MACHINE_TYPE;
  315. typedef struct _NCDU_DATA {
  316. MACHINE_TYPE mtLocalMachine;
  317. HKEY hkeyMachine;
  318. INSTALL_TYPE itInstall;
  319. BOOL bUseExistingPath;
  320. SHARE_TYPE shShareType;
  321. TCHAR szDistShowPath[MAX_PATH+1];
  322. TCHAR szDistPath[MAX_PATH+1];
  323. TCHAR szDestPath[MAX_PATH+1];
  324. SOURCE_TYPE stDistPathType;
  325. MEDIA_TYPE mtBootDriveType;
  326. BOOL bRemoteBootReqd;
  327. NETCARD_INFO niNetCard;
  328. TCHAR szBootFilesPath[MAX_PATH+1];
  329. PROTOCOL_INFO piFloppyProtocol;
  330. PROTOCOL_INFO piTargetProtocol;
  331. TCHAR szTargetSetupCmd[MAX_PATH+1];
  332. TCHAR szComputerName[MAX_COMPUTERNAME_LENGTH+1];
  333. TCHAR szUsername[MAX_USERNAME+1];
  334. TCHAR szDomain[MAX_DOMAINNAME+1];
  335. BOOL bUseDhcp;
  336. TCPIP_INFO tiTcpIpInfo;
  337. TCHAR szFloppyClientName[MAX_PATH+1];
  338. UINT uExitMessages[MAX_EXITMSG];
  339. } NCDU_DATA, *PNCDU_DATA;
  340. typedef struct _COPY_FILE_DLG_STRUCT {
  341. LPTSTR szDisplayName;
  342. LPTSTR szSourceDir;
  343. LPTSTR szDestDir;
  344. DWORD dwCopyFlags;
  345. DWORD dwTotalSize;
  346. DWORD dwFilesCopied;
  347. DWORD dwDirsCreated;
  348. } CF_DLG_DATA, *PCF_DLG_DATA;
  349. typedef struct _DIR_BROWSER_STRUCT {
  350. DWORD dwTitle; // dialog box title Resource ID: 0="Directory Browser"
  351. LPTSTR szPath; // initial path in and resulting path out
  352. DWORD Flags; // see below
  353. } DB_DATA, *PDB_DATA;
  354. #define PDB_FLAGS_NOCHECKDIR 0x00000001 // allow non-existent paths
  355. typedef struct _SHARE_PATH_DLG_STRUCT {
  356. LPWSTR szServer;
  357. LPWSTR szPath;
  358. LPWSTR szShareName;
  359. LPWSTR szRemark;
  360. } SPS_DATA, *PSPS_DATA;
  361. typedef struct _FIND_DIST_TREE_STRUCT {
  362. LPTSTR szPathBuffer; // buffer to load found path in
  363. DWORD dwPathBufferLen; // size of path buffer (above)
  364. PLONG plPathType; // pointer to buffer recieving path type
  365. DWORD dwSearchType; // search type (see flags below)
  366. } FDT_DATA, *PFDT_DATA;
  367. #pragma pack(1)
  368. typedef struct _DOS_BOOT_SECTOR {
  369. BYTE bsJump[3];
  370. CHAR bsOemName[8];
  371. WORD bsBytesPerSec;
  372. BYTE bsSecPerClust;
  373. WORD bsResSectors;
  374. BYTE bsFats;
  375. WORD bsRootDirEnts;
  376. WORD bsSectors;
  377. BYTE bsMedia;
  378. WORD bsFatSecs;
  379. WORD bsSecsPerTrack;
  380. WORD bsHeads;
  381. DWORD bsHiddenSecs;
  382. DWORD bsHugeSectors;
  383. BYTE bsDriveNumber;
  384. BYTE bsReserved1;
  385. BYTE bsBootSignature;
  386. DWORD bsVolumeId;
  387. CHAR bsVolumeLabel[11];
  388. CHAR bsFileSysType[8];
  389. BYTE bsBootSectorBytes[1];
  390. } DOS_BOOT_SECTOR, *PDOS_BOOT_SECTOR;
  391. #pragma pack()
  392. //
  393. #define FDT_CLIENT_TREE (0x00000001)
  394. #define FDT_TOOLS_TREE (0x00000002)
  395. //
  396. // Directory Browser Flags
  397. //
  398. #define DBS_VALIDATE_PATH 0x00000001 // only allow valid paths
  399. #define DBS_CLIENT_PATH 0x00000003 // only allow valid dist. paths
  400. // global variables
  401. // these are allocated and initialized in otnboot.c
  402. //
  403. extern PNCDU_DATA pAppInfo;
  404. #ifdef JAPAN
  405. extern USHORT usLangID;
  406. // fixed kkntbug #12382
  407. // NCAdmin:"[] Make Japanese startup disks" is not functioning.
  408. extern BOOL bJpnDisk;
  409. #endif
  410. //
  411. // external function definitions
  412. //
  413. //
  414. // *** UTILS.C ***
  415. //
  416. BOOL
  417. GetShareFromUnc (
  418. IN LPCTSTR szPath,
  419. OUT LPTSTR szShare
  420. );
  421. BOOL
  422. GetNetPathInfo (
  423. IN LPCTSTR szPath,
  424. OUT LPTSTR szServer,
  425. OUT LPTSTR szRemotePath
  426. );
  427. BOOL
  428. ComputerPresent (
  429. IN LPCTSTR szMachine
  430. );
  431. BOOL
  432. GetServerFromUnc (
  433. IN LPCTSTR szPath,
  434. OUT LPTSTR szServer
  435. );
  436. BOOL
  437. MatchFirst (
  438. IN LPCTSTR szStringA,
  439. IN LPCTSTR szStringB
  440. );
  441. BOOL
  442. LookupLocalShare (
  443. IN LPCTSTR szDrivePath,
  444. IN BOOL bExactMatch,
  445. OUT LPTSTR szLocalPath,
  446. IN PDWORD pdwBuffLen
  447. );
  448. BOOL
  449. LookupRemotePath (
  450. IN LPCTSTR szDrivePath,
  451. OUT LPTSTR szRemotePath,
  452. IN PDWORD pdwBuffLen
  453. );
  454. BOOL
  455. OnRemoteDrive (
  456. IN LPCTSTR szPath
  457. );
  458. DWORD
  459. ComputeFreeSpace (
  460. IN LPCTSTR szPath
  461. );
  462. DWORD
  463. GetSizeFromInfString (
  464. IN LPCTSTR szString
  465. );
  466. BOOL
  467. IsShareNameUsed (
  468. IN LPCTSTR szServerName,
  469. IN LPCTSTR szShareName,
  470. IN OUT PDWORD pdwType,
  471. IN OUT LPTSTR pszPath
  472. );
  473. BOOL
  474. SavePathToRegistry (
  475. LPCTSTR szPath,
  476. LPCTSTR szServerKey,
  477. LPCTSTR szShareKey
  478. );
  479. BOOL
  480. Dlg_WM_SYSCOMMAND (
  481. IN HWND hwndDlg,
  482. IN WPARAM wParam,
  483. IN LPARAM lParam
  484. );
  485. LRESULT
  486. Dlg_WM_MOVE (
  487. IN HWND hwndDlg,
  488. IN WPARAM wParam,
  489. IN LPARAM lParam
  490. );
  491. BOOL
  492. Dlg_WM_PAINT (
  493. IN HWND hwndDlg,
  494. IN WPARAM wParam,
  495. IN LPARAM lParam
  496. );
  497. DWORD
  498. QuietGetFileAttributes (
  499. IN LPCTSTR szFileName
  500. );
  501. DWORD
  502. QuietGetPrivateProfileString (
  503. IN LPCTSTR lpszSection,
  504. IN LPCTSTR lpszKey,
  505. IN LPCTSTR lpszDefault,
  506. OUT LPTSTR lpszReturnBuffer,
  507. IN DWORD cchReturnBuffer,
  508. IN LPCTSTR lpszFile
  509. );
  510. BOOL
  511. GetSizeOfDirs (
  512. IN LPCTSTR szPath,
  513. IN BOOL bFlags,
  514. IN OUT PDWORD pdwSize
  515. );
  516. #define GSOD_INCLUDE_SUBDIRS 0x00000001
  517. BOOL
  518. MediaPresent (
  519. IN LPCTSTR szPath,
  520. IN BOOL bCheckFormat
  521. );
  522. LPCTSTR
  523. GetKeyFromEntry (
  524. IN LPCTSTR szEntry
  525. );
  526. LPCTSTR
  527. GetItemFromEntry (
  528. IN LPCTSTR szEntry,
  529. IN DWORD dwItem
  530. );
  531. LPCTSTR
  532. GetFileNameFromEntry (
  533. IN LPCTSTR szEntry
  534. );
  535. BOOL
  536. FileExists (
  537. IN LPCTSTR szFileName
  538. );
  539. //
  540. // *** FindClnt.C ***
  541. //
  542. LONG
  543. GetDistributionPath (
  544. IN HWND hwndDlg, // handle to dialog box window
  545. IN DWORD dwSearchType, // type of dir to find: Client/tools
  546. IN OUT LPTSTR szPath, // buffer to return path in (Req'd)
  547. IN DWORD dwPathLen, // size of path buffer in chars
  548. IN PLONG plPathType // pointer to buffer recieving path type (opt)
  549. );
  550. // path type
  551. #define NCDU_NO_CLIENT_PATH_FOUND 0x00000000
  552. #define NCDU_PATH_FROM_REGISTRY 0x00000001
  553. #define NCDU_LOCAL_SHARE_PATH 0x00000002
  554. #define NCDU_HARD_DRIVE_PATH 0x00000004
  555. #define NCDU_CDROM_PATH 0x00000008
  556. #ifdef JAPAN
  557. // fixed kkntbug #11940
  558. // Network client administrator can not make install disks on PC with C drive as FD
  559. #define NCDU_LOGICAL_DRIVE_MASK 0x00000001
  560. #endif
  561. INT_PTR CALLBACK
  562. FindClientsDlgProc (
  563. IN HWND hwndDlg,
  564. IN UINT message,
  565. IN WPARAM wParam,
  566. IN LPARAM lParam
  567. );
  568. //
  569. // ShareNet.C
  570. //
  571. INT_PTR CALLBACK
  572. ShareNetSwDlgProc (
  573. IN HWND hwndDlg,
  574. IN UINT message,
  575. IN WPARAM wParam,
  576. IN LPARAM lParam
  577. );
  578. //
  579. //
  580. //
  581. LONG
  582. CreateDirectoryFromPath (
  583. IN LPCTSTR szPath,
  584. IN LPSECURITY_ATTRIBUTES lpSA
  585. );
  586. BOOL
  587. IsPathADir (
  588. IN LPCTSTR szPath
  589. );
  590. int
  591. PositionWindow (
  592. IN HWND hwnd
  593. );
  594. LPCTSTR
  595. GetNetErrorMsg (
  596. IN LONG lNetErr
  597. );
  598. BOOL
  599. ShowAppHelp (
  600. IN HWND hwndDlg,
  601. IN WORD wContext
  602. );
  603. BOOL
  604. SetSysMenuMinimizeEntryState (
  605. IN HWND hwnd,
  606. IN BOOL bState
  607. );
  608. BOOL
  609. RemoveMaximizeFromSysMenu (
  610. IN HWND hWnd // window handle
  611. );
  612. BOOL
  613. IsBootDisk (
  614. IN LPCTSTR szPath
  615. );
  616. BOOL
  617. TrimSpaces (
  618. IN OUT LPTSTR szString
  619. );
  620. DWORD
  621. TranslateEscapeChars (
  622. IN LPTSTR szNewString,
  623. IN LPTSTR szString
  624. );
  625. BOOL
  626. IsUncPath (
  627. IN LPCTSTR szPath
  628. );
  629. MEDIA_TYPE
  630. GetDriveTypeFromPath (
  631. IN LPCTSTR szPath
  632. );
  633. MACHINE_TYPE
  634. GetSystemType (
  635. VOID
  636. );
  637. LPCTSTR
  638. GetEntryInMultiSz (
  639. IN LPCTSTR mszList,
  640. IN DWORD dwEntry
  641. );
  642. BOOL
  643. RegisterMainWindowClass(
  644. IN HINSTANCE hInstance
  645. );
  646. DWORD
  647. AddStringToMultiSz (
  648. LPTSTR OUT mszDest,
  649. LPCTSTR IN szSource
  650. );
  651. DWORD
  652. StringInMultiSz (
  653. IN LPCTSTR szString,
  654. IN LPCTSTR mszList
  655. );
  656. LPCTSTR
  657. GetStringResource (
  658. IN UINT nId
  659. );
  660. UINT
  661. ValidSharePath (
  662. IN LPCTSTR szPath
  663. );
  664. UINT
  665. ValidSrvToolsPath (
  666. IN LPCTSTR szPath
  667. );
  668. BOOL
  669. DotOrDotDotDir (
  670. IN LPCTSTR szFileName
  671. );
  672. BOOL
  673. LoadClientList (
  674. IN HWND hwndDlg,
  675. IN int nListId,
  676. IN LPCTSTR szPath,
  677. IN UINT nListType,
  678. OUT LPTSTR mszDirList
  679. );
  680. BOOL
  681. EnableExitMessage (
  682. IN BOOL bNewState
  683. );
  684. BOOL
  685. AddMessageToExitList (
  686. IN PNCDU_DATA pData,
  687. IN UINT nMessage
  688. );
  689. BOOL
  690. CenterWindow (
  691. HWND hwndChild,
  692. HWND hwndParent
  693. );
  694. int
  695. DisplayMessageBox (
  696. IN HWND hWndOwner,
  697. IN UINT nMsgId,
  698. IN UINT nTitleId,
  699. IN UINT nStyle
  700. );
  701. VOID
  702. InitAppData (
  703. IN PNCDU_DATA pData
  704. );
  705. LRESULT CALLBACK
  706. MainWndProc (
  707. IN HWND hWnd, // window handle
  708. IN UINT message, // type of message
  709. IN WPARAM uParam, // additional information
  710. IN LPARAM lParam // additional information
  711. );
  712. INT_PTR CALLBACK
  713. SwConfigDlgProc (
  714. IN HWND hwndDlg,
  715. IN UINT message,
  716. IN WPARAM wParam,
  717. IN LPARAM lParam
  718. );
  719. INT_PTR CALLBACK
  720. TargetWsDlgProc (
  721. IN HWND hwndDlg,
  722. IN UINT message,
  723. IN WPARAM wParam,
  724. IN LPARAM lParam
  725. );
  726. INT_PTR CALLBACK
  727. ServerConnDlgProc (
  728. IN HWND hwndDlg,
  729. IN UINT message,
  730. IN WPARAM wParam,
  731. IN LPARAM lParam
  732. );
  733. INT_PTR CALLBACK
  734. LanManCfgDlgProc (
  735. IN HWND hwndDlg,
  736. IN UINT message,
  737. IN WPARAM wParam,
  738. IN LPARAM lParam
  739. );
  740. INT_PTR CALLBACK
  741. CopyFlopDlgProc (
  742. IN HWND hwndDlg,
  743. IN UINT message,
  744. IN WPARAM wParam,
  745. IN LPARAM lParam
  746. );
  747. INT_PTR CALLBACK
  748. CopyFileDlgProc (
  749. IN HWND hwndDlg,
  750. IN UINT message,
  751. IN WPARAM wParam,
  752. IN LPARAM lParam
  753. );
  754. INT_PTR CALLBACK
  755. ConfirmSettingsDlgProc (
  756. IN HWND hwndDlg,
  757. IN UINT message,
  758. IN WPARAM wParam,
  759. IN LPARAM lParam
  760. );
  761. INT_PTR CALLBACK
  762. ExitMessDlgProc (
  763. IN HWND hwndDlg,
  764. IN UINT message,
  765. IN WPARAM wParam,
  766. IN LPARAM lParam
  767. );
  768. INT_PTR CALLBACK
  769. MakeFlopDlgProc (
  770. IN HWND hwndDlg,
  771. IN UINT message,
  772. IN WPARAM wParam,
  773. IN LPARAM lParam
  774. );
  775. INT_PTR CALLBACK
  776. DirBrowseDlgProc (
  777. IN HWND hwndDlg,
  778. IN UINT message,
  779. IN WPARAM wParam,
  780. IN LPARAM lParam
  781. );
  782. INT_PTR CALLBACK
  783. CopyNetUtilsDlgProc (
  784. IN HWND hwndDlg,
  785. IN UINT message,
  786. IN WPARAM wParam,
  787. IN LPARAM lParam
  788. );
  789. INT_PTR CALLBACK
  790. SharePathDlgProc (
  791. IN HWND hwndDlg,
  792. IN UINT message,
  793. IN WPARAM wParam,
  794. IN LPARAM lParam
  795. );
  796. INT_PTR CALLBACK
  797. SelToolsDlgProc (
  798. IN HWND hwndDlg,
  799. IN UINT message,
  800. IN WPARAM wParam,
  801. IN LPARAM lParam
  802. );
  803. INT_PTR CALLBACK
  804. AboutDlgProc (
  805. IN HWND hwndDlg,
  806. IN UINT message,
  807. IN WPARAM wParam,
  808. IN LPARAM lParam
  809. );
  810. BOOL
  811. FormatDiskInDrive (
  812. IN HWND hWnd, // "owning" window
  813. IN TCHAR cDrive, // drive letter to format (only A or B)
  814. IN LPCTSTR szLabel, // label text
  815. IN BOOL bConfirmFormat // prompt with "r-u-sure?" dialog
  816. );
  817. BOOL
  818. LabelDiskInDrive (
  819. IN HWND hWnd, // owner window
  820. IN TCHAR cDrive, // drive letter to format (only A or B)
  821. IN LPCTSTR szLabel // label text
  822. );
  823. DWORD
  824. GetBootDiskDosVersion (
  825. IN LPCTSTR szPath
  826. );
  827. DWORD
  828. GetMultiSzLen (
  829. IN LPCTSTR mszInString
  830. );
  831. DWORD
  832. GetClusterSizeOfDisk (
  833. IN LPCTSTR szPath
  834. );
  835. DWORD
  836. QuietGetFileSize (
  837. IN LPCTSTR szPath
  838. );
  839. #include "otnbtstr.h" // string constant definitions
  840. #endif //_otnboot_H_