ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/RomCheater/trunk/RomCheater.PluginFramework/Core/ProcContainer.cs
(Generate patch)

Comparing trunk/RomCheater.PluginFramework/Core/ProcContainer.cs (file contents):
Revision 100 by william, Thu May 10 09:03:13 2012 UTC vs.
Revision 105 by william, Thu May 10 10:53:07 2012 UTC

--- trunk/RomCheater.PluginFramework/Core/ProcContainer.cs	2012/05/10 09:03:13	100
+++ trunk/RomCheater.PluginFramework/Core/ProcContainer.cs	2012/05/10 10:53:07	105
@@ -16,8 +16,17 @@ namespace RomCheater.PluginFramework.Cor
             : 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)
+            {
+                throw;
+            }
             this.FileName = fi.FullName;
             this.Name = fi.Name;
             this.CreateProcessIcon(4);
@@ -26,7 +35,7 @@ namespace RomCheater.PluginFramework.Cor
             : 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 @@ namespace RomCheater.PluginFramework.Cor
             : 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;