2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
[mono.git] / mcs / class / System / System.Diagnostics / Process.cs
index 5084af506a423f4ab2b124080dfcc8577d8e9f5d..1de6f0f4b1733342fd60fd56df672d5bdc391c5c 100755 (executable)
@@ -18,13 +18,8 @@ using System.Runtime.InteropServices;
 using System.Collections;
 
 namespace System.Diagnostics {
-       [DefaultEvent ("Exited"), DefaultProperty ("StartInfo"), DesignerCategory ("Component")]
-       #if (NET_1_0)
-               [Designer ("System.Diagnostics.Design.ProcessDesigner, System.Design, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof (IDesigner))]
-       #endif
-       #if (NET_1_1)
-               [Designer ("System.Diagnostics.Design.ProcessDesigner, System.Design, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof (IDesigner))]
-       #endif
+       [DefaultEvent ("Exited"), DefaultProperty ("StartInfo")]
+       [Designer ("System.Diagnostics.Design.ProcessDesigner, " + Consts.AssemblySystem_Design, typeof (IDesigner))]
        public class Process : Component 
        {
                [StructLayout(LayoutKind.Sequential)]
@@ -32,7 +27,7 @@ namespace System.Diagnostics {
                {
                        public IntPtr process_handle;
                        public IntPtr thread_handle;
-                       public int pid;
+                       public int pid; // Contains -GetLastError () on failure.
                        public int tid;
                };
                
@@ -469,7 +464,7 @@ namespace System.Diagnostics {
                }
 
                [MonoTODO]
-               [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden), Browsable (false)]
+               [DefaultValue (null), Browsable (false)]
                [MonitoringDescription ("The object that is used to synchronize event handler calls for this process.")]
                public ISynchronizeInvoke SynchronizingObject {
                        get {
@@ -695,7 +690,7 @@ namespace System.Diagnostics {
                                if (startInfo.RedirectStandardError == true)
                                        MonoIO.Close (stderr_wr, out error);
 
-                               throw new Win32Exception ();
+                               throw new Win32Exception (-proc_info.pid);
                        }
                        
                        process.process_handle=proc_info.process_handle;