Hey,
i am really greatful to you for helping me, and now i want another help,
this is my code:
Column =
new DataColumn();Column.DataType = System.Type.GetType("System.String");/* i think Here must be something else for Time */
Column.ColumnName =
"Proc_STime";Column.AutoIncrement = false;
Column.ReadOnly =
false;Column.Unique = false;
Table.Columns.Add(Column);
Column = new DataColumn();
Column.DataType = System.
Type.GetType("System.String");/* i think Here must be something else for Time */Column.ColumnName = "Proc_PProcTime";
Column.AutoIncrement =
false;Column.ReadOnly = false;Column.Unique = false;
Table.Columns.Add(Column);
Column =
new DataColumn();Column.DataType = System.Type.GetType("System.String");/* i think Here must be something else for Time */
Column.ColumnName =
"Proc_UProcTime";Column.AutoIncrement = false;
Column.ReadOnly =
false;Column.Unique = false;
Table.Columns.Add(Column);
Process
proc = Process.GetProcessById(m_nProcIDs[i]); /* where m_nProcIDs[i] is int array which contains process ids */
Row = Table.NewRow();
Row["Proc_ID"] = m_nProcIDs[i];
Row[
"Proc_Name"] = m_strProcessNames[i];
Row[
"Proc_Prio"] = proc.BasePriority;/*following three lines are creating some problem i dont know what it is coz it is also not giving error over there, but as soon as i take them out of comment, i get window showing " send this prob to microsoft or not" (usually we get in Win XP) */
Row["Proc_STime"] = (proc.StartTime.GetDateTimeFormats('F', DateTimeFormatInfo.InvariantInfo))[0];
Row["Proc_PProcTime"] = proc.PrivilegedProcessorTime.ToString();
Row["Proc_UProcTime"] = proc.UserProcessorTime.ToString();
/* Following lines are working properly */
Row["Proc_VMem"] = proc.VirtualMemorySize64.ToString();
Row[
"Proc_PMem"] = proc.PrivateMemorySize64.ToString();Row["Proc_PagedMem"] = proc.PagedMemorySize64.ToString();
Row[
"Proc_PagedSysMem"] = proc.PagedSystemMemorySize64.ToString();Row["Proc_NPagedSysMem"] = proc.NonpagedSystemMemorySize64.ToString();
Table.Rows.Add(Row);
myDataSet = new DataSet();
myDataSet.Tables.Add(Table);
myDataSet.WriteXml(
"Proc_Details.xml");
Please Help me out.
Enter your message below
Sign in or Join us (it's free).