/[RomCheater]/trunk/RomCheater.PluginFramework/Core/ProcContainer.cs
ViewVC logotype

Diff of /trunk/RomCheater.PluginFramework/Core/ProcContainer.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/RomCheater.PluginFramework/Core/ProcContainer.cs	2012/05/10 09:03:13	100
+++ trunk/RomCheater.PluginFramework/Core/ProcContainer.cs	2012/05/10 09:53:16	101
@@ -16,8 +16,17 @@
             : this()
         {
             this.ProcessInfo = process;
-            string fname = ThreadControl.GetProcessFilename(process);
-            FileInfo fi = new FileInfo(fname);
+            FileInfo fi = null;
+            string fname = "";
+            try
+            {
+                fname = ProcessModeleInfoEx.GetMainModulePath(process);
+                fi = new FileInfo(fname);
+            }
+            catch (Exception ex)
+            {
+                throw;
+            }
             this.FileName = fi.FullName;
             this.Name = fi.Name;
             this.CreateProcessIcon(4);
@@ -26,7 +35,7 @@
             : this()
         {
             this.ProcessInfo = process; this.ProcessIcon = icon.ToBitmap();
-            string fname = ThreadControl.GetProcessFilename(process);
+            string fname = ProcessModeleInfoEx.GetMainModulePath(process);
             FileInfo fi = new FileInfo(fname);
             this.FileName = fi.FullName;
             this.Name = fi.Name;
@@ -35,7 +44,7 @@
             : this()
         {
             this.ProcessInfo = process; this.ProcessIcon = icon;
-            string fname = ThreadControl.GetProcessFilename(process);
+            string fname = ProcessModeleInfoEx.GetMainModulePath(process);
             FileInfo fi = new FileInfo(fname);
             this.FileName = fi.FullName;
             this.Name = fi.Name;

 

  ViewVC Help
Powered by ViewVC 1.1.22