Adding more events.

This commit is contained in:
Natan Tunik
2023-02-09 09:12:52 +02:00
parent 9ab4588dce
commit e9d12621d7
10 changed files with 565 additions and 201 deletions
+47 -31
View File
@@ -52,9 +52,10 @@
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 9);
this.label1.Location = new System.Drawing.Point(16, 11);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(205, 13);
this.label1.Size = new System.Drawing.Size(274, 17);
this.label1.TabIndex = 0;
this.label1.Text = "Display entried matching these conditions:";
//
@@ -80,10 +81,12 @@
"AuthenticationLevel",
"AuthenticationService",
"ImpersonationLevel",
"TimeStamp"});
this.comboBoxSearchByColumn.Location = new System.Drawing.Point(12, 25);
"TimeStamp",
"TaskName"});
this.comboBoxSearchByColumn.Location = new System.Drawing.Point(16, 31);
this.comboBoxSearchByColumn.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.comboBoxSearchByColumn.Name = "comboBoxSearchByColumn";
this.comboBoxSearchByColumn.Size = new System.Drawing.Size(121, 21);
this.comboBoxSearchByColumn.Size = new System.Drawing.Size(160, 24);
this.comboBoxSearchByColumn.TabIndex = 1;
//
// comboBoxRelation
@@ -95,9 +98,10 @@
"is",
"begins with",
"ends with"});
this.comboBoxRelation.Location = new System.Drawing.Point(140, 26);
this.comboBoxRelation.Location = new System.Drawing.Point(187, 32);
this.comboBoxRelation.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.comboBoxRelation.Name = "comboBoxRelation";
this.comboBoxRelation.Size = new System.Drawing.Size(87, 21);
this.comboBoxRelation.Size = new System.Drawing.Size(115, 24);
this.comboBoxRelation.TabIndex = 2;
//
// comboBoxValue
@@ -105,9 +109,10 @@
this.comboBoxValue.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.comboBoxValue.FormattingEnabled = true;
this.comboBoxValue.Location = new System.Drawing.Point(244, 25);
this.comboBoxValue.Location = new System.Drawing.Point(325, 31);
this.comboBoxValue.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.comboBoxValue.Name = "comboBoxValue";
this.comboBoxValue.Size = new System.Drawing.Size(412, 21);
this.comboBoxValue.Size = new System.Drawing.Size(548, 24);
this.comboBoxValue.TabIndex = 3;
//
// listViewColumnFilters
@@ -123,9 +128,10 @@
this.columnHeaderAction,
this.columnMatchCase});
this.listViewColumnFilters.HideSelection = false;
this.listViewColumnFilters.Location = new System.Drawing.Point(15, 85);
this.listViewColumnFilters.Location = new System.Drawing.Point(20, 105);
this.listViewColumnFilters.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.listViewColumnFilters.Name = "listViewColumnFilters";
this.listViewColumnFilters.Size = new System.Drawing.Size(776, 312);
this.listViewColumnFilters.Size = new System.Drawing.Size(1033, 383);
this.listViewColumnFilters.TabIndex = 4;
this.listViewColumnFilters.UseCompatibleStateImageBehavior = false;
this.listViewColumnFilters.View = System.Windows.Forms.View.Details;
@@ -161,17 +167,19 @@
this.comboBoxAction.Items.AddRange(new object[] {
"Include",
"Exclude"});
this.comboBoxAction.Location = new System.Drawing.Point(704, 25);
this.comboBoxAction.Location = new System.Drawing.Point(939, 31);
this.comboBoxAction.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.comboBoxAction.Name = "comboBoxAction";
this.comboBoxAction.Size = new System.Drawing.Size(84, 21);
this.comboBoxAction.Size = new System.Drawing.Size(111, 24);
this.comboBoxAction.TabIndex = 5;
//
// buttonOK
//
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonOK.Location = new System.Drawing.Point(551, 415);
this.buttonOK.Location = new System.Drawing.Point(735, 511);
this.buttonOK.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.buttonOK.Name = "buttonOK";
this.buttonOK.Size = new System.Drawing.Size(75, 23);
this.buttonOK.Size = new System.Drawing.Size(100, 28);
this.buttonOK.TabIndex = 6;
this.buttonOK.Text = "OK";
this.buttonOK.UseVisualStyleBackColor = true;
@@ -180,9 +188,10 @@
// buttonCancel
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.Location = new System.Drawing.Point(632, 415);
this.buttonCancel.Location = new System.Drawing.Point(843, 511);
this.buttonCancel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(75, 23);
this.buttonCancel.Size = new System.Drawing.Size(100, 28);
this.buttonCancel.TabIndex = 7;
this.buttonCancel.Text = "Cancel";
this.buttonCancel.UseVisualStyleBackColor = true;
@@ -191,9 +200,10 @@
// buttonAdd
//
this.buttonAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonAdd.Location = new System.Drawing.Point(623, 56);
this.buttonAdd.Location = new System.Drawing.Point(831, 69);
this.buttonAdd.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.buttonAdd.Name = "buttonAdd";
this.buttonAdd.Size = new System.Drawing.Size(75, 23);
this.buttonAdd.Size = new System.Drawing.Size(100, 28);
this.buttonAdd.TabIndex = 8;
this.buttonAdd.Text = "Add";
this.buttonAdd.UseVisualStyleBackColor = true;
@@ -202,9 +212,10 @@
// buttonRemove
//
this.buttonRemove.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonRemove.Location = new System.Drawing.Point(713, 56);
this.buttonRemove.Location = new System.Drawing.Point(951, 69);
this.buttonRemove.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.buttonRemove.Name = "buttonRemove";
this.buttonRemove.Size = new System.Drawing.Size(75, 23);
this.buttonRemove.Size = new System.Drawing.Size(100, 28);
this.buttonRemove.TabIndex = 9;
this.buttonRemove.Text = "Remove";
this.buttonRemove.UseVisualStyleBackColor = true;
@@ -214,18 +225,20 @@
//
this.labelThen.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.labelThen.AutoSize = true;
this.labelThen.Location = new System.Drawing.Point(662, 28);
this.labelThen.Location = new System.Drawing.Point(883, 34);
this.labelThen.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.labelThen.Name = "labelThen";
this.labelThen.Size = new System.Drawing.Size(28, 13);
this.labelThen.Size = new System.Drawing.Size(36, 17);
this.labelThen.TabIndex = 10;
this.labelThen.Text = "then";
//
// buttonReset
//
this.buttonReset.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonReset.Location = new System.Drawing.Point(15, 56);
this.buttonReset.Location = new System.Drawing.Point(20, 69);
this.buttonReset.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.buttonReset.Name = "buttonReset";
this.buttonReset.Size = new System.Drawing.Size(75, 23);
this.buttonReset.Size = new System.Drawing.Size(100, 28);
this.buttonReset.TabIndex = 11;
this.buttonReset.Text = "Reset";
this.buttonReset.UseVisualStyleBackColor = true;
@@ -234,9 +247,10 @@
// buttonApply
//
this.buttonApply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonApply.Location = new System.Drawing.Point(716, 415);
this.buttonApply.Location = new System.Drawing.Point(955, 511);
this.buttonApply.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.buttonApply.Name = "buttonApply";
this.buttonApply.Size = new System.Drawing.Size(75, 23);
this.buttonApply.Size = new System.Drawing.Size(100, 28);
this.buttonApply.TabIndex = 13;
this.buttonApply.Text = "Apply";
this.buttonApply.UseVisualStyleBackColor = true;
@@ -245,18 +259,19 @@
// CaseSensitiveCheckBox
//
this.CaseSensitiveCheckBox.AutoSize = true;
this.CaseSensitiveCheckBox.Location = new System.Drawing.Point(244, 53);
this.CaseSensitiveCheckBox.Location = new System.Drawing.Point(325, 65);
this.CaseSensitiveCheckBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.CaseSensitiveCheckBox.Name = "CaseSensitiveCheckBox";
this.CaseSensitiveCheckBox.Size = new System.Drawing.Size(83, 17);
this.CaseSensitiveCheckBox.Size = new System.Drawing.Size(104, 21);
this.CaseSensitiveCheckBox.TabIndex = 14;
this.CaseSensitiveCheckBox.Text = "Match Case";
this.CaseSensitiveCheckBox.UseVisualStyleBackColor = true;
//
// ColumnFilter
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.ClientSize = new System.Drawing.Size(1067, 554);
this.Controls.Add(this.CaseSensitiveCheckBox);
this.Controls.Add(this.buttonApply);
this.Controls.Add(this.buttonReset);
@@ -271,6 +286,7 @@
this.Controls.Add(this.comboBoxRelation);
this.Controls.Add(this.comboBoxSearchByColumn);
this.Controls.Add(this.label1);
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.Name = "ColumnFilter";
this.ShowIcon = false;
this.Text = "RPCMon Filter";
+26 -13
View File
@@ -36,6 +36,7 @@ namespace RPCMon
this.checkBoxPID = new System.Windows.Forms.CheckBox();
this.label1 = new System.Windows.Forms.Label();
this.groupBoxRPC = new System.Windows.Forms.GroupBox();
this.checkBoxTimeStamp = new System.Windows.Forms.CheckBox();
this.checkBoxImpersonationLevel = new System.Windows.Forms.CheckBox();
this.checkBoxAuthenticationLevel = new System.Windows.Forms.CheckBox();
this.checkBoxAuthenticationService = new System.Windows.Forms.CheckBox();
@@ -52,7 +53,7 @@ namespace RPCMon
this.checkBoxModulePath = new System.Windows.Forms.CheckBox();
this.checkBoxModule = new System.Windows.Forms.CheckBox();
this.checkBoxProceduresCount = new System.Windows.Forms.CheckBox();
this.checkBoxTimeStamp = new System.Windows.Forms.CheckBox();
this.checkBoxTaskName = new System.Windows.Forms.CheckBox();
this.groupBoxProcessManagement.SuspendLayout();
this.groupBoxRPC.SuspendLayout();
this.groupBoxRPCServer.SuspendLayout();
@@ -111,6 +112,7 @@ namespace RPCMon
//
// groupBoxRPC
//
this.groupBoxRPC.Controls.Add(this.checkBoxTaskName);
this.groupBoxRPC.Controls.Add(this.checkBoxTimeStamp);
this.groupBoxRPC.Controls.Add(this.checkBoxImpersonationLevel);
this.groupBoxRPC.Controls.Add(this.checkBoxAuthenticationLevel);
@@ -121,11 +123,21 @@ namespace RPCMon
this.groupBoxRPC.Controls.Add(this.checkBoxNetworkAddress);
this.groupBoxRPC.Location = new System.Drawing.Point(12, 253);
this.groupBoxRPC.Name = "groupBoxRPC";
this.groupBoxRPC.Size = new System.Drawing.Size(272, 122);
this.groupBoxRPC.Size = new System.Drawing.Size(272, 143);
this.groupBoxRPC.TabIndex = 3;
this.groupBoxRPC.TabStop = false;
this.groupBoxRPC.Text = "RPC Misc";
//
// checkBoxTimeStamp
//
this.checkBoxTimeStamp.AutoSize = true;
this.checkBoxTimeStamp.Location = new System.Drawing.Point(132, 97);
this.checkBoxTimeStamp.Name = "checkBoxTimeStamp";
this.checkBoxTimeStamp.Size = new System.Drawing.Size(79, 17);
this.checkBoxTimeStamp.TabIndex = 9;
this.checkBoxTimeStamp.Text = "TimeStamp";
this.checkBoxTimeStamp.UseVisualStyleBackColor = true;
//
// checkBoxImpersonationLevel
//
this.checkBoxImpersonationLevel.AutoSize = true;
@@ -218,7 +230,7 @@ namespace RPCMon
//
// buttonOK
//
this.buttonOK.Location = new System.Drawing.Point(113, 391);
this.buttonOK.Location = new System.Drawing.Point(113, 402);
this.buttonOK.Name = "buttonOK";
this.buttonOK.Size = new System.Drawing.Size(75, 23);
this.buttonOK.TabIndex = 4;
@@ -228,7 +240,7 @@ namespace RPCMon
//
// buttonCancel
//
this.buttonCancel.Location = new System.Drawing.Point(209, 391);
this.buttonCancel.Location = new System.Drawing.Point(205, 402);
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(75, 23);
this.buttonCancel.TabIndex = 5;
@@ -291,21 +303,21 @@ namespace RPCMon
this.checkBoxProceduresCount.Text = "ProceduresCount";
this.checkBoxProceduresCount.UseVisualStyleBackColor = true;
//
// checkBoxTimeStamp
// checkBoxTaskName
//
this.checkBoxTimeStamp.AutoSize = true;
this.checkBoxTimeStamp.Location = new System.Drawing.Point(132, 97);
this.checkBoxTimeStamp.Name = "checkBoxTimeStamp";
this.checkBoxTimeStamp.Size = new System.Drawing.Size(79, 17);
this.checkBoxTimeStamp.TabIndex = 9;
this.checkBoxTimeStamp.Text = "TimeStamp";
this.checkBoxTimeStamp.UseVisualStyleBackColor = true;
this.checkBoxTaskName.AutoSize = true;
this.checkBoxTaskName.Location = new System.Drawing.Point(8, 120);
this.checkBoxTaskName.Name = "checkBoxTaskName";
this.checkBoxTaskName.Size = new System.Drawing.Size(78, 17);
this.checkBoxTaskName.TabIndex = 10;
this.checkBoxTaskName.Text = "TaskName";
this.checkBoxTaskName.UseVisualStyleBackColor = true;
//
// ColumnSelection
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(292, 425);
this.ClientSize = new System.Drawing.Size(292, 437);
this.Controls.Add(this.groupBoxRPCServer);
this.Controls.Add(this.buttonCancel);
this.Controls.Add(this.buttonOK);
@@ -353,5 +365,6 @@ namespace RPCMon
private System.Windows.Forms.CheckBox checkBoxModule;
private System.Windows.Forms.CheckBox checkBoxProceduresCount;
private System.Windows.Forms.CheckBox checkBoxTimeStamp;
private System.Windows.Forms.CheckBox checkBoxTaskName;
}
}
+1
View File
@@ -48,6 +48,7 @@ namespace RPCMon
this.checkBoxProceduresCount.Checked = visableColumns.Contains("ProceduresCount");
this.checkBoxFunction.Checked = visableColumns.Contains("Function");
this.checkBoxTimeStamp.Checked = visableColumns.Contains("TimeStamp");
this.checkBoxTaskName.Checked = visableColumns.Contains("TaskName");
}
public virtual void OnselectColumnsUpdate(GroupBox i_RPCClient, GroupBox i_RPCServer, GroupBox i_RPCMisc)
+107
View File
@@ -0,0 +1,107 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Diagnostics.Tracing.Parsers.MicrosoftWindowsRPC;
namespace RPCMon.Control
{
class EventWrapper
{
private RpcClientCallStartArgs_V1TraceData m_ClientCallEvent;
private RpcServerCallStartArgs_V1TraceData m_ServerCallEvent;
private int m_ProcessID;
private string m_ThreadID;
private string m_InterfaceUuid;
private string m_NetworkAddress;
private string m_Protocol;
private string m_Endpoint;
private string m_TimeStamp;
private string m_Options;
private string m_AuthenticationLevel;
private string m_AuthenticationService;
private string m_ImpersonationLevel;
private string m_ProcessName;
private int m_ProcNum;
private string m_TaskName;
public EventWrapper(RpcClientCallStartArgs_V1TraceData ClientCallEvent)
{
this.m_ClientCallEvent = ClientCallEvent;
this.m_ServerCallEvent = null;
this.m_ProcessID = ClientCallEvent.ProcessID;
this.m_ThreadID = ClientCallEvent.ThreadID.ToString();
this.m_InterfaceUuid = ClientCallEvent.InterfaceUuid.ToString();
this.m_NetworkAddress = ClientCallEvent.NetworkAddress.ToString();
this.m_Protocol = ClientCallEvent.Protocol.ToString();
this.m_Endpoint = ClientCallEvent.Endpoint.ToString();
this.m_TimeStamp = ClientCallEvent.TimeStamp.ToString("dd/MMM/yyyy hh:mm:ss.fff tt");
this.m_Options = ClientCallEvent.Options.ToString();
this.m_AuthenticationLevel = ClientCallEvent.AuthenticationLevel.ToString();
this.m_AuthenticationService = ClientCallEvent.AuthenticationService.ToString();
this.m_ImpersonationLevel = ((ImpersonationLevels)ClientCallEvent.ImpersonationLevel).ToString();
this.m_ProcessName = ClientCallEvent.ProcessName;
this.m_ProcNum = ClientCallEvent.ProcNum;
this.m_TaskName = ClientCallEvent.TaskName.ToString() + ClientCallEvent.OpcodeName;
}
public EventWrapper(RpcServerCallStartArgs_V1TraceData ServerCallEvent)
{
this.m_ServerCallEvent = ServerCallEvent;
this.m_ServerCallEvent = null;
this.m_ProcessID = ServerCallEvent.ProcessID;
this.m_ThreadID = ServerCallEvent.ThreadID.ToString();
this.m_InterfaceUuid = ServerCallEvent.InterfaceUuid.ToString();
this.m_NetworkAddress = ServerCallEvent.NetworkAddress.ToString();
this.m_Protocol = ((ProtocolSequences)ServerCallEvent.Protocol).ToString();
this.m_Endpoint = ServerCallEvent.Endpoint.ToString();
this.m_TimeStamp = ServerCallEvent.TimeStamp.ToString("dd/MMM/yyyy hh:mm:ss.fff tt");
this.m_Options = ServerCallEvent.Options.ToString();
this.m_AuthenticationLevel = ServerCallEvent.AuthenticationLevel.ToString();
this.m_AuthenticationService = ServerCallEvent.AuthenticationService.ToString();
this.m_ImpersonationLevel = ServerCallEvent.ImpersonationLevel.ToString();
this.m_ProcessName = ServerCallEvent.ProcessName;
this.m_ProcNum = ServerCallEvent.ProcNum;
this.m_TaskName = ServerCallEvent.TaskName.ToString() + ServerCallEvent.OpcodeName;
}
public EventWrapper(RpcClientCallStop7Args_V1TraceData ClinetCallEvent)
{
this.m_ProcessID = ClinetCallEvent.ProcessID;
this.m_ThreadID = ClinetCallEvent.ThreadID.ToString();
this.m_ProcessID = ClinetCallEvent.ProcessID;
this.m_InterfaceUuid = "";
this.m_NetworkAddress = "";
this.m_Protocol = "";
this.m_Endpoint = "";
this.m_TimeStamp = ClinetCallEvent.TimeStamp.ToString("dd/MMM/yyyy hh:mm:ss.fff tt");
this.m_Options = "";
this.m_AuthenticationLevel = "";
this.m_AuthenticationService = "";
this.m_ImpersonationLevel = "";
this.m_ProcessName = ClinetCallEvent.ProcessName;
this.m_ProcNum = -1;
this.m_TaskName = ClinetCallEvent.TaskName.ToString() + ClinetCallEvent.OpcodeName;
}
public int ProcessID { get => m_ProcessID;}
public string ThreadID { get => m_ThreadID;}
public string InterfaceUuid { get => m_InterfaceUuid;}
public string NetworkAddress { get => m_NetworkAddress; }
public string Protocol { get => m_Protocol; }
public string Endpoint { get => m_Endpoint; }
public string TimeStamp { get => m_TimeStamp; }
public string Options { get => m_Options; }
public string AuthenticationLevel { get => m_AuthenticationLevel; }
public string AuthenticationService { get => m_AuthenticationService; }
public string ImpersonationLevel { get => m_ImpersonationLevel; }
public int ProcNum { get => m_ProcNum; }
public string ProcessName { get => m_ProcessName; }
public string TaskName { get => m_TaskName; }
}
}
+159 -97
View File
@@ -54,15 +54,6 @@
this.toolStripButtonRemoveDuplicate = new System.Windows.Forms.ToolStripButton();
this.toolStripButtonAutoScroll = new System.Windows.Forms.ToolStripButton();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.toolStripStatusLabelTotalEvents = new System.Windows.Forms.ToolStripStatusLabel();
this.selectedEventsToolStrip = new System.Windows.Forms.ToolStripStatusLabel();
this.toolStripStatusLabelDBPath = new System.Windows.Forms.ToolStripStatusLabel();
this.toolTipDBPath = new System.Windows.Forms.ToolTip(this.components);
this.contextMenuStripRightClickGridView = new System.Windows.Forms.ContextMenuStrip(this.components);
this.copyRowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.copyCellToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.ColumnPID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnTID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnProcessName = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -80,6 +71,20 @@
this.ColumnAuthenticationService = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnImpersonationLevel = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnTimeStamp = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnTaskName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.toolStripStatusLabelTotalEvents = new System.Windows.Forms.ToolStripStatusLabel();
this.selectedEventsToolStrip = new System.Windows.Forms.ToolStripStatusLabel();
this.toolStripStatusLabelDBPath = new System.Windows.Forms.ToolStripStatusLabel();
this.toolTipDBPath = new System.Windows.Forms.ToolTip(this.components);
this.contextMenuStripRightClickGridView = new System.Windows.Forms.ContextMenuStrip(this.components);
this.copyRowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.copyCellToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.showClientStartToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.showServerStartToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.showClientStopToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.showServerStopToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1.SuspendLayout();
this.toolStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
@@ -98,7 +103,8 @@
this.helpToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(828, 24);
this.menuStrip1.Padding = new System.Windows.Forms.Padding(8, 2, 0, 2);
this.menuStrip1.Size = new System.Drawing.Size(1104, 28);
this.menuStrip1.TabIndex = 0;
this.menuStrip1.Text = "menuStrip1";
//
@@ -109,13 +115,13 @@
this.importToolStripMenuItem,
this.importToolStripMenuItem1});
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
this.fileToolStripMenuItem.Size = new System.Drawing.Size(44, 24);
this.fileToolStripMenuItem.Text = "File";
//
// saveToolStripMenuItem
//
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
this.saveToolStripMenuItem.Size = new System.Drawing.Size(119, 22);
this.saveToolStripMenuItem.Size = new System.Drawing.Size(138, 26);
this.saveToolStripMenuItem.Text = "Save...";
this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click);
//
@@ -125,27 +131,27 @@
this.importAllDataToolStripMenuItem,
this.importAsIsToolStripMenuItem});
this.importToolStripMenuItem.Name = "importToolStripMenuItem";
this.importToolStripMenuItem.Size = new System.Drawing.Size(119, 22);
this.importToolStripMenuItem.Size = new System.Drawing.Size(138, 26);
this.importToolStripMenuItem.Text = "Export";
//
// importAllDataToolStripMenuItem
//
this.importAllDataToolStripMenuItem.Name = "importAllDataToolStripMenuItem";
this.importAllDataToolStripMenuItem.Size = new System.Drawing.Size(161, 22);
this.importAllDataToolStripMenuItem.Size = new System.Drawing.Size(194, 26);
this.importAllDataToolStripMenuItem.Text = "Export All Data...";
this.importAllDataToolStripMenuItem.Click += new System.EventHandler(this.exportAllDataToolStripMenuItem_Click);
//
// importAsIsToolStripMenuItem
//
this.importAsIsToolStripMenuItem.Name = "importAsIsToolStripMenuItem";
this.importAsIsToolStripMenuItem.Size = new System.Drawing.Size(161, 22);
this.importAsIsToolStripMenuItem.Size = new System.Drawing.Size(194, 26);
this.importAsIsToolStripMenuItem.Text = "Export As Is...";
this.importAsIsToolStripMenuItem.Click += new System.EventHandler(this.exportAsIsToolStripMenuItem_Click);
//
// importToolStripMenuItem1
//
this.importToolStripMenuItem1.Name = "importToolStripMenuItem1";
this.importToolStripMenuItem1.Size = new System.Drawing.Size(119, 22);
this.importToolStripMenuItem1.Size = new System.Drawing.Size(138, 26);
this.importToolStripMenuItem1.Text = "Import...";
this.importToolStripMenuItem1.Click += new System.EventHandler(this.importToolStripMenuItem1_Click);
//
@@ -155,35 +161,39 @@
this.loadDBToolStripMenuItemLoadDB,
this.buildDBToolStripMenuItem});
this.dBToolStripMenuItem.Name = "dBToolStripMenuItem";
this.dBToolStripMenuItem.Size = new System.Drawing.Size(34, 20);
this.dBToolStripMenuItem.Size = new System.Drawing.Size(41, 24);
this.dBToolStripMenuItem.Text = "DB";
//
// loadDBToolStripMenuItemLoadDB
//
this.loadDBToolStripMenuItemLoadDB.Name = "loadDBToolStripMenuItemLoadDB";
this.loadDBToolStripMenuItemLoadDB.Size = new System.Drawing.Size(128, 22);
this.loadDBToolStripMenuItemLoadDB.Size = new System.Drawing.Size(151, 26);
this.loadDBToolStripMenuItemLoadDB.Text = "Load DB...";
this.loadDBToolStripMenuItemLoadDB.Click += new System.EventHandler(this.loadDBToolStripMenuItemLoadDB_Click);
//
// buildDBToolStripMenuItem
//
this.buildDBToolStripMenuItem.Name = "buildDBToolStripMenuItem";
this.buildDBToolStripMenuItem.Size = new System.Drawing.Size(128, 22);
this.buildDBToolStripMenuItem.Size = new System.Drawing.Size(151, 26);
this.buildDBToolStripMenuItem.Text = "Build DB...";
this.buildDBToolStripMenuItem.Click += new System.EventHandler(this.buildDBToolStripMenuItem_Click);
//
// optionsToolStripMenuItem
//
this.optionsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.setDbgHelpFilePathToolStripMenuItem});
this.setDbgHelpFilePathToolStripMenuItem,
this.showClientStartToolStripMenuItem,
this.showServerStartToolStripMenuItem,
this.showClientStopToolStripMenuItem,
this.showServerStopToolStripMenuItem});
this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem";
this.optionsToolStripMenuItem.Size = new System.Drawing.Size(61, 20);
this.optionsToolStripMenuItem.Size = new System.Drawing.Size(73, 24);
this.optionsToolStripMenuItem.Text = "Options";
//
// setDbgHelpFilePathToolStripMenuItem
//
this.setDbgHelpFilePathToolStripMenuItem.Name = "setDbgHelpFilePathToolStripMenuItem";
this.setDbgHelpFilePathToolStripMenuItem.Size = new System.Drawing.Size(197, 22);
this.setDbgHelpFilePathToolStripMenuItem.Size = new System.Drawing.Size(238, 26);
this.setDbgHelpFilePathToolStripMenuItem.Text = "Set DbgHelp File Path...";
this.setDbgHelpFilePathToolStripMenuItem.Click += new System.EventHandler(this.setDbgHelpFilePathToolStripMenuItem_Click);
//
@@ -192,13 +202,13 @@
this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.aboutToolStripMenuItem});
this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";
this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
this.helpToolStripMenuItem.Size = new System.Drawing.Size(53, 24);
this.helpToolStripMenuItem.Text = "Help";
//
// aboutToolStripMenuItem
//
this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(116, 22);
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(216, 26);
this.aboutToolStripMenuItem.Text = "About...";
this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);
//
@@ -214,9 +224,9 @@
this.toolStripButtonGrid,
this.toolStripButtonRemoveDuplicate,
this.toolStripButtonAutoScroll});
this.toolStrip1.Location = new System.Drawing.Point(0, 24);
this.toolStrip1.Location = new System.Drawing.Point(0, 28);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(828, 27);
this.toolStrip1.Size = new System.Drawing.Size(1104, 27);
this.toolStrip1.TabIndex = 1;
this.toolStrip1.Text = "toolStrip1";
//
@@ -328,83 +338,19 @@
this.ColumnAuthenticationLevel,
this.ColumnAuthenticationService,
this.ColumnImpersonationLevel,
this.ColumnTimeStamp});
this.dataGridView1.Location = new System.Drawing.Point(0, 51);
this.ColumnTimeStamp,
this.ColumnTaskName});
this.dataGridView1.Location = new System.Drawing.Point(0, 63);
this.dataGridView1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.ReadOnly = true;
this.dataGridView1.Size = new System.Drawing.Size(828, 486);
this.dataGridView1.Size = new System.Drawing.Size(1104, 598);
this.dataGridView1.TabIndex = 3;
this.dataGridView1.Visible = false;
this.dataGridView1.CellMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dataGridView1_CellMouseClick);
this.dataGridView1.ColumnHeaderMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dataGridView1_ColumnHeaderMouseClick);
this.dataGridView1.SelectionChanged += new System.EventHandler(this.dataGridView1_SelectionChanged);
//
// statusStrip1
//
this.statusStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripStatusLabelTotalEvents,
this.selectedEventsToolStrip,
this.toolStripStatusLabelDBPath});
this.statusStrip1.Location = new System.Drawing.Point(0, 538);
this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Size = new System.Drawing.Size(828, 24);
this.statusStrip1.TabIndex = 4;
this.statusStrip1.Text = "statusStrip1";
//
// toolStripStatusLabelTotalEvents
//
this.toolStripStatusLabelTotalEvents.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Right;
this.toolStripStatusLabelTotalEvents.Name = "toolStripStatusLabelTotalEvents";
this.toolStripStatusLabelTotalEvents.Size = new System.Drawing.Size(107, 19);
this.toolStripStatusLabelTotalEvents.Text = "Shown events: 0/0";
//
// selectedEventsToolStrip
//
this.selectedEventsToolStrip.Name = "selectedEventsToolStrip";
this.selectedEventsToolStrip.Size = new System.Drawing.Size(100, 19);
this.selectedEventsToolStrip.Text = "Selected events: 0";
//
// toolStripStatusLabelDBPath
//
this.toolStripStatusLabelDBPath.Name = "toolStripStatusLabelDBPath";
this.toolStripStatusLabelDBPath.Size = new System.Drawing.Size(49, 19);
this.toolStripStatusLabelDBPath.Text = "DB File: ";
this.toolStripStatusLabelDBPath.MouseLeave += new System.EventHandler(this.toolStripStatusLabelDBPath_MouseLeave);
this.toolStripStatusLabelDBPath.MouseHover += new System.EventHandler(this.toolStripStatusLabelDBPath_MouseHover);
//
// contextMenuStripRightClickGridView
//
this.contextMenuStripRightClickGridView.ImageScalingSize = new System.Drawing.Size(20, 20);
this.contextMenuStripRightClickGridView.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.copyRowToolStripMenuItem,
this.copyCellToolStripMenuItem});
this.contextMenuStripRightClickGridView.Name = "contextMenuStripRightClickGridView";
this.contextMenuStripRightClickGridView.Size = new System.Drawing.Size(129, 48);
//
// copyRowToolStripMenuItem
//
this.copyRowToolStripMenuItem.Name = "copyRowToolStripMenuItem";
this.copyRowToolStripMenuItem.Size = new System.Drawing.Size(128, 22);
this.copyRowToolStripMenuItem.Text = "Copy Row";
this.copyRowToolStripMenuItem.Click += new System.EventHandler(this.copyRowToolStripMenuItem_Click);
//
// copyCellToolStripMenuItem
//
this.copyCellToolStripMenuItem.Name = "copyCellToolStripMenuItem";
this.copyCellToolStripMenuItem.Size = new System.Drawing.Size(128, 22);
this.copyCellToolStripMenuItem.Text = "Copy Cell";
this.copyCellToolStripMenuItem.Click += new System.EventHandler(this.copyCellToolStripMenuItem_Click);
//
// pictureBox1
//
this.pictureBox1.Image = global::RPCMon.Properties.Resources.drag_and_drop;
this.pictureBox1.Location = new System.Drawing.Point(343, 247);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(138, 131);
this.pictureBox1.TabIndex = 5;
this.pictureBox1.TabStop = false;
//
// ColumnPID
//
this.ColumnPID.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
@@ -516,12 +462,122 @@
this.ColumnTimeStamp.ReadOnly = true;
this.ColumnTimeStamp.Visible = false;
//
// ColumnTaskName
//
this.ColumnTaskName.HeaderText = "TaskName";
this.ColumnTaskName.Name = "ColumnTaskName";
this.ColumnTaskName.ReadOnly = true;
//
// statusStrip1
//
this.statusStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripStatusLabelTotalEvents,
this.selectedEventsToolStrip,
this.toolStripStatusLabelDBPath});
this.statusStrip1.Location = new System.Drawing.Point(0, 663);
this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Padding = new System.Windows.Forms.Padding(1, 0, 19, 0);
this.statusStrip1.Size = new System.Drawing.Size(1104, 29);
this.statusStrip1.TabIndex = 4;
this.statusStrip1.Text = "statusStrip1";
//
// toolStripStatusLabelTotalEvents
//
this.toolStripStatusLabelTotalEvents.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Right;
this.toolStripStatusLabelTotalEvents.Name = "toolStripStatusLabelTotalEvents";
this.toolStripStatusLabelTotalEvents.Size = new System.Drawing.Size(132, 24);
this.toolStripStatusLabelTotalEvents.Text = "Shown events: 0/0";
//
// selectedEventsToolStrip
//
this.selectedEventsToolStrip.Name = "selectedEventsToolStrip";
this.selectedEventsToolStrip.Size = new System.Drawing.Size(127, 24);
this.selectedEventsToolStrip.Text = "Selected events: 0";
//
// toolStripStatusLabelDBPath
//
this.toolStripStatusLabelDBPath.Name = "toolStripStatusLabelDBPath";
this.toolStripStatusLabelDBPath.Size = new System.Drawing.Size(63, 24);
this.toolStripStatusLabelDBPath.Text = "DB File: ";
this.toolStripStatusLabelDBPath.MouseLeave += new System.EventHandler(this.toolStripStatusLabelDBPath_MouseLeave);
this.toolStripStatusLabelDBPath.MouseHover += new System.EventHandler(this.toolStripStatusLabelDBPath_MouseHover);
//
// contextMenuStripRightClickGridView
//
this.contextMenuStripRightClickGridView.ImageScalingSize = new System.Drawing.Size(20, 20);
this.contextMenuStripRightClickGridView.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.copyRowToolStripMenuItem,
this.copyCellToolStripMenuItem});
this.contextMenuStripRightClickGridView.Name = "contextMenuStripRightClickGridView";
this.contextMenuStripRightClickGridView.Size = new System.Drawing.Size(146, 52);
//
// copyRowToolStripMenuItem
//
this.copyRowToolStripMenuItem.Name = "copyRowToolStripMenuItem";
this.copyRowToolStripMenuItem.Size = new System.Drawing.Size(145, 24);
this.copyRowToolStripMenuItem.Text = "Copy Row";
this.copyRowToolStripMenuItem.Click += new System.EventHandler(this.copyRowToolStripMenuItem_Click);
//
// copyCellToolStripMenuItem
//
this.copyCellToolStripMenuItem.Name = "copyCellToolStripMenuItem";
this.copyCellToolStripMenuItem.Size = new System.Drawing.Size(145, 24);
this.copyCellToolStripMenuItem.Text = "Copy Cell";
this.copyCellToolStripMenuItem.Click += new System.EventHandler(this.copyCellToolStripMenuItem_Click);
//
// pictureBox1
//
this.pictureBox1.Image = global::RPCMon.Properties.Resources.drag_and_drop;
this.pictureBox1.Location = new System.Drawing.Point(457, 304);
this.pictureBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(184, 161);
this.pictureBox1.TabIndex = 5;
this.pictureBox1.TabStop = false;
//
// showClientStartToolStripMenuItem
//
this.showClientStartToolStripMenuItem.Checked = true;
this.showClientStartToolStripMenuItem.CheckOnClick = true;
this.showClientStartToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked;
this.showClientStartToolStripMenuItem.Name = "showClientStartToolStripMenuItem";
this.showClientStartToolStripMenuItem.Size = new System.Drawing.Size(238, 26);
this.showClientStartToolStripMenuItem.Text = "Show ClientStart";
this.showClientStartToolStripMenuItem.CheckedChanged += new System.EventHandler(this.showClientStartToolStripMenuItem_CheckedChanged);
//
// showServerStartToolStripMenuItem
//
this.showServerStartToolStripMenuItem.Checked = true;
this.showServerStartToolStripMenuItem.CheckOnClick = true;
this.showServerStartToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked;
this.showServerStartToolStripMenuItem.Name = "showServerStartToolStripMenuItem";
this.showServerStartToolStripMenuItem.Size = new System.Drawing.Size(238, 26);
this.showServerStartToolStripMenuItem.Text = "Show ServerStart";
this.showServerStartToolStripMenuItem.CheckedChanged += new System.EventHandler(this.showServerStartToolStripMenuItem_CheckedChanged);
//
// showClientStopToolStripMenuItem
//
this.showClientStopToolStripMenuItem.CheckOnClick = true;
this.showClientStopToolStripMenuItem.Name = "showClientStopToolStripMenuItem";
this.showClientStopToolStripMenuItem.Size = new System.Drawing.Size(238, 26);
this.showClientStopToolStripMenuItem.Text = "Show ClientStop";
this.showClientStopToolStripMenuItem.CheckedChanged += new System.EventHandler(this.showClientStopToolStripMenuItem_CheckedChanged);
//
// showServerStopToolStripMenuItem
//
this.showServerStopToolStripMenuItem.CheckOnClick = true;
this.showServerStopToolStripMenuItem.Name = "showServerStopToolStripMenuItem";
this.showServerStopToolStripMenuItem.Size = new System.Drawing.Size(238, 26);
this.showServerStopToolStripMenuItem.Text = "Show ServerStop";
this.showServerStopToolStripMenuItem.CheckedChanged += new System.EventHandler(this.showServerStopToolStripMenuItem_CheckedChanged);
//
// Form1
//
this.AllowDrop = true;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(828, 562);
this.ClientSize = new System.Drawing.Size(1104, 692);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.dataGridView1);
@@ -529,6 +585,7 @@
this.Controls.Add(this.menuStrip1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MainMenuStrip = this.menuStrip1;
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.Name = "Form1";
this.Text = "RPCMon - RPC Monitor Based Windows Events";
this.Shown += new System.EventHandler(this.Form1_Shown);
@@ -601,6 +658,11 @@
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnAuthenticationService;
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnImpersonationLevel;
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnTimeStamp;
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnTaskName;
private System.Windows.Forms.ToolStripMenuItem showClientStartToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem showServerStartToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem showClientStopToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem showServerStopToolStripMenuItem;
}
}
+165 -29
View File
@@ -53,6 +53,7 @@ namespace RPCMon
private IDictionary<string, List<ListViewItem>> m_ExcludeFilterDict = new Dictionary<string, List<ListViewItem>>();
private IDictionary<string, List<ListViewItem>> m_IncludeHighlightDict = new Dictionary<string, List<ListViewItem>>();
private IDictionary<string, List<ListViewItem>> m_ExcludeHighlightDict = new Dictionary<string, List<ListViewItem>>();
private bool[] m_IncludeEvents = { true, true, false, false };
public Form1()
{
@@ -61,8 +62,8 @@ namespace RPCMon
m_Timer = new Timer();
m_Timer.Tick += new EventHandler(timer1_Tick);
m_Timer.Interval = 100; // in miliseconds
// timer1.Start();
// timer1.Start();
Center_Picture();
this.m_RPCDBPath = getDBFromCurrentFolder();
this.toolStripStatusLabelDBPath.Text = "DB File: " + Path.GetFileName(this.m_RPCDBPath);
Process[] processCollection = Process.GetProcesses();
@@ -313,29 +314,47 @@ namespace RPCMon
session.EnableProvider("Microsoft-Windows-RPC", Microsoft.Diagnostics.Tracing.TraceEventLevel.Verbose);
var parser = new MicrosoftWindowsRPCTraceEventParser(session.Source);
// Do we want to include more events? server events?
parser.RpcClientCallStart += e2 =>
if (m_IncludeEvents[(int)Utils.eEvents.ServerStart])
{
// addEventToListView(e2);
//filterRowsByFilterRules(highLightListView, highLightFormName);
addEventToDataGridView(e2);
parser.RpcServerCallStart += e2 =>
{
EventWrapper eventWrapper = new EventWrapper(e2);
addEventToDataGridView(eventWrapper);
};
}
if (m_IncludeEvents[(int)Utils.eEvents.ClientStart])
{
parser.RpcClientCallStart += e2 =>
{
EventWrapper eventWrapper = new EventWrapper(e2);
addEventToDataGridView(eventWrapper);
};
}
/*
// Throws an error "Cross-thread operation not valid: Control 'textBox1' accessed from a thread other than the thread it was created on."
string funcName = getFunctionName(e2.InterfaceUuid.ToString(), e2.ProcNum);
ListViewItem item = new ListViewItem(e2.ProcessID.ToString());
item.SubItems.Add(e2.ThreadID.ToString());
item.SubItems.Add(e2.InterfaceUuid.ToString());
item.SubItems.Add(funcName);
listView1.Items.Add(item);*/
// Console.WriteLine($"{e2.ID} {funcName}");
};
if (m_IncludeEvents[(int)Utils.eEvents.ClientStop])
{
parser.RpcClientCallStop7 += e2 =>
{
EventWrapper eventWrapper = new EventWrapper(e2);
addEventToDataGridView(eventWrapper);
};
}
if (m_IncludeEvents[(int)Utils.eEvents.ServerStop])
{
parser.RpcServerCallStop += e2 =>
{
EventWrapper eventWrapper = new EventWrapper(e2);
addEventToDataGridView(eventWrapper);
};
}
session.Source.Process();
}
}
private void setRpcFields(ref DataGridViewRow i_Row, string i_UUID)
{
if (m_RPCDB.ContainsKey(i_UUID))
@@ -355,8 +374,12 @@ namespace RPCMon
}
// https://docs.microsoft.com/en-us/dotnet/desktop/winforms/controls/how-to-make-thread-safe-calls?view=netdesktop-6.0
private delegate void addEventToDataGridViewCallBack(Microsoft.Diagnostics.Tracing.Parsers.MicrosoftWindowsRPC.RpcClientCallStartArgs_V1TraceData i_Event);
private void addEventToDataGridView(Microsoft.Diagnostics.Tracing.Parsers.MicrosoftWindowsRPC.RpcClientCallStartArgs_V1TraceData i_Event)
private delegate void addEventToDataGridViewCallBack(EventWrapper i_Event);
private void addEventToDataGridView(EventWrapper i_Event)
{
if (this.InvokeRequired)
{
@@ -372,10 +395,10 @@ namespace RPCMon
row.CreateCells(dataGridView1);
//dataGridView1.Rows.Add(cells);
//dataGridView1.Rows[0].Cells[0].Value = "";
row.Cells[(int)Utils.eColumnNames.PID].Value = i_Event.ProcessID.ToString();
row.Cells[(int)Utils.eColumnNames.TID].Value = i_Event.ThreadID.ToString();
setProcessName(i_Event, ref row);
row.Cells[(int)Utils.eColumnNames.UUID].Value = i_Event.InterfaceUuid.ToString();
@@ -386,11 +409,11 @@ namespace RPCMon
row.Cells[(int)Utils.eColumnNames.Function].Value = funcName;
row.Cells[(int)Utils.eColumnNames.NetworkAddress].Value = i_Event.NetworkAddress.ToString();
row.Cells[(int)Utils.eColumnNames.Protocol].Value = i_Event.Protocol.ToString();
row.Cells[(int)Utils.eColumnNames.Endpoint].Value = i_Event.Endpoint.ToString();
row.Cells[(int)Utils.eColumnNames.TimeStamp].Value = i_Event.TimeStamp.ToString("dd/MMM/yyyy hh:mm:ss.fff tt");
row.Cells[(int)Utils.eColumnNames.NetworkAddress].Value = i_Event.NetworkAddress;
row.Cells[(int)Utils.eColumnNames.Protocol].Value = i_Event.Protocol;
row.Cells[(int)Utils.eColumnNames.Endpoint].Value = i_Event.Endpoint;
row.Cells[(int)Utils.eColumnNames.TimeStamp].Value = i_Event.TimeStamp;
row.Cells[(int)Utils.eColumnNames.Task].Value = i_Event.TaskName;
row.Cells[(int)Utils.eColumnNames.Options].Value = i_Event.Options.ToString();
row.Cells[(int)Utils.eColumnNames.AuthenticationLevel].Value = i_Event.AuthenticationLevel.ToString();
row.Cells[(int)Utils.eColumnNames.AuthenticationService].Value = i_Event.AuthenticationService.ToString();
@@ -412,7 +435,63 @@ namespace RPCMon
}
}
private void setProcessName(Microsoft.Diagnostics.Tracing.Parsers.MicrosoftWindowsRPC.RpcClientCallStartArgs_V1TraceData i_Event, ref DataGridViewRow row)
//private void addEventToDataGridView(Microsoft.Diagnostics.Tracing.Parsers.MicrosoftWindowsRPC.RpcClientCallStartArgs_V1TraceData i_Event)
//{
// if (this.InvokeRequired)
// {
// addEventToDataGridViewCallBack s = new addEventToDataGridViewCallBack(addEventToDataGridView);
// this.Invoke(s, i_Event);
// }
// else
// {
// string funcName = getFunctionName(i_Event.InterfaceUuid.ToString(), i_Event.ProcNum);
// //DataGridViewRow row = (DataGridViewRow)dataGridView1.Rows[0].Clone();
// DataGridViewRow row = new DataGridViewRow();
// row.CreateCells(dataGridView1);
// //dataGridView1.Rows.Add(cells);
// //dataGridView1.Rows[0].Cells[0].Value = "";
// row.Cells[(int)Utils.eColumnNames.PID].Value = i_Event.ProcessID.ToString();
// row.Cells[(int)Utils.eColumnNames.TID].Value = i_Event.ThreadID.ToString();
// setProcessName(i_Event, ref row);
// row.Cells[(int)Utils.eColumnNames.UUID].Value = i_Event.InterfaceUuid.ToString();
// if (i_Event.InterfaceUuid.ToString() != null && i_Event.InterfaceUuid.ToString() != "")
// {
// setRpcFields(ref row, i_Event.InterfaceUuid.ToString());
// }
// row.Cells[(int)Utils.eColumnNames.Function].Value = funcName;
// row.Cells[(int)Utils.eColumnNames.NetworkAddress].Value = i_Event.NetworkAddress.ToString();
// row.Cells[(int)Utils.eColumnNames.Protocol].Value = i_Event.Protocol.ToString();
// row.Cells[(int)Utils.eColumnNames.Endpoint].Value = i_Event.Endpoint.ToString();
// row.Cells[(int)Utils.eColumnNames.TimeStamp].Value = i_Event.TimeStamp.ToString("dd/MMM/yyyy hh:mm:ss.fff tt");
// row.Cells[(int)Utils.eColumnNames.Options].Value = i_Event.Options.ToString();
// row.Cells[(int)Utils.eColumnNames.AuthenticationLevel].Value = i_Event.AuthenticationLevel.ToString();
// row.Cells[(int)Utils.eColumnNames.AuthenticationService].Value = i_Event.AuthenticationService.ToString();
// row.Cells[(int)Utils.eColumnNames.ImpersonationLevel].Value = i_Event.ImpersonationLevel.ToString();
// row.DefaultCellStyle.Font = new Font(dataGridView1.DefaultCellStyle.Font, FontStyle.Regular);
// dataGridView1.Rows.Add(row);
// if (!m_IncludeHighlightDict.Count.Equals(0) || !m_ExcludeHighlightDict.Count.Equals(0))
// {
// filterSingleRowByFilterRules(Utils.eFormNames.FormHighlighFilter, row);
// }
// if (!m_IncludeFilterDict.Count.Equals(0) || !m_ExcludeFilterDict.Count.Equals(0))
// {
// filterSingleRowByFilterRules(Utils.eFormNames.FormColumnFilter, row);
// }
// if (row.Visible && autoScroll)
// dataGridView1.FirstDisplayedCell = row.Cells[(int)Utils.eColumnNames.ImpersonationLevel];
// this.m_TotalNumberOfEvents += 1;
// //this.toolStripStatusLabelTotalEvents.Text = "Total events: " + this.m_TotalNumberOfEvents;
// }
//}
private void setProcessName(EventWrapper i_Event, ref DataGridViewRow row)
{
if (i_Event.ProcessName == "")
{
@@ -1314,6 +1393,11 @@ namespace RPCMon
}
private void Form1_Resize(object sender, EventArgs e)
{
Center_Picture();
}
private void Center_Picture()
{
int x = (this.ClientSize.Width - pictureBox1.Width) / 2;
int y = (this.ClientSize.Height - pictureBox1.Height) / 2;
@@ -1347,6 +1431,58 @@ namespace RPCMon
}
}
private void showClientStartToolStripMenuItem_CheckedChanged(object sender, EventArgs e)
{
if (m_IncludeEvents[(int)Utils.eEvents.ClientStart])
{
m_IncludeEvents[(int)Utils.eEvents.ClientStart] = false;
}
else
{
m_IncludeEvents[(int)Utils.eEvents.ClientStart] = true;
}
optionsToolStripMenuItem.DropDown.Show();
}
private void showServerStartToolStripMenuItem_CheckedChanged(object sender, EventArgs e)
{
if (m_IncludeEvents[(int)Utils.eEvents.ServerStart])
{
m_IncludeEvents[(int)Utils.eEvents.ServerStart] = false;
}
else
{
m_IncludeEvents[(int)Utils.eEvents.ServerStart] = true;
}
optionsToolStripMenuItem.DropDown.Show();
}
private void showClientStopToolStripMenuItem_CheckedChanged(object sender, EventArgs e)
{
if (m_IncludeEvents[(int)Utils.eEvents.ClientStop])
{
m_IncludeEvents[(int)Utils.eEvents.ClientStop] = false;
}
else
{
m_IncludeEvents[(int)Utils.eEvents.ClientStop] = true;
}
optionsToolStripMenuItem.DropDown.Show();
}
private void showServerStopToolStripMenuItem_CheckedChanged(object sender, EventArgs e)
{
if (m_IncludeEvents[(int)Utils.eEvents.ServerStop])
{
m_IncludeEvents[(int)Utils.eEvents.ServerStop] = false;
}
else
{
m_IncludeEvents[(int)Utils.eEvents.ServerStop] = true;
}
optionsToolStripMenuItem.DropDown.Show();
}
private void updateToolStripStatusLabelDBPath(string i_DBPath)
{
this.toolStripStatusLabelDBPath.Text = "DB File: " + Path.GetFileName(this.m_RPCDBPath);
+3
View File
@@ -174,6 +174,9 @@
<metadata name="ColumnTimeStamp.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ColumnTaskName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>237, 17</value>
</metadata>
+47 -31
View File
@@ -52,9 +52,10 @@
// labelHighlight
//
this.labelHighlight.AutoSize = true;
this.labelHighlight.Location = new System.Drawing.Point(12, 9);
this.labelHighlight.Location = new System.Drawing.Point(16, 11);
this.labelHighlight.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.labelHighlight.Name = "labelHighlight";
this.labelHighlight.Size = new System.Drawing.Size(211, 13);
this.labelHighlight.Size = new System.Drawing.Size(282, 17);
this.labelHighlight.TabIndex = 0;
this.labelHighlight.Text = "Highlight entries matching these conditions:";
//
@@ -79,10 +80,12 @@
"AuthenticationLevel",
"AuthenticationService",
"ImpersonationLevel",
"TimeStamp"});
this.comboBoxColumn.Location = new System.Drawing.Point(12, 25);
"TimeStamp",
"TaskName"});
this.comboBoxColumn.Location = new System.Drawing.Point(16, 31);
this.comboBoxColumn.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.comboBoxColumn.Name = "comboBoxColumn";
this.comboBoxColumn.Size = new System.Drawing.Size(121, 21);
this.comboBoxColumn.Size = new System.Drawing.Size(160, 24);
this.comboBoxColumn.TabIndex = 1;
//
// comboBoxRelation
@@ -94,9 +97,10 @@
"is",
"begins with",
"ends with"});
this.comboBoxRelation.Location = new System.Drawing.Point(139, 25);
this.comboBoxRelation.Location = new System.Drawing.Point(185, 31);
this.comboBoxRelation.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.comboBoxRelation.Name = "comboBoxRelation";
this.comboBoxRelation.Size = new System.Drawing.Size(71, 21);
this.comboBoxRelation.Size = new System.Drawing.Size(93, 24);
this.comboBoxRelation.TabIndex = 2;
//
// comboBoxValue
@@ -104,9 +108,10 @@
this.comboBoxValue.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.comboBoxValue.FormattingEnabled = true;
this.comboBoxValue.Location = new System.Drawing.Point(216, 25);
this.comboBoxValue.Location = new System.Drawing.Point(288, 31);
this.comboBoxValue.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.comboBoxValue.Name = "comboBoxValue";
this.comboBoxValue.Size = new System.Drawing.Size(297, 21);
this.comboBoxValue.Size = new System.Drawing.Size(395, 24);
this.comboBoxValue.TabIndex = 3;
//
// labelThen
@@ -114,9 +119,10 @@
this.labelThen.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.labelThen.AutoSize = true;
this.labelThen.Location = new System.Drawing.Point(519, 25);
this.labelThen.Location = new System.Drawing.Point(692, 31);
this.labelThen.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.labelThen.Name = "labelThen";
this.labelThen.Size = new System.Drawing.Size(28, 13);
this.labelThen.Size = new System.Drawing.Size(36, 17);
this.labelThen.TabIndex = 4;
this.labelThen.Text = "then";
//
@@ -128,9 +134,10 @@
this.comboBoxAction.Items.AddRange(new object[] {
"Include",
"Exclude"});
this.comboBoxAction.Location = new System.Drawing.Point(557, 22);
this.comboBoxAction.Location = new System.Drawing.Point(743, 27);
this.comboBoxAction.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.comboBoxAction.Name = "comboBoxAction";
this.comboBoxAction.Size = new System.Drawing.Size(71, 21);
this.comboBoxAction.Size = new System.Drawing.Size(93, 24);
this.comboBoxAction.TabIndex = 5;
//
// listViewHighlights
@@ -146,9 +153,10 @@
this.columnHeaderAction,
this.columnCaseSensitive});
this.listViewHighlights.HideSelection = false;
this.listViewHighlights.Location = new System.Drawing.Point(12, 85);
this.listViewHighlights.Location = new System.Drawing.Point(16, 105);
this.listViewHighlights.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.listViewHighlights.Name = "listViewHighlights";
this.listViewHighlights.Size = new System.Drawing.Size(619, 267);
this.listViewHighlights.Size = new System.Drawing.Size(824, 328);
this.listViewHighlights.TabIndex = 6;
this.listViewHighlights.UseCompatibleStateImageBehavior = false;
this.listViewHighlights.View = System.Windows.Forms.View.Details;
@@ -178,9 +186,10 @@
// buttonOK
//
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonOK.Location = new System.Drawing.Point(391, 358);
this.buttonOK.Location = new System.Drawing.Point(521, 441);
this.buttonOK.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.buttonOK.Name = "buttonOK";
this.buttonOK.Size = new System.Drawing.Size(75, 23);
this.buttonOK.Size = new System.Drawing.Size(100, 28);
this.buttonOK.TabIndex = 7;
this.buttonOK.Text = "OK";
this.buttonOK.UseVisualStyleBackColor = true;
@@ -189,9 +198,10 @@
// buttonCancel
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.Location = new System.Drawing.Point(472, 358);
this.buttonCancel.Location = new System.Drawing.Point(629, 441);
this.buttonCancel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(75, 23);
this.buttonCancel.Size = new System.Drawing.Size(100, 28);
this.buttonCancel.TabIndex = 8;
this.buttonCancel.Text = "Cancel";
this.buttonCancel.UseVisualStyleBackColor = true;
@@ -200,9 +210,10 @@
// buttonAdd
//
this.buttonAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonAdd.Location = new System.Drawing.Point(472, 56);
this.buttonAdd.Location = new System.Drawing.Point(629, 69);
this.buttonAdd.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.buttonAdd.Name = "buttonAdd";
this.buttonAdd.Size = new System.Drawing.Size(75, 23);
this.buttonAdd.Size = new System.Drawing.Size(100, 28);
this.buttonAdd.TabIndex = 9;
this.buttonAdd.Text = "Add";
this.buttonAdd.UseVisualStyleBackColor = true;
@@ -211,9 +222,10 @@
// buttonRemove
//
this.buttonRemove.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonRemove.Location = new System.Drawing.Point(553, 56);
this.buttonRemove.Location = new System.Drawing.Point(737, 69);
this.buttonRemove.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.buttonRemove.Name = "buttonRemove";
this.buttonRemove.Size = new System.Drawing.Size(75, 23);
this.buttonRemove.Size = new System.Drawing.Size(100, 28);
this.buttonRemove.TabIndex = 10;
this.buttonRemove.Text = "Remove";
this.buttonRemove.UseVisualStyleBackColor = true;
@@ -222,9 +234,10 @@
// buttonReset
//
this.buttonReset.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonReset.Location = new System.Drawing.Point(12, 56);
this.buttonReset.Location = new System.Drawing.Point(16, 69);
this.buttonReset.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.buttonReset.Name = "buttonReset";
this.buttonReset.Size = new System.Drawing.Size(75, 23);
this.buttonReset.Size = new System.Drawing.Size(100, 28);
this.buttonReset.TabIndex = 11;
this.buttonReset.Text = "Reset";
this.buttonReset.UseVisualStyleBackColor = true;
@@ -233,9 +246,10 @@
// buttonApply
//
this.buttonApply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonApply.Location = new System.Drawing.Point(553, 358);
this.buttonApply.Location = new System.Drawing.Point(737, 441);
this.buttonApply.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.buttonApply.Name = "buttonApply";
this.buttonApply.Size = new System.Drawing.Size(75, 23);
this.buttonApply.Size = new System.Drawing.Size(100, 28);
this.buttonApply.TabIndex = 12;
this.buttonApply.Text = "Apply";
this.buttonApply.UseVisualStyleBackColor = true;
@@ -244,18 +258,19 @@
// CaseSensitiveCheckBox
//
this.CaseSensitiveCheckBox.AutoSize = true;
this.CaseSensitiveCheckBox.Location = new System.Drawing.Point(216, 53);
this.CaseSensitiveCheckBox.Location = new System.Drawing.Point(288, 65);
this.CaseSensitiveCheckBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.CaseSensitiveCheckBox.Name = "CaseSensitiveCheckBox";
this.CaseSensitiveCheckBox.Size = new System.Drawing.Size(83, 17);
this.CaseSensitiveCheckBox.Size = new System.Drawing.Size(104, 21);
this.CaseSensitiveCheckBox.TabIndex = 13;
this.CaseSensitiveCheckBox.Text = "Match Case";
this.CaseSensitiveCheckBox.UseVisualStyleBackColor = true;
//
// FormHighlighting
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(643, 393);
this.ClientSize = new System.Drawing.Size(857, 484);
this.Controls.Add(this.CaseSensitiveCheckBox);
this.Controls.Add(this.buttonApply);
this.Controls.Add(this.buttonReset);
@@ -270,6 +285,7 @@
this.Controls.Add(this.comboBoxRelation);
this.Controls.Add(this.comboBoxColumn);
this.Controls.Add(this.labelHighlight);
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "FormHighlighting";
+1
View File
@@ -90,6 +90,7 @@
<DependentUpon>ColumnSelection.cs</DependentUpon>
</Compile>
<Compile Include="Control\Engine.cs" />
<Compile Include="Control\EventWrapper.cs" />
<Compile Include="Control\Microsoft-Windows-RPC.cs" />
<Compile Include="Control\RPCServerInfo.cs" />
<Compile Include="Control\Win32NativeMethods.cs" />
+9
View File
@@ -30,9 +30,18 @@ namespace RPCMon
AuthenticationService,
ImpersonationLevel,
TimeStamp,
Task,
}
public enum eEvents
{
ClientStart = 0,
ServerStart,
ClientStop,
ServerStop,
}
public enum eFilterNames
{
Column, Relation, Value, Action, MatchCase