16 |
|
: this() |
17 |
|
{ |
18 |
|
this.ProcessInfo = process; |
19 |
< |
string fname = ThreadControl.GetProcessFilename(process); |
20 |
< |
FileInfo fi = new FileInfo(fname); |
19 |
> |
FileInfo fi = null; |
20 |
> |
string fname = ""; |
21 |
> |
try |
22 |
> |
{ |
23 |
> |
fname = ProcessModeleInfoEx.GetMainModulePath(process); |
24 |
> |
fi = new FileInfo(fname); |
25 |
> |
} |
26 |
> |
catch (Exception ex) |
27 |
> |
{ |
28 |
> |
throw; |
29 |
> |
} |
30 |
|
this.FileName = fi.FullName; |
31 |
|
this.Name = fi.Name; |
32 |
|
this.CreateProcessIcon(4); |
35 |
|
: this() |
36 |
|
{ |
37 |
|
this.ProcessInfo = process; this.ProcessIcon = icon.ToBitmap(); |
38 |
< |
string fname = ThreadControl.GetProcessFilename(process); |
38 |
> |
string fname = ProcessModeleInfoEx.GetMainModulePath(process); |
39 |
|
FileInfo fi = new FileInfo(fname); |
40 |
|
this.FileName = fi.FullName; |
41 |
|
this.Name = fi.Name; |
44 |
|
: this() |
45 |
|
{ |
46 |
|
this.ProcessInfo = process; this.ProcessIcon = icon; |
47 |
< |
string fname = ThreadControl.GetProcessFilename(process); |
47 |
> |
string fname = ProcessModeleInfoEx.GetMainModulePath(process); |
48 |
|
FileInfo fi = new FileInfo(fname); |
49 |
|
this.FileName = fi.FullName; |
50 |
|
this.Name = fi.Name; |