tools/Stampfer/PeterSource1_1/Program.cs
/// <summary>
/// The main entry point for the application.
/// </summary>
/// 
The main entry point for the application.
The main entry point for the application .
[STAThread]
        static void Main(string[] args)
        {
            if (IsAlreadyRunning())
            {
                SwitchToCurrentInstance(args);
            }
            else
            {
                IpcChannel ipcCh = new IpcChannel("IPChannelName");
                ChannelServices.RegisterChannel(ipcCh,false);
                RemotingConfiguration.RegisterWellKnownServiceType
                   (typeof(MyRemoteObject),
                           "SreeniRemoteObj",
                           WellKnownObjectMode.Singleton);
                Application.EnableVisualStyles();
                Application.Run(new MainForm(args));
            }
        }
[ STAThread ] static void Main ( string [ ] args ) { if ( IsAlreadyRunning ( ) ) { SwitchToCurrentInstance ( args ) ; } else { IpcChannel ipcCh = new IpcChannel ( " " ) ; ChannelServices . RegisterChannel ( ipcCh , false ) ; RemotingConfiguration . RegisterWellKnownServiceType ( typeof ( MyRemoteObject ) , " " , WellKnownObjectMode . Singleton ) ; Application . EnableVisualStyles ( ) ; Application . Run ( new MainForm ( args ) ) ; } }
The main entry point for the application.
The main entry point for the application .
/* && args.Length > 0*/
args
string[]