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.

493 lines
21 KiB

  1. /*****************************************************************/
  2. /** Microsoft LAN Manager **/
  3. /** Copyright(c) Microsoft Corp., 1989-1990 **/
  4. /*****************************************************************/
  5. /*
  6. * Windows/Network Interface -- LAN Manager
  7. *
  8. * History:
  9. * Johnl 27-Feb-1991 Removed IDS_WinHelpFile, IDS_Error, IDS_Information,
  10. * IDS_Warning, IDS_WinHelpFile error message
  11. *
  12. * Johnl 18-Jun-1991 Added IERR_ProfileLoadErrorWithCancel
  13. * JonN 24-Oct-1991 moved neterr.str to $(UI)\common\xlate\string
  14. * JonN 25-Oct-1991 moved bseerr.str to $(UI)\common\xlate\string
  15. * Yi-HsinS12-Mar-1992 Added #include <applib*.*> to fix share management
  16. * dialog.
  17. * beng 30-Jul-1992 Many resources moved onto lmuicmn dlls
  18. */
  19. /*
  20. * CODEWORK -- the .DLG files generated by the new Dialog Editor all
  21. * contain RCDATA resources for the internal use of the Dialog Editor.
  22. * These should be removed before retain shipment. JONN 5/01/91
  23. * ByronD confirms that Dialog Editor will not do this work. He notes
  24. * that these resources are LOADONCALL and therefore will never be
  25. * loaded. JONN 5/09/91
  26. */
  27. #include <windows.h>
  28. #include <apperr.h>
  29. #define INCL_DOSERRORS
  30. #include <lmerr.h>
  31. // Help contexts
  32. #include <helpnums.h>
  33. #include <uimsg.h>
  34. #include <sharedlg.h> // has to be included before property.dlg
  35. #include <opens.h> // has to be included before opens.dlg
  36. #include <winlocal.h>
  37. #include <wnbrows.h>
  38. #include <wndev.h>
  39. #include <wninit.h>
  40. #include <bltapp.rc>
  41. #include "share.dlg"
  42. #include "opens.dlg"
  43. #include "property.dlg"
  44. #ifndef WIN32
  45. #include "winnet.dlg"
  46. #include <wnlogon.h>
  47. #include "logndlog.dlg"
  48. // #include <wnpasswd.h>
  49. // #include "passwd.dlg"
  50. // #include "pswddlog.dlg"
  51. #endif
  52. /*
  53. * The following are bitmaps for the share dialogs
  54. */
  55. BMID_SHARE BITMAP DISCARDABLE "bitmap\\share.bmp"
  56. BMID_STICKYSHARE BITMAP DISCARDABLE "bitmap\\shared.bmp"
  57. BMID_IPCSHARE BITMAP DISCARDABLE "bitmap\\ipc.bmp"
  58. STRINGTABLE
  59. BEGIN
  60. IDS_SHELLHELPFILENAME, "winfile.hlp"
  61. /*
  62. * This is used solely for the NPAddConnection3 password dialog
  63. */
  64. IDS_CREDHELPFILENAME, "network.hlp"
  65. /* If you change this string, you also need to change
  66. * the corresponding string in ui\admin\server\xlate\srvmgr.str
  67. */
  68. IDS_SMHELPFILENAME, "srvmgr.hlp"
  69. #ifndef WIN32
  70. /* Note. It is assumed that none of the messages or errors that
  71. follow use more than MAX_TEXT_SIZE (defined in winlocal.h)
  72. bytes.
  73. */
  74. /* The following two strings are error messages from apperr.h.
  75. * They are not updated automatically as the neterr.h
  76. * error messages above. There are several reasons for this.
  77. * First, the apperr.h file is in a different format, and SED
  78. * would have to search through multiple lines. Secondly,
  79. * apperr.h is very large. Finally, and most importantly,
  80. * since we only need two messages from this file, the overhead
  81. * did not seem to be worth the effort. Consequently, these
  82. * two messages must be updated manually.
  83. */
  84. /* APE_UtilNomatch, "The passwords do not match." */
  85. APE_NoGoodPass, "A valid password was not entered."
  86. /* Here begins the WinNet strings */
  87. /* The following message is for when _lopen fails. The message
  88. * is never displayed directly from the driver. Instead, it
  89. * is accessible from the WNetGetErrorText function.
  90. */
  91. IERR_CannotOpenPrtJobFile, "Unable to print to device"
  92. if 0
  93. {
  94. IERR_MessageNoText, "The message text is empty. Send anyway?"
  95. IERR_MessageRetry, "The user was not found. Retry with a different name?"
  96. IERR_MessageNoUser, "You must specify a username to send the message."
  97. IERR_LogoffQuery, "Logging off will break all existing network connections. Do you want to continue?"
  98. /* Note that the next message says "You MAY have [...]". "may" is
  99. * included because it could happen that the condition whether or
  100. * not files are open cannot be checked (for example, if there is
  101. * not enough memory).
  102. */
  103. IERR_LogoffQueryOpenFiles, "You may have open files or programs on the network. Logging off will close these files or end these programs. The system may also become unstable and data may be lost! Do you want to continue?"
  104. /* The following error message is displayed when the user attempts
  105. * to connect to an invalid network path.
  106. */
  107. IERR_NoServers, "There are no servers visible on this domain."
  108. IDS_DMNoUser, "(not currently logged on)"
  109. IDS_DomainText, "Domain:" /* same string as in Browser dialog, except this
  110. one does not include an accelerator */
  111. IDS_BrowseCaptionAll, "Network Resources"
  112. IDS_BrowseCaptionDisk, "Network Disk Resources"
  113. IDS_BrowseCaptionPrint, "Network Printers"
  114. IDS_BrowseShareText, "&Resources at "
  115. IDS_VersionText, "Version "
  116. /* LM 2.1 and above does NOT support real-mode Windows. Display the
  117. * following error to warn the user.
  118. */
  119. IERR_NoSupportForRealMode, "This version of Lan Manager Windows Driver Requires Standard or Enhanced Mode Windows."
  120. /* Error messages to be displayed if driver cannot be loaded. */
  121. IERR_NetworkNotStarted, "Network not started."
  122. IERR_CannotInitMsgPopup, "You are out of memory or your copy of the network driver is invalid. The network driver cannot be loaded."
  123. IERR_CannotDisplayUserInfo, "Cannot display user information"
  124. /* The following message is displayed when the user enters a
  125. * bad share password.
  126. */
  127. IERR_BadSharePassword, "You have typed an invalid share password."
  128. /* The following message is displayed when the user's
  129. * connection profile could not be changed.
  130. *
  131. * The same insertion strings are available to this error
  132. * message as to IERR_ProfileLoadError, but since we cannot
  133. * distinguish between file errors in this implementation
  134. * (using the _lopen file primitives in fileio.cxx), we ignore
  135. * this information.
  136. */
  137. IERR_ProfileChangeError, "An error occurred while attempting to modify your profile.\n\nThe change in your connections has not been recorded and will not take effect the next time you log on."
  138. /* The following message is displayed a connection in the
  139. * user's connection profile could not be loaded.
  140. * %1: the string loaded by one of FMT_NET_error, FMT_SYS_error,
  141. * or FMT_other_error.
  142. * %2: The name of the device which could not be reconnected.
  143. * %3: The name of the resource to which the device could not
  144. * be reconnected.
  145. */
  146. IERR_ProfileLoadError, "An error occurred while reconnecting %2 to %3:\n\n%1\n\nThis connection has not been restored."
  147. /* Exactly the same as IERR_ProfileLoadError, except the user will be
  148. * presented with a Yes/No choice asking if they want to continue to
  149. * attempt loading the profile.
  150. */
  151. IERR_ProfileLoadErrorWithCancel, "An error occurred while reconnecting %2 to %3:\n\n%1\n\nContinue restoring connections?"
  152. /* The following message is displayed when any error occurs while
  153. * reading the profile file.
  154. */
  155. IERR_ProfileFileRead, "The network connections in your configuration could not be loaded because of an error accessing the file LMUSER.INI."
  156. /*
  157. * The following message is displayed when a device cannot be
  158. * reconnected because it is already connected.
  159. * %1: the name of the device
  160. * %2: the name of the remote resource
  161. */
  162. IERR_ProfileAlreadyAssigned, "%1 could not be reconnected to %2 because the device is already in use by your computer."
  163. /* The following strings are used to construct error notification
  164. * strings. Insertion parameter %1 should be the error code
  165. * expressed in printf() format "%04hu" (four digits with
  166. * leading zeroes e.g. "0073"), and insertion parameter %2 should be
  167. * the text of the error message.
  168. */
  169. FMT_NET_error, "%2 [NET%1]"
  170. FMT_SYS_error, "%2 [SYS%1]"
  171. FMT_other_error, "%2 [ERROR]"
  172. PRIV_STRING_USER, "USER"
  173. PRIV_STRING_ADMIN, "ADMINISTRATOR"
  174. IERR_DelUnavailQuery, "Do you want to stop connecting %1 to %2 when you log on to the network?"
  175. /* The following message is used by the Disconnect Drive and
  176. * Connection dialog, if the user attempts to disconnect a device
  177. * which has open files.
  178. */
  179. IERR_DelUseOpenFilesQuery, "An application is using the connection on %1. Disconnecting may cause loss of data. Do you want to continue?"
  180. IDS_DevicePromptDrive, "Drive Letter:"
  181. IDS_DevicePromptDevice, "Device Name:"
  182. IERR_OutOfStructures, "Too many redirected devices."
  183. }
  184. IERR_CannotConnect, "The network path you specified is invalid."
  185. IERR_PWNoUser, "You must specify a username in order to change your password."
  186. IERR_PWNoDomainOrServer, "You must specify a domain or a server in order to change your password."
  187. #endif //!WIN32
  188. IERR_FullAPISupportNotLoaded, "Full API support was not loaded."
  189. IERR_IncorrectNetwork, "Installed network software is not Microsoft LAN Manager."
  190. /* If LM 2.1 Winnet driver is running under LM 3.0, we will report
  191. * the following error and diable the LM 3.0 functionality. This is
  192. * because the fundamental difference between LM 2.1 and LM 3.0 could
  193. * cause a mess. Therefore, we'd better to stop the user at this
  194. * earliest stage.
  195. */
  196. IERR_HigherLMVersion, "Your network driver is designed for the previous version of LAN Manager. In order to get full functionality supported by the current version of LAN Manager. Please run LAN Manager's installer to upgrade."
  197. /* If LM 2.1 Winnet driver is running under pre-LM 2.1, we will report
  198. * the following error and diable the network functionality. This is
  199. * because the fundamental difference between LM 2.1 and the previous
  200. * LM versions could cause a mess. Therefore, we'd better to stop
  201. * the user here.
  202. */
  203. IERR_LowerLMVersion, "Your network driver is NOT compatible with your network. Please run Windows setup program to get the correct driver or consult your network administrator."
  204. /* If the MsgPopup information cannot be loaded (missing
  205. * resource strings or out-of-memory), display this error.
  206. */
  207. /* END of error messages to be displayed if driver cannot be loaded. */
  208. #ifndef WIN32
  209. /* The following errors are for the LOGON_DIALOG */
  210. IERR_LogonBadUsername, "The logon name entered is invalid. You must enter a valid logon name to log on."
  211. IERR_LogonBadDomainName, "The domain name entered is invalid. You must enter a valid domain name to log on."
  212. IERR_LogonBadPassword, "The password entered is invalid. You must enter a valid password to log on."
  213. /* The following string appears when the user is successfully
  214. * logged on. %1 should be the domain name, %2 the username,
  215. * %3 the servername (preceded by "\\\\"), and %4 the privilege
  216. * string (one of the PRIV_STRING_* strings).
  217. */
  218. IERR_LogonSuccess, "You were successfully logged on to %1 as %2 by %3 with %4 privilege."
  219. /* The following string appears when the user is logged on
  220. * standalone.
  221. */
  222. IERR_LogonStandalone, "You were logged on standalone."
  223. /* The following string appears when the user is not logged on.
  224. */
  225. IERR_LogonFailure, "You have not been logged on."
  226. /* Used by CHANGEPASSWORD_DIALOG */
  227. IERR_InvalidDomainName, "Invalid domain name."
  228. /* The following string should be the same string that is in the
  229. * caption of the BLT MsgPopup dialogs (see $(UI)\common\h\bltmsgp.dlg)
  230. */
  231. IDS_LMMsgBoxTitle, "LAN Manager"
  232. /* Note, an Ascii string number will be concatenated to
  233. * the following error message. Therefore, it must end
  234. * with a space, and cannot be quite as long as the other
  235. * error messages (see wnerr.c, function ErrorPopup, for
  236. * details). We hope that this error message should never
  237. * have to be displayed, but it is better to display it
  238. * than to display an empty message.
  239. */
  240. IERR_UnrecognizedNetworkError, "Unrecognized network error, Error Code "
  241. /* The following message is displayed when the user attempts to
  242. * connect to a network resource but is not currently logged on.
  243. */
  244. IERR_NotLoggedOn, "You are not currently logged on. In order to connect to a network resource, you must first log on. Do you wish to log on?"
  245. /* The following message is displayed when the user decides not
  246. * to log on (in order to connect), or fails to log on (in order
  247. * to connect).
  248. */
  249. IERR_MustBeLoggedOnToConnect, "Cannot connect since you are not logged on."
  250. /* The following message is displayed when the user requests the
  251. * Disconnect dialog but is not logged on. This should not
  252. * normally occur, since this menu item should be disabled if
  253. * there are no network uses; but this can be spoofed by using
  254. * NetCmd to disconnect.
  255. */
  256. IERR_MustBeLoggedOnToDisconnect, "Cannot disconnect since you are not logged on."
  257. /* More descriptive messages for NERR_BadTransactConfig, ERROR_NOT_SUPPORTED
  258. * and ERROR_BAD_NET_NAME and ERROR_BAD_NETPATH. Used by the share browser.
  259. */
  260. IERR_BadTransactConfig, "This server does not support remote listing of shared resources."
  261. IERR_NOT_SUPPORTED, "This server does not support remote listing of shared resources."
  262. IERR_BAD_NET_NAME, "The server is not active on the network."
  263. /* The following strings appear in the IERR_LogonSuccess popup.
  264. * They are lower-case because lower-case is earier to read.
  265. */
  266. PRIV_STRING_GUEST, "GUEST"
  267. #ifndef WIN32
  268. /*
  269. * The following strings are used by the Change Password and
  270. * Password Expiry dialogs. IERR_PasswordTooRecent_Domain and
  271. * _Server expect %1 to be the name of the domain/server, and
  272. * expect %2 to be the number of days in text form rounded up;
  273. * the others do not require insertion strings.
  274. */
  275. IERR_PasswordNoMatch, "Be sure that the new password matches the confirmation password that you entered."
  276. IERR_PasswordOldInvalid, "The old password supplied was incorrect."
  277. IERR_PasswordTooRecent_Domain, "You may not change passwords on domain %1 until they are %2 day(s) old."
  278. IERR_PasswordTooRecent_Server, "You may not change passwords on server %1 until they are %2 day(s) old."
  279. IERR_PasswordHistConflict, "The new password you typed has been used recently. You must type a different password."
  280. IERR_PasswordNewInvalid, "The new password you typed contains invalid characters. You must type a different password."
  281. IERR_PasswordTooShort, "The new password you typed is too short. You must use a longer password."
  282. #endif
  283. IERR_CannotConnectAlias, "The network path you specified is not supported on this domain."
  284. IERR_ReplaceUnavailQuery, "You have a saved connection on %1 to %2. Do you want to replace it with a saved connection to %3?"
  285. IERR_DisconnectNoRemoteDrives, "There are no network drives to disconnect."
  286. IDS_LogonDialogCaptionFromApp, "%1: LAN Manager Logon"
  287. IERR_ConnectDlgNoDevices, "There are no available devices"
  288. /* The following strings are used in the Browse, Connect, and
  289. * Connection dialogs. Note, the mnemonics used should not
  290. * conflict with those defined in the dialogs. Please see
  291. * winnet.dlg for these dialog definitions.
  292. */
  293. (IDSBASE_BROW_RES_TEXT_FILE + IDSOFFSET_BROW_CAPTION_CONNECT),
  294. "Connect Network Drive"
  295. (IDSBASE_BROW_RES_TEXT_FILE + IDSOFFSET_BROW_CAPTION_CONNS),
  296. "Drives - Network Connections"
  297. (IDSBASE_BROW_RES_TEXT_FILE + IDSOFFSET_BROW_CAPTION_BROW),
  298. "Network Disk Resources"
  299. (IDSBASE_BROW_RES_TEXT_FILE + IDSOFFSET_BROW_SHOW_TEXT),
  300. "&Show File Resources on:"
  301. (IDSBASE_BROW_RES_TEXT_FILE + IDSOFFSET_BROW_IN_DOMAIN),
  302. "&File Resources in %1:"
  303. (IDSBASE_BROW_RES_TEXT_FILE + IDSOFFSET_BROW_ON_SERVER),
  304. "&File Resources on %1:"
  305. (IDSBASE_BROW_RES_TEXT_FILE + IDSOFFSET_BROW_DEVICE_TEXT),
  306. "&Drive Letter:"
  307. (IDSBASE_BROW_RES_TEXT_FILE + IDSOFFSET_BROW_CURRENT_CONNS),
  308. "Network Drive &Connections:"
  309. (IDSBASE_BROW_RES_TEXT_PRINT + IDSOFFSET_BROW_CAPTION_CONNECT),
  310. "Connect Network Printer"
  311. (IDSBASE_BROW_RES_TEXT_PRINT + IDSOFFSET_BROW_CAPTION_CONNS),
  312. "Printers - Network Connections"
  313. (IDSBASE_BROW_RES_TEXT_PRINT + IDSOFFSET_BROW_CAPTION_BROW),
  314. "Network Printer Resources"
  315. (IDSBASE_BROW_RES_TEXT_PRINT + IDSOFFSET_BROW_SHOW_TEXT),
  316. "&Show Printers on:"
  317. (IDSBASE_BROW_RES_TEXT_PRINT + IDSOFFSET_BROW_IN_DOMAIN),
  318. "&Printers in %1:"
  319. (IDSBASE_BROW_RES_TEXT_PRINT + IDSOFFSET_BROW_ON_SERVER),
  320. "&Printers on %1:"
  321. (IDSBASE_BROW_RES_TEXT_PRINT + IDSOFFSET_BROW_DEVICE_TEXT),
  322. "&Device Name:"
  323. (IDSBASE_BROW_RES_TEXT_PRINT + IDSOFFSET_BROW_CURRENT_CONNS),
  324. "Network Printer &Connections:"
  325. (IDSBASE_BROW_RES_TEXT_COMM + IDSOFFSET_BROW_CAPTION_CONNECT),
  326. "Connect Network Device"
  327. (IDSBASE_BROW_RES_TEXT_COMM + IDSOFFSET_BROW_CAPTION_CONNS),
  328. "Devices - Network Connections"
  329. (IDSBASE_BROW_RES_TEXT_COMM + IDSOFFSET_BROW_CAPTION_BROW),
  330. "Network Device Resources"
  331. (IDSBASE_BROW_RES_TEXT_COMM + IDSOFFSET_BROW_SHOW_TEXT),
  332. "&Show Devices on:"
  333. (IDSBASE_BROW_RES_TEXT_COMM + IDSOFFSET_BROW_IN_DOMAIN),
  334. "Device &Resources in %1:"
  335. (IDSBASE_BROW_RES_TEXT_COMM + IDSOFFSET_BROW_ON_SERVER),
  336. "Device &Resources on %1:"
  337. (IDSBASE_BROW_RES_TEXT_COMM + IDSOFFSET_BROW_DEVICE_TEXT),
  338. "&Device Name:"
  339. (IDSBASE_BROW_RES_TEXT_COMM + IDSOFFSET_BROW_CURRENT_CONNS),
  340. "Network Device &Connections:"
  341. (IDS_PASSWORD_EXPIRED_0),
  342. "Your password at %1 has expired."
  343. (IDS_PASSWORD_EXPIRED_1),
  344. "You must choose a new one to log on."
  345. (IDS_PASSWORD_EXPIRES_SOON_0),
  346. "Your password at %1 will expire in %2 days."
  347. (IDS_PASSWORD_EXPIRES_SOON_1),
  348. "You can choose a new one now."
  349. (IDS_PASSWORD_EXPIRES_TODAY_0),
  350. "Your password at %1 will expire in less than one day."
  351. (IDS_PASSWORD_EXPIRES_TODAY_1),
  352. "You can choose a new one now."
  353. #endif //!WIN32
  354. END
  355. /* Error string string table
  356. */
  357. #ifndef WIN32
  358. STRINGTABLE
  359. BEGIN
  360. /* Strings 2102 - 2433 are error messages from neterr.h.
  361. * They are updated automatically, and included here.
  362. */
  363. #include <string\neterr.str>
  364. #include <string\bseerr.str>
  365. END
  366. #endif
  367. STRINGTABLE
  368. BEGIN
  369. #include "share.str"
  370. #include "opens.str"
  371. #include "perm.str"
  372. END
  373. #ifndef WIN32
  374. NetDevMenu MENU
  375. BEGIN
  376. POPUP "&Account",
  377. BEGIN
  378. MENUITEM "Logo&n...", IDM_LOGON
  379. MENUITEM "Logo&ff", IDM_LOGOFF, GRAYED
  380. MENUITEM "&Change Password...", IDM_PASSWD
  381. MENUITEM "", 0
  382. MENUITEM "E&xit", IDM_EXIT
  383. END
  384. POPUP "&Message"
  385. BEGIN
  386. MENUITEM "&Send...", IDM_SEND
  387. END
  388. POPUP "&Options"
  389. BEGIN
  390. MENUITEM "&Log On at Startup", IDM_TOGGLE_AUTOLOGON
  391. MENUITEM "&Restore Connections at Log On", IDM_TOGGLE_AUTORESTORE
  392. MENUITEM "&Save Changes to Connections", IDM_TOGGLE_SAVECONNECTIONS
  393. MENUITEM "", 0
  394. MENUITEM "&Display Initial Warning Message", IDM_TOGGLE_WARNINGS
  395. END
  396. POPUP "&Help"
  397. BEGIN
  398. MENUITEM "&Index...", IDM_HELPINDEX
  399. MENUITEM "", 0
  400. MENUITEM "&About Networks...", IDM_ABOUT
  401. END
  402. END
  403. NetBrowseMenu MENU
  404. BEGIN
  405. POPUP "&Help"
  406. BEGIN
  407. MENUITEM "&Index...", IDM_BRWS_HELPINDEX
  408. MENUITEM "", 0
  409. MENUITEM "&About Networks...", IDM_BRWS_ABOUT
  410. END
  411. END
  412. #endif //!WIN32
  413. #ifdef WIN32
  414. #include <ntverp.h>
  415. #define VER_FILETYPE VFT_DLL
  416. #define VER_FILESUBTYPE VFT2_UNKNOWN
  417. #define VER_FILEDESCRIPTION_STR "Lanman Control dll"
  418. #define VER_INTERNALNAME_STR "ntlanman.dll"
  419. #define VER_ORIGINALFILENAME_STR "ntlanman.dll"
  420. #include "common.ver"
  421. #endif //!WIN32