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.

58 lines
1.2 KiB

  1. using System;
  2. using System.Resources;
  3. namespace mbsh
  4. {
  5. /// <summary>
  6. /// Main class for mbsh application.
  7. /// </summary>
  8. class CMbshApp
  9. {
  10. /// <summary>
  11. /// The main entry point for the application.
  12. /// </summary>
  13. [STAThread]
  14. public static int Main(string[] args)
  15. {
  16. // Get a resource manager
  17. ResourceManager resources = new ResourceManager("Mbsh.Mbsh", System.Reflection.Assembly.GetExecutingAssembly());
  18. Console.WriteLine(resources.GetString("mainGreeting"));
  19. try
  20. {
  21. CArgHandler m_argHandler = new CArgHandler(args);
  22. CProcessor m_proc = new CProcessor(m_argHandler.MBPath);
  23. if (m_argHandler.NeedsHelp)
  24. {
  25. m_argHandler.GiveHelp();
  26. }
  27. else
  28. {
  29. m_proc.DoWork();
  30. }
  31. return(0);
  32. }
  33. catch(CMbshException e)
  34. {
  35. Console.WriteLine(e.Message);
  36. Console.WriteLine(resources.GetString("exiting"));
  37. return(-1);
  38. }
  39. catch(Exception e)
  40. {
  41. Console.WriteLine(e.Message);
  42. return(-1);
  43. }
  44. }
  45. public const int c_iMaxArgs = 1;
  46. public const string c_DefaultMBPath = "/LOCALHOST";
  47. public const string c_ConnectString = "IIS:/";
  48. }
  49. }